public enum ThaiSolarEra extends 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 |
|---|---|
String |
getDisplayName(Locale locale)
Equivalent to the expression
getDisplayName(locale, TextWidth.WIDE). |
String |
getDisplayName(Locale locale,
TextWidth width)
Gets the description text dependent on the locale and style
parameters.
|
int |
getYear(CalendarDate date)
Determines the Thai year corresponding to given calendar date.
|
static ThaiSolarEra |
valueOf(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(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getDisplayName(Locale locale)
Equivalent to the expression getDisplayName(locale, TextWidth.WIDE).
locale - language settingnull)getDisplayName(Locale, TextWidth)public String getDisplayName(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 typeIllegalArgumentException - if the resulting year would become zero or negativeCopyright © 2014–2021. All rights reserved.