| java.lang.Object com.ibm.icu.util.Calendar com.ibm.icu.util.GregorianCalendar com.ibm.icu.util.BuddhistCalendar
BuddhistCalendar | public class BuddhistCalendar extends GregorianCalendar (Code) | | 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
com.ibm.icu.util.Calendar.getInstance(ULocale) passing in a ULocale
with the tag "@calendar=buddhist" .
See Also: com.ibm.icu.util.Calendar See Also: com.ibm.icu.util.GregorianCalendar author: Laura Werner author: Alan Liu |
Field Summary | |
final public static int | BE Constant for the Buddhist Era. |
Constructor Summary | |
public | BuddhistCalendar() Constructs a BuddhistCalendar using the current time
in the default time zone with the default locale. | public | BuddhistCalendar(TimeZone zone) Constructs a BuddhistCalendar based on the current time
in the given time zone with the default locale. | public | BuddhistCalendar(Locale aLocale) Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale. | public | BuddhistCalendar(ULocale locale) Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale. | public | BuddhistCalendar(TimeZone zone, Locale aLocale) Constructs a BuddhistCalendar based on the current time
in the given time zone with the given locale. | public | BuddhistCalendar(TimeZone zone, ULocale locale) Constructs a BuddhistCalendar based on the current time
in the given time zone with the given locale. | public | BuddhistCalendar(Date date) Constructs a BuddhistCalendar with the given date set
in the default time zone with the default locale. | public | BuddhistCalendar(int year, int month, int date) Constructs a 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 BuddhistCalendar.YEAR YEAR time field. Parameters: month - The value used to set the calendar's BuddhistCalendar.MONTH MONTH time field.The value is 0-based. | public | 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.
Parameters: year - The value used to set the calendar's BuddhistCalendar.YEAR YEAR time field. Parameters: month - The value used to set the calendar's BuddhistCalendar.MONTH MONTH time field.The value is 0-based. |
BuddhistCalendar | public BuddhistCalendar()(Code) | | Constructs a BuddhistCalendar using the current time
in the default time zone with the default locale.
|
BuddhistCalendar | public BuddhistCalendar(TimeZone zone)(Code) | | Constructs a BuddhistCalendar based on the current time
in the given time zone with the default locale.
Parameters: zone - the given time zone. |
BuddhistCalendar | public BuddhistCalendar(Locale aLocale)(Code) | | Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale.
Parameters: aLocale - the given locale. |
BuddhistCalendar | public BuddhistCalendar(ULocale locale)(Code) | | Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale.
Parameters: locale - the given ulocale. |
BuddhistCalendar | public BuddhistCalendar(TimeZone zone, Locale aLocale)(Code) | | Constructs a BuddhistCalendar based on the current time
in the given time zone with the given locale.
Parameters: zone - the given time zone. Parameters: aLocale - the given locale. |
BuddhistCalendar | public BuddhistCalendar(TimeZone zone, ULocale locale)(Code) | | Constructs a BuddhistCalendar based on the current time
in the given time zone with the given locale.
Parameters: zone - the given time zone. Parameters: locale - the given ulocale. |
BuddhistCalendar | public BuddhistCalendar(Date date)(Code) | | Constructs a 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. |
BuddhistCalendar | public BuddhistCalendar(int year, int month, int date)(Code) | | Constructs a 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 BuddhistCalendar.YEAR YEAR time field. Parameters: month - The value used to set the calendar's BuddhistCalendar.MONTH MONTH time field.The value is 0-based. e.g., 0 for January. Parameters: date - The value used to set the calendar's BuddhistCalendar.DATE DATE time field. |
BuddhistCalendar | public BuddhistCalendar(int year, int month, int date, int hour, int minute, int second)(Code) | | Constructs a BuddhistCalendar with the given date
and time set for the default time zone with the default locale.
Parameters: year - The value used to set the calendar's BuddhistCalendar.YEAR YEAR time field. Parameters: month - The value used to set the calendar's BuddhistCalendar.MONTH MONTH time field.The value is 0-based. e.g., 0 for January. Parameters: date - The value used to set the calendar's BuddhistCalendar.DATE DATE time field. Parameters: hour - The value used to set the calendar's BuddhistCalendar.HOUR_OF_DAY HOUR_OF_DAY time field. Parameters: minute - The value used to set the calendar's BuddhistCalendar.MINUTE MINUTE time field. Parameters: second - The value used to set the calendar's BuddhistCalendar.SECOND SECOND time field. |
getType | public String getType()(Code) | | Return the current Calendar type.
type of calendar (gregorian, etc.) |
handleComputeFields | protected void handleComputeFields(int julianDay)(Code) | | |
handleComputeMonthStart | protected int handleComputeMonthStart(int eyear, int month, boolean useMonth)(Code) | | |
handleGetExtendedYear | protected int handleGetExtendedYear()(Code) | | |
handleGetLimit | protected int handleGetLimit(int field, int limitType)(Code) | | Override GregorianCalendar. There is only one Buddhist ERA. We
should really handle YEAR, YEAR_WOY, and EXTENDED_YEAR here too to
implement the 1..5000000 range, but it's not critical.
|
Methods inherited from com.ibm.icu.util.Calendar | public void add(int field, int amount)(Code)(Java Doc) public boolean after(Object when)(Code)(Java Doc) public boolean before(Object when)(Code)(Java Doc) final public void clear()(Code)(Java Doc) final public void clear(int field)(Code)(Java Doc) public Object clone()(Code)(Java Doc) public int compareTo(Calendar that)(Code)(Java Doc) public int compareTo(Object that)(Code)(Java Doc) protected void complete()(Code)(Java Doc) protected void computeFields()(Code)(Java Doc) final protected void computeGregorianFields(int julianDay)(Code)(Java Doc) protected int computeGregorianMonthStart(int year, int month)(Code)(Java Doc) protected int computeJulianDay()(Code)(Java Doc) protected int computeMillisInDay()(Code)(Java Doc) protected void computeTime()(Code)(Java Doc) protected int computeZoneOffset(long millis, int millisInDay)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public int fieldDifference(Date when, int field)(Code)(Java Doc) protected String fieldName(int field)(Code)(Java Doc) final protected static long floorDivide(long numerator, long denominator)(Code)(Java Doc) final protected static int floorDivide(int numerator, int denominator)(Code)(Java Doc) final protected static int floorDivide(int numerator, int denominator, int[] remainder)(Code)(Java Doc) final protected static int floorDivide(long numerator, int denominator, int[] remainder)(Code)(Java Doc) final public int get(int field)(Code)(Java Doc) public int getActualMaximum(int field)(Code)(Java Doc) public int getActualMinimum(int field)(Code)(Java Doc) public static Locale[] getAvailableLocales()(Code)(Java Doc) public static ULocale[] getAvailableULocales()(Code)(Java Doc) static Set getCalendarFactoryNames()(Code)(Java Doc) public DateFormat getDateTimeFormat(int dateStyle, int timeStyle, Locale loc)(Code)(Java Doc) public DateFormat getDateTimeFormat(int dateStyle, int timeStyle, ULocale loc)(Code)(Java Doc) public int getDayOfWeekType(int dayOfWeek)(Code)(Java Doc) protected int getDefaultDayInMonth(int extendedYear, int month)(Code)(Java Doc) protected int getDefaultMonthInYear(int extendedYear)(Code)(Java Doc) public String getDisplayName(Locale loc)(Code)(Java Doc) public String getDisplayName(ULocale loc)(Code)(Java Doc) final public int getFieldCount()(Code)(Java Doc) protected int[][][] getFieldResolutionTable()(Code)(Java Doc) public int getFirstDayOfWeek()(Code)(Java Doc) final public int getGreatestMinimum(int field)(Code)(Java Doc) final protected int getGregorianDayOfMonth()(Code)(Java Doc) final protected int getGregorianDayOfYear()(Code)(Java Doc) final protected int getGregorianMonth()(Code)(Java Doc) final protected int getGregorianYear()(Code)(Java Doc) public static synchronized Calendar getInstance()(Code)(Java Doc) public static synchronized Calendar getInstance(TimeZone zone)(Code)(Java Doc) public static synchronized Calendar getInstance(Locale aLocale)(Code)(Java Doc) public static synchronized Calendar getInstance(ULocale locale)(Code)(Java Doc) public static synchronized Calendar getInstance(TimeZone zone, Locale aLocale)(Code)(Java Doc) public static synchronized Calendar getInstance(TimeZone zone, ULocale locale)(Code)(Java Doc) static synchronized Calendar getInstance(TimeZone zone, ULocale locale, String factoryName)(Code)(Java Doc) final public int getLeastMaximum(int field)(Code)(Java Doc) protected int getLimit(int field, int limitType)(Code)(Java Doc) final public ULocale getLocale(ULocale.Type type)(Code)(Java Doc) final public int getMaximum(int field)(Code)(Java Doc) public int getMinimalDaysInFirstWeek()(Code)(Java Doc) final public int getMinimum(int field)(Code)(Java Doc) final protected int getStamp(int field)(Code)(Java Doc) final public Date getTime()(Code)(Java Doc) public long getTimeInMillis()(Code)(Java Doc) public TimeZone getTimeZone()(Code)(Java Doc) public String getType()(Code)(Java Doc) public int getWeekendTransition(int dayOfWeek)(Code)(Java Doc) final protected static int gregorianMonthLength(int y, int m)(Code)(Java Doc) final protected static int gregorianPreviousMonthLength(int y, int m)(Code)(Java Doc) protected void handleComputeFields(int julianDay)(Code)(Java Doc) protected int handleComputeJulianDay(int bestField)(Code)(Java Doc) abstract protected int handleComputeMonthStart(int eyear, int month, boolean useMonth)(Code)(Java Doc) protected int[] handleCreateFields()(Code)(Java Doc) protected DateFormat handleGetDateFormat(String pattern, Locale locale)(Code)(Java Doc) protected DateFormat handleGetDateFormat(String pattern, ULocale locale)(Code)(Java Doc) abstract protected int handleGetExtendedYear()(Code)(Java Doc) abstract protected int handleGetLimit(int field, int limitType)(Code)(Java Doc) protected int handleGetMonthLength(int extendedYear, int month)(Code)(Java Doc) protected int handleGetYearLength(int eyear)(Code)(Java Doc) public int hashCode()(Code)(Java Doc) final protected int internalGet(int field)(Code)(Java Doc) final protected int internalGet(int field, int defaultValue)(Code)(Java Doc) final protected long internalGetTimeInMillis()(Code)(Java Doc) final protected void internalSet(int field, int value)(Code)(Java Doc) public boolean isEquivalentTo(Calendar other)(Code)(Java Doc) final protected static boolean isGregorianLeapYear(int year)(Code)(Java Doc) public boolean isLenient()(Code)(Java Doc) final public boolean isSet(int field)(Code)(Java Doc) public boolean isWeekend(Date date)(Code)(Java Doc) public boolean isWeekend()(Code)(Java Doc) final protected static int julianDayToDayOfWeek(int julian)(Code)(Java Doc) final protected static long julianDayToMillis(int julian)(Code)(Java Doc) final protected static int millisToJulianDay(long millis)(Code)(Java Doc) protected int newerField(int defaultField, int alternateField)(Code)(Java Doc) protected int newestStamp(int first, int last, int bestStampSoFar)(Code)(Java Doc) protected void pinField(int field)(Code)(Java Doc) protected void prepareGetActual(int field, boolean isMinimum)(Code)(Java Doc) static Object register(CalendarFactory factory, ULocale locale)(Code)(Java Doc) static Object register(CalendarFactory factory, ULocale locale, boolean visible)(Code)(Java Doc) protected int resolveFields(int[][][] precedenceTable)(Code)(Java Doc) final public void roll(int field, boolean up)(Code)(Java Doc) public void roll(int field, int amount)(Code)(Java Doc) final public void set(int field, int value)(Code)(Java Doc) final public void set(int year, int month, int date)(Code)(Java Doc) final public void set(int year, int month, int date, int hour, int minute)(Code)(Java Doc) final public void set(int year, int month, int date, int hour, int minute, int second)(Code)(Java Doc) public void setFirstDayOfWeek(int value)(Code)(Java Doc) public void setLenient(boolean lenient)(Code)(Java Doc) final void setLocale(ULocale valid, ULocale actual)(Code)(Java Doc) public void setMinimalDaysInFirstWeek(int value)(Code)(Java Doc) final public void setTime(Date date)(Code)(Java Doc) public void setTimeInMillis(long millis)(Code)(Java Doc) public void setTimeZone(TimeZone value)(Code)(Java Doc) public String toString()(Code)(Java Doc) static boolean unregister(Object registryKey)(Code)(Java Doc) protected void validateField(int field)(Code)(Java Doc) final protected void validateField(int field, int min, int max)(Code)(Java Doc) protected void validateFields()(Code)(Java Doc) protected int weekNumber(int desiredDay, int dayOfPeriod, int dayOfWeek)(Code)(Java Doc) final protected int weekNumber(int dayOfPeriod, int dayOfWeek)(Code)(Java Doc)
|
|
|