The singleton instance for the 'Heisei' era (1989-01-08 - current) which has the value 2.
The singleton instance for the 'Meiji' era (1868-09-08 - 1912-07-29) which has the value -1.
The singleton instance for the 'Showa' era (1926-12-25 - 1989-01-07) which has the value 1.
The singleton instance for the 'Taisho' era (1912-07-30 - 1926-12-24) which has the value 0.
Obtains an instance of JapaneseEra
from an int
value.
Obtains an instance of JapaneseEra
from an int
value.
The #SHOWA
era that contains 1970-01-01 (ISO calendar system) has the value 1
Later era is numbered 2 ( #HEISEI
). Earlier eras are numbered 0 ( #TAISHO
),
-1 ( #MEIJI
), only Meiji and later eras are supported.
the era to represent
the { @code JapaneseEra} singleton, not null
if the value is invalid
Registers an additional instance of JapaneseEra
.
Registers an additional instance of JapaneseEra
.
A new Japanese era can begin at any time. This method allows one new era to be registered without the need for a new library version. If needed, callers should assign the result to a static variable accessible across the application. This must be done once, in early startup code.
NOTE: This method does not exist in Java SE 8.
the date representing the first date of the era, validated not null
the name
the { @code JapaneseEra} singleton, not null
if an additional era has already been registered
Returns the JapaneseEra
with the name.
Returns the JapaneseEra
with the name.
The string must match exactly the name of the era. (Extraneous whitespace characters are not permitted.)
the japaneseEra name; non-null
the { @code JapaneseEra} singleton, never null
if there is not JapaneseEra with the specified name
Returns an array of JapaneseEras.
Returns an array of JapaneseEras.
This method may be used to iterate over the JapaneseEras as follows:
for (JapaneseEra c : JapaneseEra.values()) System.out.println(c);
an array of JapaneseEras