Package com.globalmentor.text
Enum W3CDateFormat.Style
- java.lang.Object
-
- java.lang.Enum<W3CDateFormat.Style>
-
- com.globalmentor.text.W3CDateFormat.Style
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<W3CDateFormat.Style>
- Enclosing class:
- W3CDateFormat
public static enum W3CDateFormat.Style extends java.lang.Enum<W3CDateFormat.Style>
The specific style of W3C date format.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DATE
Pattern for complete date: YYYY-MM-DD (e.g.DATE_HOURS_MINUTES
Pattern for complete date plus hours and minutes: YYYY-MM-DDThh:mmTZD (e.g.DATE_HOURS_MINUTES_SECONDS
Pattern for complete date plus hours, minutes and seconds: YYYY-MM-DDThh:mm:ssTZD (e.g.DATE_TIME
Pattern for complete date plus hours, minutes, seconds and a decimal fraction of a second: YYYY-MM-DDThh:mm:ss.sTZD (e.g.YEAR
Style for year: YYYY (e.g.YEAR_MONTH
Pattern for year and month: YYYY-MM (e.g.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static W3CDateFormat.Style
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static W3CDateFormat.Style[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
YEAR
public static final W3CDateFormat.Style YEAR
Style for year: YYYY (e.g. 1997)
-
YEAR_MONTH
public static final W3CDateFormat.Style YEAR_MONTH
Pattern for year and month: YYYY-MM (e.g. 1997-07)
-
DATE
public static final W3CDateFormat.Style DATE
Pattern for complete date: YYYY-MM-DD (e.g. 1997-07-16)
-
DATE_HOURS_MINUTES
public static final W3CDateFormat.Style DATE_HOURS_MINUTES
Pattern for complete date plus hours and minutes: YYYY-MM-DDThh:mmTZD (e.g. 1997-07-16T19:20+01:00)
-
DATE_HOURS_MINUTES_SECONDS
public static final W3CDateFormat.Style DATE_HOURS_MINUTES_SECONDS
Pattern for complete date plus hours, minutes and seconds: YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00)
-
DATE_TIME
public static final W3CDateFormat.Style DATE_TIME
Pattern for complete date plus hours, minutes, seconds and a decimal fraction of a second: YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
-
-
Method Detail
-
values
public static W3CDateFormat.Style[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (W3CDateFormat.Style c : W3CDateFormat.Style.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static W3CDateFormat.Style valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-