com.ibm.icu.util
public class BuddhistCalendar extends GregorianCalendar
BuddhistCalendar
is a subclass of GregorianCalendar
that numbers years since the birth of the Buddha. This is the civil calendar
in some predominantly Buddhist countries such as Thailand, and it is used for
religious purposes elsewhere.
The Buddhist calendar is identical to the Gregorian calendar in all respects except for the year and era. Years are numbered since the birth of the Buddha in 543 BC (Gregorian), so that 1 AD (Gregorian) is equivalent to 544 BE (Buddhist Era) and 1998 AD is 2541 BE.
The Buddhist Calendar has only one allowable era: BE
. If the
calendar is not in lenient mode (see setLenient
), dates before
1/1/1 BE are rejected with an IllegalArgumentException
.
This class should not be subclassed.
BuddhistCalendar usually should be instantiated using
getInstance passing in a ULocale
with the tag "@calendar=buddhist"
.
See Also: Calendar
UNKNOWN: ICU 2.8
Field Summary | |
---|---|
static int | BE
Constant for the Buddhist Era. |
Constructor Summary | |
---|---|
BuddhistCalendar()
Constructs a BuddhistCalendar using the current time
in the default time zone with the default locale. | |
BuddhistCalendar(TimeZone zone)
Constructs a BuddhistCalendar based on the current time
in the given time zone with the default locale.
| |
BuddhistCalendar(Locale aLocale)
Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale.
| |
BuddhistCalendar(ULocale locale)
Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale.
| |
BuddhistCalendar(TimeZone zone, Locale aLocale)
Constructs a BuddhistCalendar based on the current time
in the given time zone with the given locale.
| |
BuddhistCalendar(TimeZone zone, ULocale locale)
Constructs a BuddhistCalendar based on the current time
in the given time zone with the given locale.
| |
BuddhistCalendar(Date date)
Constructs a BuddhistCalendar with the given date set
in the default time zone with the default locale.
| |
BuddhistCalendar(int year, int month, int date)
Constructs a BuddhistCalendar with the given date set
in the default time zone with the default locale.
| |
BuddhistCalendar(int year, int month, int date, int hour, int minute, int second)
Constructs a BuddhistCalendar with the given date
and time set for the default time zone with the default locale.
|
Method Summary | |
---|---|
String | getType()
Return the current Calendar type. |
protected void | handleComputeFields(int julianDay) |
protected int | handleComputeMonthStart(int eyear, int month, boolean useMonth) |
protected int | handleGetExtendedYear() |
protected int | handleGetLimit(int field, int limitType)
Override GregorianCalendar. |
ERA
value for the Buddhist calendar.
See Also: ERA
UNKNOWN: ICU 2.8
BuddhistCalendar
using the current time
in the default time zone with the default locale.UNKNOWN: ICU 2.8
BuddhistCalendar
based on the current time
in the given time zone with the default locale.
Parameters: zone the given time zone.
UNKNOWN: ICU 2.8
BuddhistCalendar
based on the current time
in the default time zone with the given locale.
Parameters: aLocale the given locale.
UNKNOWN: ICU 2.8
BuddhistCalendar
based on the current time
in the default time zone with the given locale.
Parameters: locale the given ulocale.
UNKNOWN: ICU 3.2 This API might change or be removed in a future release.
BuddhistCalendar
based on the current time
in the given time zone with the given locale.
Parameters: zone the given time zone. aLocale the given locale.
UNKNOWN: ICU 2.8
BuddhistCalendar
based on the current time
in the given time zone with the given locale.
Parameters: zone the given time zone. locale the given ulocale.
UNKNOWN: ICU 3.2 This API might change or be removed in a future release.
BuddhistCalendar
with the given date set
in the default time zone with the default locale.
Parameters: date The date to which the new calendar is set.
UNKNOWN: ICU 2.8
BuddhistCalendar
with the given date set
in the default time zone with the default locale.
Parameters: year The value used to set the calendar's YEAR
time field.
month The value used to set the calendar's MONTH
time field.
The value is 0-based. e.g., 0 for January.
date The value used to set the calendar's DATE
time field.
UNKNOWN: ICU 2.8
Parameters: year The value used to set the calendar's YEAR
time field.
month The value used to set the calendar's MONTH
time field.
The value is 0-based. e.g., 0 for January.
date The value used to set the calendar's DATE
time field.
hour The value used to set the calendar's HOUR_OF_DAY
time field.
minute The value used to set the calendar's MINUTE
time field.
second The value used to set the calendar's SECOND
time field.
UNKNOWN: ICU 2.8
Deprecated: This API is ICU internal only.
Return the current Calendar type.Returns: type of calendar (gregorian, etc.)
UNKNOWN: ICU 3.0
UNKNOWN: ICU 2.8
UNKNOWN: ICU 2.8
UNKNOWN: ICU 2.8
UNKNOWN: ICU 2.8