ChronoField.YearOfEra Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The year within the era.
[Android.Runtime.Register("YEAR_OF_ERA", ApiSince=26)]
public static Java.Time.Temporal.ChronoField? YearOfEra { get; }
[<Android.Runtime.Register("YEAR_OF_ERA", ApiSince=26)>]
static member YearOfEra : Java.Time.Temporal.ChronoField
Property Value
- Attributes
Remarks
The year within the era. This represents the concept of the year within the era. This field is typically used with ERA. The standard mental model for a date is based on three concepts - year, month and day. These map onto the YEAR, MONTH_OF_YEAR and DAY_OF_MONTH fields. Note that there is no reference to eras. The full model for a date requires four concepts - era, year, month and day. These map onto the ERA, YEAR_OF_ERA, MONTH_OF_YEAR and DAY_OF_MONTH fields. Whether this field or YEAR is used depends on which mental model is being used. See ChronoLocalDate for more discussion on this topic. In the default ISO calendar system, there are two eras defined, 'BCE' and 'CE'. The era 'CE' is the one currently in use and year-of-era runs from 1 to the maximum value. The era 'BCE' is the previous era, and the year-of-era runs backwards. For example, subtracting a year each time yield the following: - year-proleptic 2 = 'CE' year-of-era 2 - year-proleptic 1 = 'CE' year-of-era 1 - year-proleptic 0 = 'BCE' year-of-era 1 - year-proleptic -1 = 'BCE' year-of-era 2 Note that the ISO-8601 standard does not actually define eras. Note also that the ISO eras do not align with the well-known AD/BC eras due to the change between the Julian and Gregorian calendar systems. Non-ISO calendar systems should implement this field using the most recognized year-of-era value for users of the calendar system. Since most calendar systems have only two eras, the year-of-era numbering approach will typically be the same as that used by the ISO calendar system. The year-of-era value should typically always be positive, however this is not required.
Java reference for java.time.temporal.ChronoField.YEAR_OF_ERA.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.