public class DateUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.GregorianCalendar | createLogicalDate(int year, int month, int day) Creates a logical date for the year, month and day provided. |
static java.util.GregorianCalendar | createLogicalDate(int year, int month, int day, java.util.Locale locale) Creates a logical date for the locale, year, month and day provided. |
static java.util.GregorianCalendar | createLogicalDate(long millisecondsTimeStamp) Creates a logical date for the locale and timestamp in milliseconds provided. |
static java.util.GregorianCalendar | createLogicalDate(long millisecondsTimeStamp, java.util.Locale locale) Creates a logical date for the locale and timestamp in milliseconds provided. |
static java.util.GregorianCalendar | getAbsoluteDate(RelativeDate relativeDate, boolean isLogicalDate) Gets the absolute date for a relative date with the current date and time as the relevance point. |
static java.util.GregorianCalendar | getAbsoluteDate(RelativeDate relativeDate, java.util.Date baseDate, boolean isLogicalDate) Gets the absolute date for a relative date with a base date and time as the relevance point. |
static boolean | isRelativeDate(java.lang.Object value) Checks if a value, usually criteria value, is a relative date. |
public static java.util.GregorianCalendar getAbsoluteDate(RelativeDate relativeDate, boolean isLogicalDate)
isLogicalDate
- false if this date should include the time.public static java.util.GregorianCalendar getAbsoluteDate(RelativeDate relativeDate, java.util.Date baseDate, boolean isLogicalDate)
baseDate
- the relevance point to get the absolute date for.isLogicalDate
- false if this date should include the time.public static boolean isRelativeDate(java.lang.Object value)
value
- the value to check.public static java.util.GregorianCalendar createLogicalDate(int year, int month, int day)
year
- the year, such as 1984.month
- the month, a value between 0 and 11 inclusive where 0 is January.day
- the day of the month, a value between 1 and 31 inclusive.public static java.util.GregorianCalendar createLogicalDate(int year, int month, int day, java.util.Locale locale)
year
- the year, such as 1984.month
- the month, a value between 0 and 11 inclusive where 0 is January.day
- the day of the month, a value between 1 and 31 inclusive.locale
- the locale or time zone of the date to create.public static java.util.GregorianCalendar createLogicalDate(long millisecondsTimeStamp)
millisecondsTimeStamp
- the timestamp in UTC milliseconds from the epoch.public static java.util.GregorianCalendar createLogicalDate(long millisecondsTimeStamp, java.util.Locale locale)
millisecondsTimeStamp
- the timestamp in UTC milliseconds from the epoch.locale
- the locale or time zone of the date to create.