The Minguo calendar system has two eras. The current era, for years from 1 onwards, is known as the 'Republic of China' era. All previous years, zero or earlier in the proleptic count or one and greater in the year-of-era count, are part of the 'Before Republic of China' era.
year-of-era | era | proleptic-year | ISO proleptic-year |
---|---|---|---|
2 | ROC | 2 | 1913 |
1 | ROC | 1 | 1912 |
1 | BEFORE_ROC | 0 | 1911 |
2 | BEFORE_ROC | -1 | 1910 |
Do not use ordinal()
to obtain the numeric representation of MinguoEra
.
Use getValue()
instead.
Implementation Specification
This is an immutable and thread-safe enum.
Modifier and Type | Field and Description |
---|---|
public static final MinguoEra | BEFORE_ROC
The singleton instance for the era before the current one, 'Before Republic of China Era', which has the numeric value 0. |
public static final MinguoEra | ROC
The singleton instance for the current era, 'Republic of China Era', which has the numeric value 1. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public String | getDisplayName(TextStyle
the style of the text required, not null style, Locale the locale to use, not null locale)Overrides default java. Gets the textual representation of this era. |
public int | Returns: the era value, from 0 (BEFORE_ROC) to 1 (ROC)Implements java. Gets the numeric era |
public static MinguoEra | Returns: the era singleton, not nullthe BEFORE_ROC/ROC value to represent, from 0 (BEFORE_ROC) to 1 (ROC) minguoEra)Obtains an instance of |
public static MinguoEra | |
public static MinguoEra[] |
BEFORE_ROC | back to summary |
---|---|
public static final MinguoEra BEFORE_ROC The singleton instance for the era before the current one, 'Before Republic of China Era', which has the numeric value 0. |
ROC | back to summary |
---|---|
public static final MinguoEra ROC The singleton instance for the current era, 'Republic of China Era', which has the numeric value 1. |
MinguoEra | back to summary |
---|---|
private MinguoEra() |
getDisplayName | back to summary |
---|---|
public String getDisplayName(TextStyle style, Locale locale) Overrides default java. Doc from java. Gets the textual representation of this era. This returns the textual name used to identify the era, suitable for presentation to the user. The parameters control the style of the returned text and the locale.
If no textual mapping is found then the |
getValue | back to summary |
---|---|
public int getValue() Implements java. Gets the numeric era The era BEFORE_ROC has the value 0, while the era ROC has the value 1.
|
of | back to summary |
---|---|
public static MinguoEra of(int minguoEra) Obtains an instance of
|
valueOf | back to summary |
---|---|
public static MinguoEra valueOf(String name) |
values | back to summary |
---|---|
public static MinguoEra[] values() |