Fields
| Name | Description |
|---|---|
| AM | Useful constant for hour in 12-hour clock. |
| AM_PM | Useful constant for date and time. |
| APRIL | Useful constant for month. |
| areFieldsSet | The flag which tells if the time fields are set for the calendar. |
| AUGUST | Useful constant for month. |
| DATE | Useful constant for date and time. |
| DAY_OF_MONTH | Useful constant for date and time. |
| DAY_OF_WEEK | Useful constant for date and time. |
| DAY_OF_WEEK_IN_MONTH | Useful constant for date and time. |
| DAY_OF_YEAR | Useful constant for date and time. |
| DECEMBER | Useful constant for month. |
| DST_OFFSET | Useful constant for date and time. |
| ERA | Useful constant for date and time. |
| FEBRUARY | Useful constant for month. |
| FIELD_COUNT | Useful constant for date and time. |
| fields | The time fields containing values into which the millis is computed. |
| FRIDAY | Useful constant for days of week. |
| HOUR | Useful constant for date and time. |
| HOUR_OF_DAY | Useful constant for date and time. |
| isSet | The flags which tell if a specified time field for the calendar is set. |
| isTimeSet | The flag which indicates if the current time is set for the calendar. |
| JANUARY | Useful constant for month. |
| JULY | Useful constant for month. |
| JUNE | Useful constant for month. |
| MARCH | Useful constant for month. |
| MAY | Useful constant for month. |
| MILLISECOND | Useful constant for date and time. |
| MINUTE | Useful constant for date and time. |
| MONDAY | Useful constant for days of week. |
| MONTH | Useful constant for date and time. |
| NOVEMBER | Useful constant for month. |
| OCTOBER | Useful constant for month. |
| PM | Useful constant for hour in 12-hour clock. |
| SATURDAY | Useful constant for days of week. |
| SECOND | Useful constant for date and time. |
| SEPTEMBER | Useful constant for month. |
| SUNDAY | Useful constant for days of week. |
| THURSDAY | Useful constant for days of week. |
| time | The current time set for the calendar. |
| TUESDAY | Useful constant for days of week. |
| UNDECIMBER | Useful constant for month. |
| WEDNESDAY | Useful constant for days of week. |
| WEEK_OF_MONTH | Useful constant for date and time. |
| WEEK_OF_YEAR | Useful constant for date and time. |
| YEAR | Useful constant for date and time. |
| ZONE_OFFSET | Useful constant for date and time. |
Constructors
| Name | Description |
|---|---|
| Calendar() | Constructs a Calendar with the default time zone as returned by TimeZone.getDefault(), and the default locale. |
| Calendar(TimeZone, Locale) | Constructs a Calendar with the given time zone and locale. |
Methods
| Name | Description |
|---|---|
| add(int, int) | Date Arithmetic function. |
| after(Object) | Compares the time field records. |
| before(Object) | Compares the time field records. |
| clear() | Clears the values of all the time fields. |
| clear(int) | Clears the value in the given time field. |
| clone() | Overrides Cloneable |
| complete() | Fills in any unset fields in the time field list. |
| computeFields() | Converts UTC as milliseconds to time field values. |
| computeTime() | Converts Calendar's time field values to UTC as milliseconds. |
| equals(Object) | Compares the time field records. |
| get(int) | Gets the value for a given time field. |
| getAvailableLocales() | Gets the set of locales for which Calendars are installed. |
| getFirstDayOfWeek() | Gets what the first day of the week is; e.g., Sunday in US, Monday in France. |
| getGreatestMinimum(int) | Gets the highest minimum value for the given field if varies. |
| getInstance() | Gets a Calendar using the default timezone and locale. |
| getInstance(Locale) | Gets a Calendar using the default timezone and given locale. |
| getInstance(TimeZone) | Gets a Calendar using the given timezone and default locale. |
| getInstance(TimeZone, Locale) | Gets a Calendar using the given timezone and given locale. |
| getLeastMaximum(int) | Gets the lowest maximum value for the given field if varies. |
| getMaximum(int) | Gets the maximum value for the given time field. |
| getMinimalDaysInFirstWeek() | Gets what the minimal days required in the first week of the year are; e.g., if the first week is defined as one that contains the first day of the first month of a year, getMinimalDaysInFirstWeek returns 1. |
| getMinimum(int) | Gets the minimum value for the given time field. |
| getTime() | Gets this Calendar's current time. |
| getTimeInMillis() | Gets this Calendar's current time as a long. |
| getTimeZone() | Gets the time zone. |
| internalGet(int) | Gets the value for a given time field. |
| isLenient() | Tell whether date/time interpretation is to be lenient. |
| isSet(int) | Determines if the given time field has a value set. |
| roll(int, boolean) | Time Field Rolling function. |
| set(int, int) | Sets the time field with the given value. |
| set(int, int, int) | Sets the values for the fields year, month, and date. |
| set(int, int, int, int, int) | Sets the values for the fields year, month, date, hour, and minute. |
| set(int, int, int, int, int, int) | Sets the values for the fields year, month, date, hour, minute, and second. |
| setFirstDayOfWeek(int) | Sets what the first day of the week is; e.g., Sunday in US, Monday in France. |
| setLenient(boolean) | Specify whether or not date/time interpretation is to be lenient. |
| setMinimalDaysInFirstWeek(int) | Sets what the minimal days required in the first week of the year are; For example, if the first week is defined as one that contains the first day of the first month of a year, call the method with value 1. |
| setTime(Date) | Sets this Calendar's current time with the given Date. |
| setTimeInMillis(long) | Sets this Calendar's current time from the given long value. |
| setTimeZone(TimeZone) | Sets the time zone with the given time zone value. |