Package org.openl.util
Class DateTool
java.lang.Object
org.openl.util.DateTool
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Integerstatic IntegerabsQuarter(Date d) static Stringstatic StringdateToString(Date date) Converts a date to the String value according the default locale.static StringdateToString(Date date, String dateFormat) Converts a date to the String value according the dateFormatstatic Integerstatic IntegerdayOfMonth(Date d) static Integerstatic Integerstatic DatefirstDateOfQuarter(int absQuarter) static Integerstatic Integerstatic DatelastDateOfQuarter(int absQuarter) static Integerstatic Integerstatic Integerstatic Integerstatic Integerstatic Integerstatic Integerstatic IntegerweekOfMonth(Date d) static IntegerweekOfYear(Date d) static Integerstatic Integer
-
Field Details
-
MONTHS_IN_YEAR
public static final int MONTHS_IN_YEAR- See Also:
-
QUARTERS_IN_YEAR
public static final int QUARTERS_IN_YEAR- See Also:
-
MONTHS_IN_QUARTER
public static final int MONTHS_IN_QUARTER- See Also:
-
SECONDS_IN_DAY
public static final int SECONDS_IN_DAY- See Also:
-
MILLISECONDS_IN_DAY
public static final int MILLISECONDS_IN_DAY- See Also:
-
-
Constructor Details
-
DateTool
public DateTool()
-
-
Method Details
-
absMonth
-
absQuarter
-
dayDiff
-
dayOfWeek
-
dayOfMonth
-
dayOfYear
-
weekOfMonth
-
weekOfYear
-
firstDateOfQuarter
-
lastDateOfQuarter
-
lastDayOfMonth
-
monthDiff
-
yearDiff
-
weekDiff
-
quarter
-
second
-
minute
-
hour
- Parameters:
d- Date- Returns:
- hour from 0 to 12
-
hourOfDay
- Parameters:
d- Date- Returns:
- hour from 0 to 24
-
month
-
year
-
amPm
-
dateToString
Converts a date to the String value according the dateFormat- Parameters:
date- a date which should be converteddateFormat-- Returns:
- String date format
-
dateToString
Converts a date to the String value according the default locale.- Parameters:
date-- Returns:
- String date format
-