Language

ChronoField.Year Property

Definition

The proleptic year, such as 2012.

[Android.Runtime.Register("YEAR", ApiSince=26)]
public static Java.Time.Temporal.ChronoField? Year { get; }
[<Android.Runtime.Register("YEAR", ApiSince=26)>]
static member Year : Java.Time.Temporal.ChronoField

Property Value

Attributes

Remarks

The proleptic year, such as 2012. This represents the concept of the year, counting sequentially and using negative numbers. The proleptic year is not interpreted in terms of the era. See YEAR_OF_ERA for an example showing the mapping from proleptic year to year-of-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_OF_ERA is used depends on which mental model is being used. See ChronoLocalDate for more discussion on this topic. Non-ISO calendar systems should implement this field as follows. If the calendar system has only two eras, before and after a fixed date, then the proleptic-year value must be the same as the year-of-era value for the later era, and increasingly negative for the earlier era. If the calendar system has more than two eras, then the proleptic-year value may be defined with any appropriate value, although defining it to be the same as ISO may be the best option.

Java reference for java.time.temporal.ChronoField.YEAR.

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.

Applies to