public enum HinduEra extends Enum<HinduEra> implements CalendarEra
The Hindu calendar supports several eras in different regions of Indian subcontinent.
| Enum Constant and Description |
|---|
BENGAL
The onset of this era mainly used in West Bengal is 515 years after Saka.
|
KALI_YUGA
The onset of this ancient era (iron age) is 3179 years before Saka.
|
KOLLAM
The onset of this era mainly used in Kerala (part of Malayalam calendar) is 900 years before Saka.
|
NEPALESE
The onset of this era mainly used in Nepal is 955 years before Saka.
|
SAKA
The onset of this era is in gregorian year +78.
|
VIKRAMA
The onset of this era mainly used in Northern India is 135 years before Saka.
|
| 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.
|
static HinduEra |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HinduEra[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
int |
yearOfEra(HinduEra era,
int yearOfEra)
Scales given year of era to another year related to this era.
|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOfnamepublic static final HinduEra KALI_YUGA
public static final HinduEra NEPALESE
public static final HinduEra KOLLAM
public static final HinduEra VIKRAMA
public static final HinduEra SAKA
public static final HinduEra BENGAL
public static HinduEra[] values()
for (HinduEra c : HinduEra.values()) System.out.println(c);
public static HinduEra 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 yearOfEra(HinduEra era, int yearOfEra)
Scales given year of era to another year related to this era.
era - era reference of given yearyearOfEra - year reckoned in given eraIllegalArgumentException - if numerical overflow occursCopyright © 2014–2021. All rights reserved.