| java.lang.Object sun.util.calendar.Gregorian
All known Subclasses: sun.tools.javazic.Calendar,
Gregorian | public class Gregorian implements CalendarSystem(Code) | | Gregorian calendar calculations. The algorithms are from "Calendrical
Calculation" by Nachum Dershowitz and Edward M. Reingold (ISBN:
0-521-56474-3).
|
Field Summary | |
final public static int | EPOCH_DATE The number of days between Gregorian January 1, 1 and January
1, 1970. |
EPOCH_DATE | final public static int EPOCH_DATE(Code) | | The number of days between Gregorian January 1, 1 and January
1, 1970.
|
dateToMillis | public static long dateToMillis(CalendarDate date)(Code) | | Calculates milliseconds of given time from EPOCH, 1970-01-01 00:00AM.
|
dateToMillis | public static long dateToMillis(int year, int month, int day, int milliseconds)(Code) | | Calculates milliseconds of given time from EPOCH, 1970-01-01 00:00AM.
|
getCalendarDate | public static CalendarDate getCalendarDate(long utc)(Code) | | Calculates Gregorian calendar fields from the given UTC value
which is the difference from Gregorian January 1, 1970 00:00:00
GMT.
Parameters: utc - the UTC value in milliseconds the CaledarDate object that contains the calculated Gregorian calendar field values. |
getCalendarDateFromFixedDate | public static CalendarDate getCalendarDateFromFixedDate(long fixedDate)(Code) | | Calculates year/month/day from given date. The date is from 0001-01-01.
|
getDayOfWeek | public static int getDayOfWeek(CalendarDate date)(Code) | | Returns day of week of given day
|
getFixedDate | final public static long getFixedDate(int year, int month, int day)(Code) | | Returns number of days from 0001-01-01. Counting leap correction.
|
getMonthLength | public static int getMonthLength(int year, int month)(Code) | | Parameters: month - 0-based |
isLeapYear | final public static boolean isLeapYear(int year)(Code) | | true if the given year is a Gregorian leap year. |
|
|