public class TaiwanCalendar extends GregorianCalendar
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
Calendar.getInstance(ULocale) passing in a ULocale
with the tag "@calendar=roc".
Calendar,
GregorianCalendar,
Serialized FormCalendar.FormatConfiguration, Calendar.WeekData| Modifier and Type | Field and Description |
|---|---|
static int |
BEFORE_MINGUO
Constant for the Taiwan Era for years before Minguo 1.
|
static int |
MINGUO
Constant for the Taiwan Era for Minguo.
|
AD, BC, invertGregorian, isGregorianAM, 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 and Description |
|---|
TaiwanCalendar()
Constructs a
TaiwanCalendar using the current time
in the default time zone with the default locale. |
TaiwanCalendar(java.util.Date date)
Constructs a
TaiwanCalendar with the given date set
in the default time zone with the default locale. |
TaiwanCalendar(int year,
int month,
int date)
Constructs a
TaiwanCalendar with the given date set
in the default time zone with the default locale. |
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.
|
TaiwanCalendar(java.util.Locale aLocale)
Constructs a
TaiwanCalendar based on the current time
in the default time zone with the given locale. |
TaiwanCalendar(TimeZone zone)
Constructs a
TaiwanCalendar based on the current time
in the given time zone with the default locale. |
TaiwanCalendar(TimeZone zone,
java.util.Locale aLocale)
Constructs a
TaiwanCalendar based on the current time
in the given time zone with the given locale. |
TaiwanCalendar(TimeZone zone,
ULocale locale)
Constructs a
TaiwanCalendar based on the current time
in the given time zone with the given locale. |
TaiwanCalendar(ULocale locale)
Constructs a
TaiwanCalendar based on the current time
in the default time zone with the given locale. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.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 |
handleGetExtendedYear()
Returns the extended year defined by the current fields.
|
protected int |
handleGetLimit(int field,
int limitType)
Override GregorianCalendar.
|
getActualMaximum, getActualMinimum, getGregorianChange, handleComputeJulianDay, handleComputeMonthStart, handleGetMonthLength, handleGetYearLength, hashCode, isEquivalentTo, isLeapYear, roll, setGregorianChangeadd, after, before, clear, clear, clone, compareTo, complete, computeFields, computeGregorianFields, computeGregorianMonthStart, computeJulianDay, computeMillisInDay, computeMillisInDayLong, computeTime, computeZoneOffset, computeZoneOffset, equals, fieldDifference, fieldName, floorDivide, floorDivide, floorDivide, floorDivide, get, getAvailableLocales, getAvailableULocales, getDateTimeFormat, getDateTimeFormat, getDateTimePattern, getDayOfWeekType, getDefaultDayInMonth, getDefaultMonthInYear, getDisplayName, getDisplayName, getFieldCount, getFieldResolutionTable, getFirstDayOfWeek, getGreatestMinimum, getGregorianDayOfMonth, getGregorianDayOfYear, getGregorianMonth, getGregorianYear, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getKeywordValuesForLocale, getLeastMaximum, getLimit, getLocale, getMaximum, getMinimalDaysInFirstWeek, getMinimum, getRelatedYear, getRepeatedWallTimeOption, getSkippedWallTimeOption, getStamp, getTime, getTimeInMillis, getTimeZone, getWeekData, getWeekDataForRegion, getWeekendTransition, gregorianMonthLength, gregorianPreviousMonthLength, handleCreateFields, handleGetDateFormat, handleGetDateFormat, handleGetDateFormat, handleGetDateFormat, haveDefaultCentury, internalGet, internalGet, internalGetTimeInMillis, internalSet, isGregorianLeapYear, isLenient, isSet, isWeekend, isWeekend, julianDayToDayOfWeek, julianDayToMillis, millisToJulianDay, newerField, newestStamp, pinField, prepareGetActual, resolveFields, roll, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setRelatedYear, setRepeatedWallTimeOption, setSkippedWallTimeOption, setTime, setTimeInMillis, setTimeZone, setWeekData, toString, validateField, validateField, validateFields, weekNumber, weekNumberpublic static final int BEFORE_MINGUO
Calendar.ERA,
Constant Field Valuespublic static final int MINGUO
Calendar.ERA,
Constant Field Valuespublic TaiwanCalendar()
TaiwanCalendar using the current time
in the default time zone with the default locale.public TaiwanCalendar(TimeZone zone)
TaiwanCalendar based on the current time
in the given time zone with the default locale.zone - the given time zone.public TaiwanCalendar(java.util.Locale aLocale)
TaiwanCalendar based on the current time
in the default time zone with the given locale.aLocale - the given locale.public TaiwanCalendar(ULocale locale)
TaiwanCalendar based on the current time
in the default time zone with the given locale.locale - the given ulocale.public TaiwanCalendar(TimeZone zone, java.util.Locale aLocale)
TaiwanCalendar based on the current time
in the given time zone with the given locale.zone - the given time zone.public TaiwanCalendar(TimeZone zone, ULocale locale)
TaiwanCalendar based on the current time
in the given time zone with the given locale.zone - the given time zone.locale - the given ulocale.public TaiwanCalendar(java.util.Date date)
TaiwanCalendar 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 TaiwanCalendar(int year,
int month,
int date)
TaiwanCalendar with the given date set
in the default time zone with the default locale.public TaiwanCalendar(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.protected int handleGetExtendedYear()
handleGetExtendedYear in class GregorianCalendarprotected void handleComputeFields(int julianDay)
handleComputeFields in class GregorianCalendarprotected 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 java.lang.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 GregorianCalendarCopyright © 2016 Unicode, Inc. and others.