public enum DateFormatType extends java.lang.Enum<DateFormatType>
Enum Constant and Description |
---|
DDMMYYYY
dd.mm.yyyy
|
DDMMYYYYdashed
dd.mm.yyyy
|
ISO8601
ISO 8601 format (2011-05-24T14:39+01:00)
|
RFC822
RFC822 format (2011-05-24T14:39+0100)
|
YYYYMMDD
yyyy/mm/dd
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.util.Date date,
java.util.Locale locale,
java.util.TimeZone timezone) |
java.util.Date |
parse(java.lang.String s,
java.util.Locale locale,
java.util.TimeZone timezone) |
java.lang.String |
value()
Return the value of the enum.
|
static DateFormatType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DateFormatType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateFormatType ISO8601
public static final DateFormatType RFC822
public static final DateFormatType YYYYMMDD
public static final DateFormatType DDMMYYYY
public static final DateFormatType DDMMYYYYdashed
public static DateFormatType[] values()
for (DateFormatType c : DateFormatType.values()) System.out.println(c);
public static DateFormatType 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 java.lang.String value()
public java.lang.String format(java.util.Date date, java.util.Locale locale, java.util.TimeZone timezone)
public java.util.Date parse(java.lang.String s, java.util.Locale locale, java.util.TimeZone timezone) throws java.text.ParseException
java.text.ParseException