The Thai Buddhist calendar system has two eras. The current era, for years from 1 onwards, is known as the 'Buddhist' 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 Buddhist' era.
year-of-era | era | proleptic-year | ISO proleptic-year |
---|---|---|---|
2 | BE | 2 | -542 |
1 | BE | 1 | -543 |
1 | BEFORE_BE | 0 | -544 |
2 | BEFORE_BE | -1 | -545 |
Do not use ordinal()
to obtain the numeric representation of ThaiBuddhistEra
.
Use getValue()
instead.
Implementation Specification
This is an immutable and thread-safe enum.
Modifier and Type | Field and Description |
---|---|
public static final ThaiBuddhistEra | BE
The singleton instance for the current era, 'Buddhist Era', which has the numeric value 1. |
public static final ThaiBuddhistEra | BEFORE_BE
The singleton instance for the era before the current one, 'Before Buddhist Era', which has the numeric value 0. |
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_BE) to 1 (BE)Implements java. Gets the numeric era |
public static ThaiBuddhistEra | Returns: the BuddhistEra singleton, never nullthe era to represent, from 0 to 1 thaiBuddhistEra)Obtains an instance of |
public static ThaiBuddhistEra | |
public static ThaiBuddhistEra[] |
BE | back to summary |
---|---|
public static final ThaiBuddhistEra BE The singleton instance for the current era, 'Buddhist Era', which has the numeric value 1. |
BEFORE_BE | back to summary |
---|---|
public static final ThaiBuddhistEra BEFORE_BE The singleton instance for the era before the current one, 'Before Buddhist Era', which has the numeric value 0. |
ThaiBuddhistEra | back to summary |
---|---|
private ThaiBuddhistEra() |
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_BE has the value 0, while the era BE has the value 1.
|
of | back to summary |
---|---|
public static ThaiBuddhistEra of(int thaiBuddhistEra) Obtains an instance of
|
valueOf | back to summary |
---|---|
public static ThaiBuddhistEra valueOf(String name) |
values | back to summary |
---|---|
public static ThaiBuddhistEra[] values() |