Gets a calendar using the specified time zone and default locale. The <code>Calendar</code> returned is based on the current time in the given time zone with the default {@link LocaleCategory#FORMAT FORMAT} locale.
Gets a calendar using the default time zone and specified locale. The <code>Calendar</code> returned is based on the current time in the default time zone with the given locale. <p> If the locale contains the time zone with "tz" <a href="Locale.html#def_locale_extension">Unicode extension</a>, that time zone is used instead.
Gets a calendar using the default time zone and locale. The <code>Calendar</code> returned is based on the current time in the default time zone with the default {@link LocaleCategory#FORMAT FORMAT} locale. <p> If the locale contains the time zone with "tz" <a href="Locale.html#def_locale_extension">Unicode extension</a>, that time zone is used instead.
Gets a calendar with the specified time zone and locale. The <code>Calendar</code> returned is based on the current time in the given time zone with the given locale.
The mask value that represents all of the fields.
A style specifier for {@link #getDisplayNames(int, int, Locale) getDisplayNames} indicating names in all styles, such as "January" and "Jan".
Value of the {@link #AM_PM} field indicating the period of the day from midnight to just before noon.
Field number for <code>get</code> and <code>set</code> indicating whether the <code>HOUR</code> is before or after noon. E.g., at 10:04:15.250 PM the <code>AM_PM</code> is <code>PM</code>.
Value of the {@link #MONTH} field indicating the fourth month of the year in the Gregorian and Julian calendars.
Value of the {@link #MONTH} field indicating the eighth month of the year in the Gregorian and Julian calendars.
Field number for <code>get</code> and <code>set</code> indicating the day of the month. This is a synonym for <code>DAY_OF_MONTH</code>. The first day of the month has value 1.
Field number for <code>get</code> and <code>set</code> indicating the day of the month. This is a synonym for <code>DATE</code>. The first day of the month has value 1.
Field number for <code>get</code> and <code>set</code> indicating the day of the week. This field takes values <code>SUNDAY</code>, <code>MONDAY</code>, <code>TUESDAY</code>, <code>WEDNESDAY</code>, <code>THURSDAY</code>, <code>FRIDAY</code>, and <code>SATURDAY</code>.
Field number for <code>get</code> and <code>set</code> indicating the ordinal number of the day of the week within the current month. Together with the <code>DAY_OF_WEEK</code> field, this uniquely specifies a day within a month. Unlike <code>WEEK_OF_MONTH</code> and <code>WEEK_OF_YEAR</code>, this field's value does <em>not</em> depend on <code>getFirstDayOfWeek()</code> or <code>getMinimalDaysInFirstWeek()</code>. <code>DAY_OF_MONTH 1</code> through <code>7</code> always correspond to <code>DAY_OF_WEEK_IN_MONTH 1</code>; <code>8</code> through <code>14</code> correspond to <code>DAY_OF_WEEK_IN_MONTH 2</code>, and so on. <code>DAY_OF_WEEK_IN_MONTH 0</code> indicates the week before <code>DAY_OF_WEEK_IN_MONTH 1</code>. Negative values count back from the end of the month, so the last Sunday of a month is specified as <code>DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1</code>. Because negative values count backward they will usually be aligned differently within the month than positive values. For example, if a month has 31 days, <code>DAY_OF_WEEK_IN_MONTH -1</code> will overlap <code>DAY_OF_WEEK_IN_MONTH 5</code> and the end of <code>4</code>.
Field number for <code>get</code> and <code>set</code> indicating the day number within the current year. The first day of the year has value 1.
Value of the {@link #MONTH} field indicating the twelfth month of the year in the Gregorian and Julian calendars.
Field number for <code>get</code> and <code>set</code> indicating the daylight saving offset in milliseconds. <p> This field reflects the correct daylight saving offset value of the time zone of this <code>Calendar</code> if the <code>TimeZone</code> implementation subclass supports historical Daylight Saving Time schedule changes.
Field number for <code>get</code> and <code>set</code> indicating the era, e.g., AD or BC in the Julian calendar. This is a calendar-specific value; see subclass documentation.
Value of the {@link #MONTH} field indicating the second month of the year in the Gregorian and Julian calendars.
The number of distinct fields recognized by <code>get</code> and <code>set</code>. Field numbers range from <code>0..FIELD_COUNT-1</code>.
Value of the {@link #DAY_OF_WEEK} field indicating Friday.
Field number for <code>get</code> and <code>set</code> indicating the hour of the morning or afternoon. <code>HOUR</code> is used for the 12-hour clock (0 - 11). Noon and midnight are represented by 0, not by 12. E.g., at 10:04:15.250 PM the <code>HOUR</code> is 10.
Field number for <code>get</code> and <code>set</code> indicating the hour of the day. <code>HOUR_OF_DAY</code> is used for the 24-hour clock. E.g., at 10:04:15.250 PM the <code>HOUR_OF_DAY</code> is 22.
Value of the {@link #MONTH} field indicating the first month of the year in the Gregorian and Julian calendars.
Value of the {@link #MONTH} field indicating the seventh month of the year in the Gregorian and Julian calendars.
Value of the {@link #MONTH} field indicating the sixth month of the year in the Gregorian and Julian calendars.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} equivalent to {@link #LONG_FORMAT}.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} indicating a long name used for format.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} indicating a long name used independently, such as a month name as calendar headers.
Value of the {@link #MONTH} field indicating the third month of the year in the Gregorian and Julian calendars.
Value of the {@link #MONTH} field indicating the fifth month of the year in the Gregorian and Julian calendars.
Field number for <code>get</code> and <code>set</code> indicating the millisecond within the second. E.g., at 10:04:15.250 PM the <code>MILLISECOND</code> is 250.
Field number for <code>get</code> and <code>set</code> indicating the minute within the hour. E.g., at 10:04:15.250 PM the <code>MINUTE</code> is 4.
Value of the {@link #DAY_OF_WEEK} field indicating Monday.
Field number for <code>get</code> and <code>set</code> indicating the month. This is a calendar-specific value. The first month of the year in the Gregorian and Julian calendars is <code>JANUARY</code> which is 0; the last depends on the number of months in a year.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} indicating a narrow name used for format. Narrow names are typically single character strings, such as "M" for Monday.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} indicating a narrow name independently. Narrow names are typically single character strings, such as "M" for Monday.
Value of the {@link #MONTH} field indicating the eleventh month of the year in the Gregorian and Julian calendars.
Value of the {@link #MONTH} field indicating the tenth month of the year in the Gregorian and Julian calendars.
Value of the {@link #AM_PM} field indicating the period of the day from noon to just before midnight.
Value of the {@link #DAY_OF_WEEK} field indicating Saturday.
Field number for <code>get</code> and <code>set</code> indicating the second within the minute. E.g., at 10:04:15.250 PM the <code>SECOND</code> is 15.
Value of the {@link #MONTH} field indicating the ninth month of the year in the Gregorian and Julian calendars.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} equivalent to {@link #SHORT_FORMAT}.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} indicating a short name used for format.
A style specifier for {@link #getDisplayName(int, int, Locale) getDisplayName} and {@link #getDisplayNames(int, int, Locale) getDisplayNames} indicating a short name used independently, such as a month abbreviation as calendar headers.
Value of the {@link #DAY_OF_WEEK} field indicating Sunday.
Value of the {@link #DAY_OF_WEEK} field indicating Thursday.
Value of the {@link #DAY_OF_WEEK} field indicating Tuesday.
Value of the {@link #MONTH} field indicating the thirteenth month of the year. Although <code>GregorianCalendar</code> does not use this value, lunar calendars do.
Value of the {@link #DAY_OF_WEEK} field indicating Wednesday.
Field number for <code>get</code> and <code>set</code> indicating the week number within the current month. The first week of the month, as defined by <code>getFirstDayOfWeek()</code> and <code>getMinimalDaysInFirstWeek()</code>, has value 1. Subclasses define the value of <code>WEEK_OF_MONTH</code> for days before the first week of the month.
Field number for <code>get</code> and <code>set</code> indicating the week number within the current year. The first week of the year, as defined by <code>getFirstDayOfWeek()</code> and <code>getMinimalDaysInFirstWeek()</code>, has value 1. Subclasses define the value of <code>WEEK_OF_YEAR</code> for days before the first week of the year.
Field number for <code>get</code> and <code>set</code> indicating the year. This is a calendar-specific value; see subclass documentation.
Field number for <code>get</code> and <code>set</code> indicating the raw offset from GMT in milliseconds. <p> This field reflects the correct GMT offset value of the time zone of this <code>Calendar</code> if the <code>TimeZone</code> implementation subclass supports historical GMT offset changes.
True if all fields have been set. @serial
True if <code>fields[]</code> are in sync with the currently set time. If false, then the next attempt to get the value of a field will force a recomputation of all fields from the current value of <code>time</code>. @serial
The calendar field values for the currently set time for this calendar. This is an array of <code>FIELD_COUNT</code> integers, with index values <code>ERA</code> through <code>DST_OFFSET</code>. @serial
The flags which tell if a specified calendar field for the calendar is set. A new object has no fields set. After the first call to a method which generates the fields, they all remain set after that. This is an array of <code>FIELD_COUNT</code> bools, with index values <code>ERA</code> through <code>DST_OFFSET</code>. @serial
True if then the value of <code>time</code> is valid. The time is made invalid by a change to an item of <code>field[]</code>. @see #time @serial
The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT. @see #isTimeSet @serial