Udostępnij za pośrednictwem


AbstractChronology.EraOf(Int32) Method

Definition

Creates the chronology era object from the numeric value.

[Android.Runtime.Register("eraOf", "(I)Ljava/time/chrono/Era;", "GetEraOf_IHandler", ApiSince=26)]
public abstract Java.Time.Chrono.IEra? EraOf (int eraValue);
[<Android.Runtime.Register("eraOf", "(I)Ljava/time/chrono/Era;", "GetEraOf_IHandler", ApiSince=26)>]
abstract member EraOf : int -> Java.Time.Chrono.IEra

Parameters

eraValue
Int32

the era value

Returns

the calendar system era, not null

Implements

Attributes

Remarks

Creates the chronology era object from the numeric value.

The era is, conceptually, the largest division of the time-line. Most calendar systems have a single epoch dividing the time-line into two eras. However, some have multiple eras, such as one for the reign of each leader. The exact meaning is determined by the chronology according to the following constraints.

The era in use at 1970-01-01 must have the value 1. Later eras must have sequentially higher values. Earlier eras must have sequentially lower values. Each chronology must refer to an enum or similar singleton to provide the era values.

This method returns the singleton era of the correct type for the specified era value.

Java documentation for java.time.chrono.Chronology.eraOf(int).

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