Method Summary |
|
abstract public void | add(int field, int value) Adds the specified amount to a Calendar field. |
public boolean | after(Object calendar) Answers if the Date specified by this Calendar instance is after the Date
specified by the parameter. |
public boolean | before(Object calendar) Answers if the Date specified by this Calendar instance is before the
Date specified by the parameter. |
final public void | clear() Clears all of the fields of this Calendar. |
final public void | clear(int field) Clears the specified field to zero. |
public Object | clone() Answers a new Calendar with the same properties. |
public int | compareTo(Calendar anotherCalendar) Compares the times of the two Calendars, which represent the milliseconds
from the January 1, 1970 00:00:00.000 GMT (Gregorian).
Parameters: anotherCalendar - another calendar that is compared with. |
protected void | complete() Computes the time from the fields if the time has not already been set. |
abstract protected void | computeFields() Computes the Calendar fields from the time. |
abstract protected void | computeTime() Computes the time from the Calendar fields. |
public boolean | equals(Object object) Compares the specified object to this Calendar and answer if they are
equal. |
public int | get(int field) Gets the value of the specified field after computing the field values
from the time if required. |
public int | getActualMaximum(int field) Gets the maximum value of the specified field for the current date. |
public int | getActualMinimum(int field) Gets the minimum value of the specified field for the current date. |
public static synchronized Locale[] | getAvailableLocales() Gets the list of installed Locales which support Calendar. |
public int | getFirstDayOfWeek() Gets the first day of the week for this Calendar. |
abstract public int | getGreatestMinimum(int field) Gets the greatest minimum value of the specified field. |
public static synchronized Calendar | getInstance() Constructs a new instance of the Calendar subclass appropriate for the
default Locale. |
public static synchronized Calendar | getInstance(Locale locale) Constructs a new instance of the Calendar subclass appropriate for the
specified Locale. |
public static synchronized Calendar | getInstance(TimeZone timezone) Constructs a new instance of the Calendar subclass appropriate for the
default Locale, using the specified TimeZone. |
public static synchronized Calendar | getInstance(TimeZone timezone, Locale locale) Constructs a new instance of the Calendar subclass appropriate for the
specified Locale. |
abstract public int | getLeastMaximum(int field) Gets the smallest maximum value of the specified field. |
abstract public int | getMaximum(int field) Gets the greatest maximum value of the specified field. |
public int | getMinimalDaysInFirstWeek() Gets the minimal days in the first week of the year. |
abstract public int | getMinimum(int field) Gets the smallest minimum value of the specified field. |
final public Date | getTime() Gets the time of this Calendar as a Date object. |
public long | getTimeInMillis() Computes the time from the fields if required and answers the time. |
public TimeZone | getTimeZone() Gets the timezone of this Calendar. |
public int | hashCode() Answers an integer hash code for the receiver. |
final protected int | internalGet(int field) Gets the value of the specified field without recomputing. |
public boolean | isLenient() Answers if this Calendar accepts field values which are outside the valid
range for the field. |
final public boolean | isSet(int field) Answers if the specified field is set. |
public void | roll(int field, int value) Adds the specified amount the specified field and wrap the value of the
field when it goes beyond the maximum or minimum value for the current
date. |
abstract public void | roll(int field, boolean increment) Increment or decrement the specified field and wrap the value of the
field when it goes beyond the maximum or minimum value for the current
date. |
public void | set(int field, int value) Sets a field to the specified value. |
final public void | set(int year, int month, int day) Sets the year, month and day of the month fields. |
final public void | set(int year, int month, int day, int hourOfDay, int minute) Sets the year, month, day of the month, hour of day and minute fields. |
final public void | set(int year, int month, int day, int hourOfDay, int minute, int second) Sets the year, month, day of the month, hour of day, minute and second
fields. |
public void | setFirstDayOfWeek(int value) Sets the first day of the week for this Calendar. |
public void | setLenient(boolean value) Sets this Calendar to accept field values which are outside the valid
range for the field. |
public void | setMinimalDaysInFirstWeek(int value) Sets the minimal days in the first week of the year. |
final public void | setTime(Date date) Sets the time of this Calendar. |
public void | setTimeInMillis(long milliseconds) Sets the time of this Calendar.
Parameters: milliseconds - the time as the number of milliseconds since Jan. |
public void | setTimeZone(TimeZone timezone) Sets the timezone used by this Calendar. |
public String | toString() Answers the string representation of this Calendar. |