Enum Class DateTimePartStyle
- All Implemented Interfaces:
Serializable,Comparable<DateTimePartStyle>,Constable
Values for the
Intl.DateTimeFormat date-part attributes (year, month,
day, hour, minute, second, weekday). Not every part
accepts every value; each setter on RelativeTime documents its valid subset.
Only relevant when Format.DATETIME is in effect.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimePartStyleReturns the enum constant of this class with the specified name.static DateTimePartStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NUMERIC
Numeric ("1", "2", "12"). Accepted by year, month, day, hour, minute, second. -
TWO_DIGIT
Two-digit, zero-padded ("01", "12"). Accepted by year, month, day, hour, minute, second. -
NARROW
Narrow ("M", "T"). Accepted by month and weekday. -
SHORT
Short ("Mon", "Tue"). Accepted by month and weekday. -
LONG
Long ("Monday", "Tuesday"). Accepted by month and weekday.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-