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