Udostępnij za pośrednictwem


JapaneseEra.Of(Int32) Method

Definition

Obtains an instance of JapaneseEra from an int value.

[Android.Runtime.Register("of", "(I)Ljava/time/chrono/JapaneseEra;", "", ApiSince=26)]
public static Java.Time.Chrono.JapaneseEra? Of (int japaneseEra);
[<Android.Runtime.Register("of", "(I)Ljava/time/chrono/JapaneseEra;", "", ApiSince=26)>]
static member Of : int -> Java.Time.Chrono.JapaneseEra

Parameters

japaneseEra
Int32

the era to represent

Returns

the JapaneseEra singleton, not null

Attributes

Remarks

Obtains an instance of JapaneseEra from an int value. <ul> <li>The value 1 is associated with the 'Showa' era, because it contains 1970-01-01 (ISO calendar system).</li> <li>The values -1 and 0 are associated with two earlier eras, Meiji and Taisho, respectively.</li> <li>A value greater than 1 is associated with a later era, beginning with Heisei (2).</li> </ul>

Every instance of JapaneseEra that is returned from the #values() method has an int value (available via Era#getValue() which is accepted by this method.

Java documentation for java.time.chrono.JapaneseEra.of(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