public enum YearDefinition extends Enum<YearDefinition>
Defines different strategies how to handle the difference between the standard calendar year from first of January to end of December and historic years which follow different new year rules.
| Enum Constant and Description |
|---|
AFTER_NEW_YEAR
Uses the displayed historic year only, even if it deviates from standard calendar year.
|
BEFORE_NEW_YEAR
Uses the displayed historic year only, even if it deviates from standard calendar year.
|
DUAL_DATING
Prefers the standard calendar year whose range is from first of January until end of December.
|
| Modifier and Type | Method and Description |
|---|---|
static YearDefinition |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static YearDefinition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final YearDefinition DUAL_DATING
Prefers the standard calendar year whose range is from first of January until end of December.
When used in formatting context dual dating like 1602/03 will be used if and only if the historic year deviates from standard calendar year. This year definition is the default.
public static final YearDefinition AFTER_NEW_YEAR
Uses the displayed historic year only, even if it deviates from standard calendar year.
If historic dates consisting of displayed year, month and day-of-month become ambivalent due to prolonged year length then the date shortly after new year will be taken. Dual dating is not used.
public static final YearDefinition BEFORE_NEW_YEAR
Uses the displayed historic year only, even if it deviates from standard calendar year.
If historic dates consisting of displayed year, month and day-of-month become ambivalent due to prolonged year length then the date shortly before next new year will be taken. Dual dating is not used.
public static YearDefinition[] values()
for (YearDefinition c : YearDefinition.values()) System.out.println(c);
public static YearDefinition 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 nullCopyright © 2014–2017. All rights reserved.