Serializable, Cloneable, Comparable<Calendar>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,
序列化表格Calendar.WeekData| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
BEFORE_MINGUO |
Constant for the Taiwan Era for years before Minguo 1.
|
static int |
MINGUO |
Constant for the Taiwan Era for Minguo.
|
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, YEAR, YEAR_WOY, ZONE_OFFSETAD, BC, invertGregorian, isGregorian| 构造器 | 说明 |
|---|---|
TaiwanCalendar() |
Constructs a
TaiwanCalendar using the current time
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(Date date) |
Constructs a
TaiwanCalendar with the given date set
in the default time zone with the default locale. |
TaiwanCalendar(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,
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. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
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.
|
add, after, before, clear, clear, clone, compareTo, complete, computeFields, computeGregorianFields, computeGregorianMonthStart, computeJulianDay, computeMillisInDay, computeTime, computeZoneOffset, equals, fieldDifference, fieldName, floorDivide, floorDivide, floorDivide, floorDivide, get, getAvailableLocales, getDateTimeFormat, getDateTimeFormat, getDisplayName, getDisplayName, getFieldCount, getFieldResolutionTable, getFirstDayOfWeek, getGreatestMinimum, getGregorianDayOfMonth, getGregorianDayOfYear, getGregorianMonth, getGregorianYear, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getKeywordValuesForLocale, getLeastMaximum, getLimit, getMaximum, getMinimalDaysInFirstWeek, getMinimum, getRepeatedWallTimeOption, getSkippedWallTimeOption, getStamp, getTime, getTimeInMillis, getTimeZone, getWeekData, getWeekDataForRegion, gregorianMonthLength, gregorianPreviousMonthLength, handleCreateFields, handleGetDateFormat, handleGetDateFormat, handleGetDateFormat, 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, setRepeatedWallTimeOption, setSkippedWallTimeOption, setTime, setTimeInMillis, setTimeZone, setWeekData, toString, validateField, validateField, validateFields, weekNumber, weekNumbergetActualMaximum, getActualMinimum, getGregorianChange, handleComputeJulianDay, handleComputeMonthStart, handleGetMonthLength, handleGetYearLength, hashCode, isEquivalentTo, isLeapYear, roll, setGregorianChangepublic static final int BEFORE_MINGUO
Calendar.ERA,
常量字段值public static final int MINGUO
Calendar.ERA,
常量字段值public 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(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, 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(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 在类中 GregorianCalendarprotected void handleComputeFields(int julianDay)
handleComputeFields 在类中 GregorianCalendarprotected int handleGetLimit(int field,
int limitType)
handleGetLimit 在类中 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 在类中 GregorianCalendar