java.util.GregorianCalendar (JDK 1.1)
This concrete subclass of Calendar implements the "standard" solar calendar with years numbered from the birth of Christ, which is used in most locales throughout the world. You do not typically use this class directly, but instead obtain a Calendar object suitable for the default locale by calling Calendar.getInstance(). See Calendar for details on working with Calendar objects.
There is a discontinuity in the Gregorian calendar that represents the historical switch from the Julian calendar to the Gregorian calendar. By default GregorianCalendar assumes that this switch occurs on October 15, 1582. Most programs need not be concerned with this.
public classGregorianCalendarextends Calendar { //Public ConstructorspublicGregorianCalendar(); publicGregorianCalendar(TimeZonezone); publicGregorianCalendar(LocaleaLocale); publicGregorianCalendar(TimeZonezone, LocaleaLocale); publicGregorianCalendar(intyear, intmonth, intdate); publicGregorianCalendar(intyear, intmonth, intdate, inthour, intminute); publicGregorianCalendar(intyear, intmonth, intdate, inthour, intminute, intsecond); //Constantspublic static final intAD; public static final intBC; //Public Instance Methodspublic voidadd(intfield, intamount); //Defines Calendarpublic booleanafter(Objectwhen); //Defines Calendarpublic booleanbefore(Objectwhen); //Defines Calendarpublic Objectclone(); //Overrides Calendarpublic booleanequals(Objectobj); //Defines Calendarpublic intgetGreatestMinimum(intfield); //Defines Calendarpublic final DategetGregorianChange(); public intgetLeastMaximum(intfield); //Defines Calendarpublic intgetMaximum(intfield); //Defines Calendarpublic intgetMinimum(intfield); //Defines Calendarpublic synchronized inthashCode(); //Overrides Objectpublic booleanisLeapYear(intyear); public voidroll(intfield, booleanup); //Defines Calendarpublic voidsetGregorianChange(Datedate); //Protected Instance Methodsprotected voidcomputeFields(); //Defines Calendarprotected voidcomputeTime(); //Defines Calendar}
Hierarchy:
Object->Calendar(Serializable, Cloneable)->GregorianCalendar