Example usage for com.liferay.portal.kernel.util PortalUtil getDate

List of usage examples for com.liferay.portal.kernel.util PortalUtil getDate

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PortalUtil getDate.

Prototype

public static Date getDate(int month, int day, int year) 

Source Link

Document

Returns the date object for the specified month, day, and year, or null if the date is invalid.

Usage

From source file:com.liferay.dynamic.data.mapping.service.test.BaseDDMServiceTestCase.java

License:Open Source License

protected Serializable getDateFieldValue(int month, int day, int year, Locale locale) {

    Date dateValue = PortalUtil.getDate(month, day, year);

    DateFormat dateFormat = DateFormatFactoryUtil.getSimpleDateFormat("yyyy-MM-dd", locale);

    return dateFormat.format(dateValue);
}