|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.icu.util.Calendar
com.ibm.icu.util.GregorianCalendar
com.ibm.icu.util.BuddhistCalendar
public class BuddhistCalendar
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
Calendar.getInstance(ULocale) passing in a ULocale
with the tag "@calendar=buddhist".
Calendar,
GregorianCalendar,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.ibm.icu.util.Calendar |
|---|
Calendar.FormatConfiguration |
| Field Summary | |
|---|---|
static int |
BE
Constant for the Buddhist Era. |
| Fields inherited from class com.ibm.icu.util.GregorianCalendar |
|---|
AD, BC, invertGregorian, isGregorian |
| Fields inherited from class com.ibm.icu.util.Calendar |
|---|
AM, AM_PM, APRIL, AUGUST, BASE_FIELD_COUNT, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DOW_LOCAL, DST_OFFSET, EPOCH_JULIAN_DAY, ERA, EXTENDED_YEAR, FEBRUARY, FRIDAY, GREATEST_MINIMUM, HOUR, HOUR_OF_DAY, INTERNALLY_SET, IS_LEAP_MONTH, JAN_1_1_JULIAN_DAY, JANUARY, JULIAN_DAY, JULY, JUNE, LEAST_MAXIMUM, MARCH, MAX_DATE, MAX_FIELD_COUNT, MAX_JULIAN, MAX_MILLIS, MAXIMUM, MAY, MILLISECOND, MILLISECONDS_IN_DAY, MIN_DATE, MIN_JULIAN, MIN_MILLIS, MINIMUM, MINIMUM_USER_STAMP, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, PM, RESOLVE_REMAP, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, UNSET, WALLTIME_FIRST, WALLTIME_LAST, WALLTIME_NEXT_VALID, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEKDAY, WEEKEND, WEEKEND_CEASE, WEEKEND_ONSET, YEAR, YEAR_WOY, ZONE_OFFSET |
| Constructor Summary | |
|---|---|
BuddhistCalendar()
Constructs a BuddhistCalendar using the current time
in the default time zone with the default 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. |
|
BuddhistCalendar(Locale aLocale)
Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale. |
|
BuddhistCalendar(TimeZone zone)
Constructs a BuddhistCalendar based on the current time
in the given time zone with the default 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(ULocale locale)
Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale. |
|
| Method Summary | |
|---|---|
String |
getType()
[icu] Returns the calendar type name string for this Calendar object. |
protected void |
handleComputeFields(int julianDay)
Override Calendar to compute several fields specific to the hybrid Gregorian-Julian calendar system. |
protected int |
handleComputeMonthStart(int eyear,
int month,
boolean useMonth)
Return JD of start of given month/year |
protected int |
handleGetExtendedYear()
Returns the extended year defined by the current fields. |
protected int |
handleGetLimit(int field,
int limitType)
Override GregorianCalendar. |
| Methods inherited from class com.ibm.icu.util.GregorianCalendar |
|---|
getActualMaximum, getActualMinimum, getGregorianChange, handleComputeJulianDay, handleGetMonthLength, handleGetYearLength, hashCode, isEquivalentTo, isLeapYear, roll, setGregorianChange |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int BE
ERA
value for the Buddhist calendar.
Calendar.ERA,
Constant Field Values| Constructor Detail |
|---|
public BuddhistCalendar()
BuddhistCalendar using the current time
in the default time zone with the default locale.
public BuddhistCalendar(TimeZone zone)
BuddhistCalendar based on the current time
in the given time zone with the default locale.
zone - the given time zone.public BuddhistCalendar(Locale aLocale)
BuddhistCalendar based on the current time
in the default time zone with the given locale.
aLocale - the given locale.public BuddhistCalendar(ULocale locale)
BuddhistCalendar based on the current time
in the default time zone with the given locale.
locale - the given ulocale.
public BuddhistCalendar(TimeZone zone,
Locale aLocale)
BuddhistCalendar based on the current time
in the given time zone with the given locale.
zone - the given time zone.aLocale - the given locale.
public BuddhistCalendar(TimeZone zone,
ULocale locale)
BuddhistCalendar based on the current time
in the given time zone with the given locale.
zone - the given time zone.locale - the given ulocale.public BuddhistCalendar(Date date)
BuddhistCalendar with the given date set
in the default time zone with the default locale.
date - The date to which the new calendar is set.
public BuddhistCalendar(int year,
int month,
int date)
BuddhistCalendar with the given date set
in the default time zone with the default locale.
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.
public BuddhistCalendar(int year,
int month,
int date,
int hour,
int minute,
int second)
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.| Method Detail |
|---|
protected int handleGetExtendedYear()
Calendar
handleGetExtendedYear in class GregorianCalendar
protected int handleComputeMonthStart(int eyear,
int month,
boolean useMonth)
GregorianCalendar
handleComputeMonthStart in class GregorianCalendareyear - the extended yearmonth - the zero-based month, or 0 if useMonth is falseuseMonth - if false, compute the day before the first day of
the given year, otherwise, compute the day before the first day of
the given month
protected void handleComputeFields(int julianDay)
GregorianCalendar
handleComputeFields in class GregorianCalendar
protected int handleGetLimit(int field,
int limitType)
handleGetLimit in class GregorianCalendarfield - one of the above field numberslimitType - one of MINIMUM, GREATEST_MINIMUM,
LEAST_MAXIMUM, or MAXIMUMpublic String getType()
See type="old type name" for the calendar attribute of locale IDs at http://www.unicode.org/reports/tr35/#Key_Type_Definitions
getType in class GregorianCalendar
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||