Serializable
, Comparable<DateFormat>
public enum DateFormat extends Enum<DateFormat>
DateFormat
contains Date
and DateFormat
related values useful for parsing from and formatting to date String
instances.Enum Constant | Description |
---|---|
ALTERNATE_COOKIE_DATE_FORMAT |
An alternate cookie date format also seen in documentations out there on
the internet.
|
ALTERNATE_DATE_FORMAT |
Similar date format as
NORM_DATE_FORMAT though not avoiding the
space between the date and the time portion of the date format. |
DE_DATE_FORMAT |
Date format as used in German speaking locations, first comes the day,
last the year, all separated by a dot '.' character.
|
MAX_DATE_FORMAT |
Maximum sortable (first comes the year, last the nanoseconds) date
format, contains the date and the time till a granularity of
milliseconds.The character 'T' separates the date portion from the time
portion of the date format in order to unambiguously parse a such
formatted date
String . |
MAX_FILENAME_DATE_FORMAT |
Date format usable for (parts of) a filename, e.g. for rotating log files
or the such with a granularity of nanoseconds.
|
MIN_DATE_FORMAT |
Minimum sortable (first comes the year, last the day) date format,
contains the date without the time.
|
MIN_FILENAME_DATE_FORMAT |
Date format usable for (parts of) a filename, e.g. for rotating log files
or the such with a granularity of days.
|
NETSCAPE_COOKIE_DATE_FORMAT |
Date format as used for cookies as of the Netscape cookie specification.
|
NORM_DATE_FORMAT |
Normal sortable (first comes the year, last the seconds) date format,
contains the date and the time till a granularity of seconds.
|
NORM_FILENAME_DATE_FORMAT |
Date format usable for (parts of) a filename, e.g. for rotating log files
or the such with a granularity of seconds.
|
RFC_1123_DATE_TIME_ALIKE |
An alternate cookie date format also seen in documentations out there on
the internet.
|
Modifier and Type | Method | Description |
---|---|---|
DateTimeFormatter |
getFormatter() |
Gets the formatter.
|
static DateFormat |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static DateFormat[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateFormat NETSCAPE_COOKIE_DATE_FORMAT
public static final DateFormat ALTERNATE_COOKIE_DATE_FORMAT
public static final DateFormat RFC_1123_DATE_TIME_ALIKE
DateTimeFormatter.RFC_1123_DATE_TIME
formatter.public static final DateFormat MIN_DATE_FORMAT
public static final DateFormat NORM_DATE_FORMAT
String
.public static final DateFormat MAX_DATE_FORMAT
String
.public static final DateFormat ALTERNATE_DATE_FORMAT
NORM_DATE_FORMAT
though not avoiding the
space between the date and the time portion of the date format.public static final DateFormat DE_DATE_FORMAT
public static final DateFormat MIN_FILENAME_DATE_FORMAT
public static final DateFormat NORM_FILENAME_DATE_FORMAT
public static final DateFormat MAX_FILENAME_DATE_FORMAT
public static DateFormat[] values()
for (DateFormat c : DateFormat.values()) System.out.println(c);
public static DateFormat 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 DateTimeFormatter getFormatter()
Copyright © 2021. All rights reserved.