public enum ThaiSolarEra extends java.lang.Enum<ThaiSolarEra> implements CalendarEra
The Thai-Solar calendar supports two eras related to either the Rattanakosin kingdom (historic) or to the date of death of Buddha (used today).
| Enum Constant and Description |
|---|
BUDDHIST
Standard era where users add 543 years to the gregorian AD-year in order to get the buddhist year counting.
|
RATTANAKOSIN
The Rattanakosin era started counting of years on 6th of April in 1782 and was decreed by
king Rama V in year 1888 and used until the calendar reform of king Rama VI in year 1912.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDisplayName(java.util.Locale locale)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE). |
java.lang.String |
getDisplayName(java.util.Locale locale,
TextWidth width)
Gets the description text dependent on the locale and style
parameters.
|
int |
getValue()
Yields an ordinal number which is scaled such that every era
which contains the ISO-date of UTC-epoch [1972-01-01] will have
the associated value
1. |
int |
getYear(CalendarDate date)
Determines the Thai year corresponding to given calendar date.
|
static ThaiSolarEra |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ThaiSolarEra[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOfnamepublic static final ThaiSolarEra RATTANAKOSIN
public static final ThaiSolarEra BUDDHIST
public static ThaiSolarEra[] values()
for (ThaiSolarEra c : ThaiSolarEra.values()) System.out.println(c);
public static ThaiSolarEra valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int getValue()
CalendarEraYields an ordinal number which is scaled such that every era
which contains the ISO-date of UTC-epoch [1972-01-01] will have
the associated value 1.
Attention: This number is neither necessarily unique nor does it imply any chronological order.
getValue in interface CalendarErapublic java.lang.String getDisplayName(java.util.Locale locale)
Equivalent to the expression getDisplayName(locale, TextWidth.WIDE).
locale - language settingnull)getDisplayName(Locale, TextWidth)public java.lang.String getDisplayName(java.util.Locale locale,
TextWidth width)
Gets the description text dependent on the locale and style parameters.
The second argument controls the width of description.
locale - language settingwidth - text widthnull)public int getYear(CalendarDate date)
Determines the Thai year corresponding to given calendar date.
date - calendar date of any typejava.lang.IllegalArgumentException - if the resulting year would become zero or negative