public enum DateStyle extends Enum<DateStyle>
Enum Constant and Description |
---|
IGNORE_YEAR
The date is included in the name, but without the year:
mmm-dd |
INCLUDE_ENTIRELY
The entire date is included in the name:
yyyy-mm-dd |
OMIT
The date is omitted from the name.
|
Modifier and Type | Method and Description |
---|---|
java.time.format.DateTimeFormatter |
formatter()
Derives a formatter for the particular date-style.
|
String |
pattern()
Derives a pattern for the formatter for the particular date-style.
|
static DateStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DateStyle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateStyle INCLUDE_ENTIRELY
yyyy-mm-dd
public static final DateStyle IGNORE_YEAR
mmm-dd
public static final DateStyle OMIT
public static DateStyle[] values()
for (DateStyle c : DateStyle.values()) System.out.println(c);
public static DateStyle 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 java.time.format.DateTimeFormatter formatter()
public String pattern()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.