Class DateUtil
java.lang.Object
org.pentaho.reporting.libraries.formula.util.DateUtil
- Author:
- Cedric Pronzato
-
Method Summary
Modifier and TypeMethodDescriptionstatic CalendarcreateCalendar(Date date, LocalizationContext context) static DatecreateDate(int year, int month, int day, LocalizationContext context) static DatecreateDateTime(int year, int month, int day, int hour, int minute, int second, LocalizationContext context) static TimecreateTime(int hour, int minute, int second, LocalizationContext context) static BigDecimalnormalizeDate(BigDecimal fromSerialDate, Type toType) static DatenormalizeDate(Date fromDate, Type toType) Converts aDatevalue according to the requestedTypeto the properDatesubclasses (java.sql.Time,java.sql.Date) if needed.static DatenormalizeDate(Date fromDate, Type toType, boolean convertSerial) static Datenow(LocalizationContext context)
-
Method Details
-
normalizeDate
Converts aDatevalue according to the requestedTypeto the properDatesubclasses (java.sql.Time,java.sql.Date) if needed. If the requested type is unknown, no conversion takes place and the input date is returned.- Parameters:
fromDate- The date to convert.toType- The requested type of date.- Returns:
- The converted date.
-
normalizeDate
-
normalizeDate
-
now
-
createDateTime
public static Date createDateTime(int year, int month, int day, int hour, int minute, int second, LocalizationContext context) -
createTime
-
createDate
-
createCalendar
-