IsoEra
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
IsoEra represents an era in the ISO calendar system, defining 'Current Era' (CE) and 'Before Current Era' (BCE).
Although ISO-8601 doesn't define eras, IsoEra provides them for years on or after 0001-01-01 (CE) and years before (BCE).
It's crucial to use getValue() instead of ordinal() to get the numeric representation of an IsoEra.
IsoEra has two enum values: BCE (value 0) and CE (value 1).
public final enum
IsoEra
extends Enum<IsoEra>
implements
Era
An era in the ISO calendar system.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],["`IsoEra` defines eras within the ISO calendar system: 'Current Era' (CE) for years 0001-01-01 and later, and 'Before Current Era' (BCE) for prior years. CE has a numeric value of 1, and BCE has 0. Each era has a proleptic-year mapping. `getValue()` provides the numeric representation; avoid using `ordinal()`. `IsoEra` extends `Enum` and implements `Era`, providing methods for temporal adjustments, value retrieval, and comparisons. It uses methods like `get()`, `getLong()`, and `isSupported()`.\n"]]