The ISO-8601 standard does not define eras. A definition has therefore been created with two eras - 'Current era' (CE) for years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that.
year-of-era | era | proleptic-year |
---|---|---|
2 | CE | 2 |
1 | CE | 1 |
1 | BCE | 0 |
2 | BCE | -1 |
Do not use ordinal()
to obtain the numeric representation of IsoEra
.
Use getValue()
instead.
Implementation Specification
This is an immutable and thread-safe enum.
Modifier and Type | Field and Description |
---|---|
public static final IsoEra | BCE
The singleton instance for the era before the current one, 'Before Current Era', which has the numeric value 0. |
public static final IsoEra | CE
The singleton instance for the current era, 'Current Era', which has the numeric value 1. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public int | Returns: the era value, from 0 (BCE) to 1 (CE)Implements java. Gets the numeric era |
public static IsoEra | Returns: the era singleton, not nullthe BCE/CE value to represent, from 0 (BCE) to 1 (CE) isoEra)Obtains an instance of |
public static IsoEra | |
public static IsoEra[] |
BCE | back to summary |
---|---|
public static final IsoEra BCE The singleton instance for the era before the current one, 'Before Current Era', which has the numeric value 0. |
CE | back to summary |
---|---|
public static final IsoEra CE The singleton instance for the current era, 'Current Era', which has the numeric value 1. |
IsoEra | back to summary |
---|---|
private IsoEra() |
getValue | back to summary |
---|---|
public int getValue() Implements java. Gets the numeric era The era BCE has the value 0, while the era CE has the value 1.
|
of | back to summary |
---|---|
public static IsoEra of(int isoEra) Obtains an instance of
|
valueOf | back to summary |
---|---|
public static IsoEra valueOf(String name) |
values | back to summary |
---|---|
public static IsoEra[] values() |