TaiwanCalendar is a subclass of GregorianCalendar
that numbers years since 1912.
The Taiwan calendar is identical to the Gregorian calendar in all respects except for the year and era. Years are numbered since 1912 AD (Gregorian).
The Taiwan Calendar has one era: MINGUO.
This class should not be subclassed.
TaiwanCalendar usually should be instantiated using
com. passing in a ULocale
with the tag "@calendar=roc".
com.ibm.icu.util.Calendar , com.ibm.icu.util.GregorianCalendar
| Modifier and Type | Field and Description |
|---|---|
| public static final int | BEFORE_MINGUO
Constant for the Taiwan Era for years before Minguo 1. |
| private static final int | |
| public static final int | MINGUO
Constant for the Taiwan Era for Minguo. |
| private static final long | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | TaiwanCalendar()
Constructs a |
| public | TaiwanCalendar(TimeZone
the given time zone. zone)Constructs a |
| public | TaiwanCalendar(Locale
the given locale. aLocale)Constructs a |
| public | TaiwanCalendar(ULocale
the given ulocale. locale)Constructs a |
| public | TaiwanCalendar(TimeZone
the given time zone. zone, Locale aLocale)Constructs a |
| public | TaiwanCalendar(TimeZone
the given time zone. zone, ULocale the given ulocale. locale)Constructs a |
| public | TaiwanCalendar(Date
The date to which the new calendar is set. date)Constructs a |
| public | TaiwanCalendar(int
The value used to set the calendar's year, int YEAR time field.The value used to set the calendar's month, int MONTH time field.
The value is 0-based. e.g., 0 for January.The value used to set the calendar's date)DATE time field.Constructs a |
| public | TaiwanCalendar(int
The value used to set the calendar's year, int YEAR time field.The value used to set the calendar's month, int MONTH time field.
The value is 0-based. e.g., 0 for January.The value used to set the calendar's date, int DATE time field.The value used to set the calendar's hour, int HOUR_OF_DAY time field.The value used to set the calendar's minute, int MINUTE time field.The value used to set the calendar's second)SECOND time field.Constructs a TaiwanCalendar with the given date and time set for the default time zone with the default locale. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| protected void | handleComputeFields(int julianDay)
Overrides com. |
| protected int | handleGetExtendedYear()
Overrides com. |
| protected int | handleGetLimit(int
one of the above field numbers field, int one of limitType)MINIMUM, GREATEST_MINIMUM,
LEAST_MAXIMUM, or MAXIMUMOverrides com. |
| BEFORE_MINGUO | back to summary |
|---|---|
| public static final int BEFORE_MINGUO Constant for the Taiwan Era for years before Minguo 1. Before Minuo 1 is Gregorian 1911, Before Minguo 2 is Gregorian 1910 and so on.
| |
| GREGORIAN_EPOCH | back to summary |
|---|---|
| private static final int GREGORIAN_EPOCH | |
| MINGUO | back to summary |
|---|---|
| public static final int MINGUO Constant for the Taiwan Era for Minguo. Minguo 1 is 1912 in Gregorian calendar.
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Taiwan_ERA_START | back to summary |
|---|---|
| private static final int Taiwan_ERA_START | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar() Constructs a
| |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(TimeZone zone) Constructs a | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(Locale aLocale) Constructs a | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(ULocale locale) Constructs a | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(TimeZone zone, Locale aLocale) Constructs a | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(TimeZone zone, ULocale locale) Constructs a | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(Date date) Constructs a | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(int year, int month, int date) Constructs a | |
| TaiwanCalendar | back to summary |
|---|---|
| public TaiwanCalendar(int year, int month, int date, int hour, int minute, int second) Constructs a TaiwanCalendar with the given date and time set for the default time zone with the default locale.
| |
| getType | back to summary |
|---|---|
| public String getType() Overrides com. Doc from com. ICU See type="old type name" for the calendar attribute of locale IDs at http://www.unicode.org/reports/tr35/#Key_Type_Definitions
| |
| handleComputeFields | back to summary |
|---|---|
| protected void handleComputeFields(int julianDay) Overrides com. Doc from com. Override Calendar to compute several fields specific to the hybrid Gregorian-Julian calendar system. These are:
| |
| handleGetExtendedYear | back to summary |
|---|---|
| protected int handleGetExtendedYear() Overrides com. Doc from com. Returns the extended year defined by the current fields. This will use the EXTENDED_YEAR field or the YEAR and supra-year fields (such as ERA) specific to the calendar system, depending on which set of fields is newer.
| |
| handleGetLimit | back to summary |
|---|---|
| protected int handleGetLimit(int field, int limitType) Overrides com. Override GregorianCalendar. There is only one Taiwan ERA. We should really handle YEAR, YEAR_WOY, and EXTENDED_YEAR here too to implement the 1..5000000 range, but it's not critical.
| |