AbstractCalendar class provides a framework for
implementing a concrete calendar system.
Fixed Date
For implementing a concrete calendar system, each calendar must
have the common date numbering, starting from midnight the onset of
Monday, January 1, 1 (Gregorian). It is called a fixed date
in this class. January 1, 1 (Gregorian) is fixed date 1. (See
Nachum Dershowitz and Edward M. Reingold, CALENDRICAL
CALCULATION The Millennium Edition, Section 1.2 for details.)
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| private Era[] | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public CalendarDate | |
| public CalendarDate | getCalendarDate(long millis)
Implements abstract sun. Calculates calendar fields from the specified number of milliseconds since the Epoch, January 1, 1970 00:00:00 UTC (Gregorian). |
| public CalendarDate | getCalendarDate(long millis, TimeZone zone)
Implements abstract sun.
|
| public CalendarDate | getCalendarDate(long millis, CalendarDate date)
Implements abstract sun.
|
| protected abstract void | getCalendarDateFromFixedDate(CalendarDate
a date, long CalendarDate to store the
calculated calendar fields.a fixed date to calculate calendar fields fixedDate)Calculates calendar fields from the specified fixed date. |
| pack-priv static long | Returns: the calculated datethe fixed date fixedDate, int the day of week dayOfWeek)Returns a date of the given day of week that is closest to and after the given fixed date. |
| pack-priv static long | Returns: the calculated datethe fixed date fixedDate, int the day of week dayOfWeek)Returns a date of the given day of week before the given fixed date. |
| public static long | Returns: the calculated datethe fixed date fixedDate, int the day of week dayOfWeek)Returns a date of the given day of week on or before the given fixed date. |
| public Era | getEra(String eraName)
Implements abstract sun. Returns the |
| public Era[] | getEras()
Implements abstract sun. Returns valid |
| protected abstract long | Returns: the calculated fixed datea date)CalendarDate with which the fixed
date is calculatedReturns the fixed date calculated with the specified calendar date. |
| public CalendarDate | getNthDayOfWeek(int nth, int dayOfWeek, CalendarDate date)
Implements abstract sun. Returns a |
| public long | getTime(CalendarDate date)
Implements abstract sun. Returns the number of milliseconds since the Epoch, January 1,
1970 00:00:00 UTC (Gregorian), represented by the specified
|
| protected long | |
| public long | |
| protected abstract boolean | |
| pack-priv int | |
| protected void | |
| public CalendarDate | setTimeOfDay(CalendarDate cdate, int fraction)
Implements abstract sun.
|
| public boolean |
| DAY_IN_MILLIS | back to summary |
|---|---|
| pack-priv static final int DAY_IN_MILLIS | |
| EPOCH_OFFSET | back to summary |
|---|---|
| pack-priv static final int EPOCH_OFFSET | |
| eras | back to summary |
|---|---|
| private Era[] eras | |
| HOUR_IN_MILLIS | back to summary |
|---|---|
| pack-priv static final int HOUR_IN_MILLIS | |
| MINUTE_IN_MILLIS | back to summary |
|---|---|
| pack-priv static final int MINUTE_IN_MILLIS | |
| SECOND_IN_MILLIS | back to summary |
|---|---|
| pack-priv static final int SECOND_IN_MILLIS | |
| AbstractCalendar | back to summary |
|---|---|
| protected AbstractCalendar() | |
| getCalendarDate | back to summary |
|---|---|
| public CalendarDate getCalendarDate() Implements abstract sun.
| |
| getCalendarDate | back to summary |
|---|---|
| public CalendarDate getCalendarDate(long millis) Implements abstract sun. Doc from sun. Calculates calendar fields from the specified number of milliseconds since the Epoch, January 1, 1970 00:00:00 UTC (Gregorian). This method doesn't check overflow or underflow when adjusting the millisecond value (representing UTC) with the time zone offsets (i.e., the GMT offset and amount of daylight saving).
| |
| getCalendarDate | back to summary |
|---|---|
| public CalendarDate getCalendarDate(long millis, TimeZone zone) Implements abstract sun.
| |
| getCalendarDate | back to summary |
|---|---|
| public CalendarDate getCalendarDate(long millis, CalendarDate date) Implements abstract sun.
| |
| getCalendarDateFromFixedDate | back to summary |
|---|---|
| protected abstract void getCalendarDateFromFixedDate(CalendarDate date, long fixedDate) Calculates calendar fields from the specified fixed date. This
method stores the calculated calendar field values in the specified
| |
| getDayOfWeekDateAfter | back to summary |
|---|---|
| pack-priv static long getDayOfWeekDateAfter(long fixedDate, int dayOfWeek) Returns a date of the given day of week that is closest to and after the given fixed date.
| |
| getDayOfWeekDateBefore | back to summary |
|---|---|
| pack-priv static long getDayOfWeekDateBefore(long fixedDate, int dayOfWeek) Returns a date of the given day of week before the given fixed date.
| |
| getDayOfWeekDateOnOrBefore | back to summary |
|---|---|
| public static long getDayOfWeekDateOnOrBefore(long fixedDate, int dayOfWeek) Returns a date of the given day of week on or before the given fixed date.
| |
| getEra | back to summary |
|---|---|
| public Era getEra(String eraName) Implements abstract sun. Doc from sun. Returns the
| |
| getEras | back to summary |
|---|---|
| public Era[] getEras() Implements abstract sun. Doc from sun. Returns valid
| |
| getFixedDate | back to summary |
|---|---|
| protected abstract long getFixedDate(CalendarDate date) Returns the fixed date calculated with the specified calendar date. If the specified date is not normalized, its date fields are normalized.
| |
| getNthDayOfWeek | back to summary |
|---|---|
| public CalendarDate getNthDayOfWeek(int nth, int dayOfWeek, CalendarDate date) Implements abstract sun. Doc from sun. Returns a
This method returns a new CalendarDate instance
and doesn't modify the original date.
| |
| getTime | back to summary |
|---|---|
| public long getTime(CalendarDate date) Implements abstract sun. Doc from sun. Returns the number of milliseconds since the Epoch, January 1,
1970 00:00:00 UTC (Gregorian), represented by the specified
| |
| getTimeOfDay | back to summary |
|---|---|
| protected long getTimeOfDay(CalendarDate date) | |
| getTimeOfDayValue | back to summary |
|---|---|
| public long getTimeOfDayValue(CalendarDate date) | |
| isLeapYear | back to summary |
|---|---|
| protected abstract boolean isLeapYear(CalendarDate date) | |
| normalizeTime | back to summary |
|---|---|
| pack-priv int normalizeTime(CalendarDate date) | |
| setEras | back to summary |
|---|---|
| protected void setEras(Era[] eras) | |
| setTimeOfDay | back to summary |
|---|---|
| public CalendarDate setTimeOfDay(CalendarDate cdate, int fraction) Implements abstract sun. | |
| validateTime | back to summary |
|---|---|
| public boolean validateTime(CalendarDate date) | |