public enum CommonDateFormat extends Enum<CommonDateFormat>
| Enum Constant and Description |
|---|
HHMM |
HHMMSS |
ISO8601 |
ISO8601_WITHMS |
YYYYMMDD |
YYYYMMDD_COMPACT |
YYYYMMDD_HHMM |
YYYYMMDD_HHMM_COMPACT |
YYYYMMDD_HHMMSS |
YYYYMMDD_HHMMSS_COMPACT |
YYYYMMDD_HHMMSS_WITHMS |
YYYYMMDD_HHMMSS_WITHMS_COMPACT |
| Modifier and Type | Method and Description |
|---|---|
String |
format(Date date) |
Date |
parse(String date) |
static CommonDateFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CommonDateFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CommonDateFormat HHMM
public static final CommonDateFormat HHMMSS
public static final CommonDateFormat YYYYMMDD
public static final CommonDateFormat YYYYMMDD_COMPACT
public static final CommonDateFormat YYYYMMDD_HHMM
public static final CommonDateFormat YYYYMMDD_HHMM_COMPACT
public static final CommonDateFormat YYYYMMDD_HHMMSS
public static final CommonDateFormat YYYYMMDD_HHMMSS_COMPACT
public static final CommonDateFormat YYYYMMDD_HHMMSS_WITHMS
public static final CommonDateFormat YYYYMMDD_HHMMSS_WITHMS_COMPACT
public static final CommonDateFormat ISO8601
public static final CommonDateFormat ISO8601_WITHMS
public static CommonDateFormat[] values()
for (CommonDateFormat c : CommonDateFormat.values()) System.out.println(c);
public static CommonDateFormat 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 Date parse(String date) throws ParseException
ParseExceptionCopyright © 2018–2019 Butor Inc.. All rights reserved.