public class

LocalGregorianCalendar

extends BaseCalendar
java.lang.Object
   ↳ sun.util.calendar.CalendarSystem
     ↳ sun.util.calendar.AbstractCalendar
       ↳ sun.util.calendar.BaseCalendar
         ↳ sun.util.calendar.LocalGregorianCalendar

Summary

Nested Classes
class LocalGregorianCalendar.Date  
[Expand]
Inherited Constants
From class sun.util.calendar.BaseCalendar
Public Methods
LocalGregorianCalendar.Date getCalendarDate(long millis, TimeZone zone)
LocalGregorianCalendar.Date getCalendarDate(long millis)
Calculates calendar fields from the specified number of milliseconds since the Epoch, January 1, 1970 00:00:00 UTC (Gregorian).
LocalGregorianCalendar.Date getCalendarDate()
LocalGregorianCalendar.Date getCalendarDate(long millis, CalendarDate date)
void getCalendarDateFromFixedDate(CalendarDate date, long fixedDate)
Calculates calendar fields and store them in the specified CalendarDate.
String getName()
Returns the name of this calendar system.
boolean isLeapYear(Era era, int year)
boolean isLeapYear(int gregorianYear)
Returns whether the specified Gregorian year is a leap year.
LocalGregorianCalendar.Date newCalendarDate(TimeZone zone)
LocalGregorianCalendar.Date newCalendarDate()
Constructs a CalendarDate that is specific to this calendar system.
boolean normalize(CalendarDate date)
Normalizes calendar fields in the specified date.
boolean validate(CalendarDate date)
Checks whether the calendar fields specified by date represents a valid date and time in this calendar system.
[Expand]
Inherited Methods
From class sun.util.calendar.BaseCalendar
From class sun.util.calendar.AbstractCalendar
From class sun.util.calendar.CalendarSystem
From class java.lang.Object

Public Methods

public LocalGregorianCalendar.Date getCalendarDate (long millis, TimeZone zone)

public LocalGregorianCalendar.Date getCalendarDate (long millis)

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).

Parameters
millis the offset value in milliseconds from January 1, 1970 00:00:00 UTC (Gregorian).
Returns
  • a CalendarDate instance that contains the calculated calendar field values.

public LocalGregorianCalendar.Date getCalendarDate ()

public LocalGregorianCalendar.Date getCalendarDate (long millis, CalendarDate date)

public void getCalendarDateFromFixedDate (CalendarDate date, long fixedDate)

Calculates calendar fields and store them in the specified CalendarDate.

Parameters
date a CalendarDate to stored the calculated calendar fields.
fixedDate a fixed date to calculate calendar fields

public String getName ()

Returns the name of this calendar system.

public boolean isLeapYear (Era era, int year)

public boolean isLeapYear (int gregorianYear)

Returns whether the specified Gregorian year is a leap year.

public LocalGregorianCalendar.Date newCalendarDate (TimeZone zone)

public LocalGregorianCalendar.Date newCalendarDate ()

Constructs a CalendarDate that is specific to this calendar system. All calendar fields have their initial values. The default time zone is set to the instance.

Returns
  • a CalendarDate instance that contains the initial calendar field values.

public boolean normalize (CalendarDate date)

Normalizes calendar fields in the specified date. Also all undefined fields are set to correct values. The actual normalization process is calendar system dependent.

Parameters
date the calendar date to be validated
Returns
  • true if all fields have been normalized; false otherwise.

public boolean validate (CalendarDate date)

Checks whether the calendar fields specified by date represents a valid date and time in this calendar system. If the given date is valid, date is marked as normalized.

Parameters
date the CalendarDate to be validated
Returns
  • true if all the calendar fields are consistent, otherwise, false is returned.