public enum DateTimeUnit extends java.lang.Enum<DateTimeUnit>
Enum Constant and Description |
---|
DAY_OF_MONTH |
HOUR_OF_DAY |
MINUTES_OF_HOUR |
MONTH_OF_YEAR |
QUARTER |
SECOND_OF_MINUTE |
WEEK_OF_WEEKYEAR |
YEAR_OF_CENTURY |
Modifier and Type | Method and Description |
---|---|
org.joda.time.DateTimeField |
field(org.joda.time.DateTimeZone tz) |
byte |
id() |
static DateTimeUnit |
resolve(byte id) |
static DateTimeUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DateTimeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateTimeUnit WEEK_OF_WEEKYEAR
public static final DateTimeUnit YEAR_OF_CENTURY
public static final DateTimeUnit QUARTER
public static final DateTimeUnit MONTH_OF_YEAR
public static final DateTimeUnit DAY_OF_MONTH
public static final DateTimeUnit HOUR_OF_DAY
public static final DateTimeUnit MINUTES_OF_HOUR
public static final DateTimeUnit SECOND_OF_MINUTE
public static DateTimeUnit[] values()
for (DateTimeUnit c : DateTimeUnit.values()) System.out.println(c);
public static DateTimeUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic byte id()
public org.joda.time.DateTimeField field(org.joda.time.DateTimeZone tz)
DateTimeField
for the provided DateTimeZone
for this time unitpublic static DateTimeUnit resolve(byte id)