public enum Date extends Enum<Date>
Enum Constant and Description |
---|
LAST_2_HRS
given
NOW less 2 hours |
LAST_24_HRS
given
NOW less 24 hours |
LAST_7_DAYS
given
NOW less 1 week |
LAST_MONTH
given
NOW less 1 month |
LAST_YEAR
given
NOW less 1 year |
NOW
what could be considered the current timestamp
|
Modifier and Type | Method and Description |
---|---|
static String |
convertToISO_8601_2000(Calendar cal) |
Calendar |
getCalendar() |
static Date |
randomDate()
return a random Date
|
String |
toISO_8601_2000() |
static Date |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Date[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Date NOW
public static final Date LAST_2_HRS
NOW
less 2 hourspublic static final Date LAST_24_HRS
NOW
less 24 hourspublic static final Date LAST_7_DAYS
NOW
less 1 weekpublic static final Date LAST_MONTH
NOW
less 1 monthpublic static final Date LAST_YEAR
NOW
less 1 yearpublic static Date[] values()
for (Date c : Date.values()) System.out.println(c);
public static Date valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Calendar getCalendar()
public String toISO_8601_2000()
public static Date randomDate()
Copyright © 2012-2016 The Apache Software Foundation. All Rights Reserved.