Lines Matching defs:calendar

57 import sun.util.calendar.ZoneInfo;
63 * #fields calendar fields} such as <code>YEAR</code>, <code>MONTH</code>,
65 * manipulating the calendar fields, such as getting the date of the next
71 * implementing a concrete calendar system outside the package. Those
79 * calendar fields have been initialized with the current date and time:
86 * <p>A <code>Calendar</code> object can produce all the calendar field values
88 * calendar style (for example, Japanese-Gregorian, Japanese-Traditional).
90 * certain calendar fields, as well as their meaning. For example,
91 * the first month of the calendar system has value <code>MONTH ==
98 * <p>The calendar field values can be set by calling the <code>set</code>
101 * the Epoch) or values of the calendar fields. Calling the
107 * <p><code>Calendar</code> has two modes for interpreting the calendar
110 * calendar field values than it produces. When a <code>Calendar</code>
111 * recomputes calendar field values for return by <code>get()</code>, all of
112 * the calendar fields are normalized. For example, a lenient
117 * exception if there is any inconsistency in its calendar fields. For
121 * calculating its time or calendar field values if any out-of-range field
146 * When computing a date and time from the calendar fields, there
151 * calendar field values to determine the date and time in the
154 * <p>If there is any conflict in calendar field values,
155 * <code>Calendar</code> gives priorities to calendar fields that have been set
157 * calendar fields. The most recent combination, as determined by the
177 * <p>If there are any calendar fields whose values haven't been set in the selected
179 * value of each field may vary by concrete calendar systems. For example, in
200 * calendar, as those must be modifiable or overridable by the user at
206 * The calendar fields can be changed using three methods:
209 * <p><strong><code>set(f, value)</code></strong> changes calendar field
211 * internal member variable to indicate that calendar field <code>f</code> has
212 * been changed. Although calendar field <code>f</code> is changed immediately,
213 * the calendar's time value in milliseconds is not recomputed until the next call to
217 * computations. As a result of changing a calendar field using
218 * <code>set()</code>, other calendar fields may also change, depending on the
219 * calendar field, the calendar field value, and the calendar system. In addition,
222 * after the calendar fields have been recomputed. The specifics are determined by
223 * the concrete calendar class.</p>
254 * that are not expected to be invariant. The calendar system
259 * an immediate recomputation of the calendar's milliseconds and all
264 * 13)</code> sets the calendar to September 30, 2000. <strong>Add rule
364 * era, e.g., AD or BC in the Julian calendar. This is a calendar-specific
374 * year. This is a calendar-specific value; see subclass documentation.
380 * month. This is a calendar-specific value. The first month of
738 // milliseconds, and a set of calendar "fields" representing the current time.
748 * The calendar field values for the currently set time for this calendar.
756 * The flags which tell if a specified calendar field for the calendar is set.
773 * The currently set time for this calendar, expressed in milliseconds after
804 * <code>True</code> if this calendar allows out-of-range field values during computation
813 * The <code>TimeZone</code> used by this calendar. <code>Calendar</code>
912 // Mask values for calendar fields
944 * Constructs a calendar with the specified time zone and locale.
960 * Gets a calendar using the default time zone and locale. The
974 * Gets a calendar using the specified time zone and default locale.
987 * Gets a calendar using the default time zone and specified locale.
1002 * Gets a calendar with the specified time zone and locale.
1037 // Unsupported calendar type.
1038 // Use Gregorian calendar as a fallback.
1060 * Converts the current calendar field values in {@link #fields fields[]}
1071 * to calendar field values in {@link #fields fields[]}.
1072 * This allows you to sync up the calendar field values with
1073 * a new time that is set for the calendar. The time is <em>not</em>
1131 // If we don't need to recalculate the calendar field values,
1145 * Returns the value of the given calendar field. In lenient mode,
1146 * all calendar fields are normalized. In non-lenient mode, all
1147 * calendar fields are validated and this method throws an
1148 * exception if any calendar fields have out-of-range values. The
1150 * {@link #complete()} method, which process is calendar
1153 * @param field the given calendar field.
1154 * @return the value for the given calendar field.
1167 * Returns the value of the given calendar field. This method does
1170 * @param field the given calendar field.
1171 * @return the value for the given calendar field.
1180 * Sets the value of the given calendar field. This method does
1197 * Sets the given calendar field to the given value. The value is not
1200 * @param field the given calendar field.
1201 * @param value the value to be set for the given calendar field.
1228 * Sets the values for the calendar fields <code>YEAR</code>,
1230 * Previous values of other calendar fields are retained. If this is not desired,
1233 * @param year the value used to set the <code>YEAR</code> calendar field.
1234 * @param month the value used to set the <code>MONTH</code> calendar field.
1236 * @param date the value used to set the <code>DAY_OF_MONTH</code> calendar field.
1249 * Sets the values for the calendar fields <code>YEAR</code>,
1255 * @param year the value used to set the <code>YEAR</code> calendar field.
1256 * @param month the value used to set the <code>MONTH</code> calendar field.
1258 * @param date the value used to set the <code>DAY_OF_MONTH</code> calendar field.
1259 * @param hourOfDay the value used to set the <code>HOUR_OF_DAY</code> calendar field.
1260 * @param minute the value used to set the <code>MINUTE</code> calendar field.
1281 * @param year the value used to set the <code>YEAR</code> calendar field.
1282 * @param month the value used to set the <code>MONTH</code> calendar field.
1284 * @param date the value used to set the <code>DAY_OF_MONTH</code> calendar field.
1285 * @param hourOfDay the value used to set the <code>HOUR_OF_DAY</code> calendar field.
1286 * @param minute the value used to set the <code>MINUTE</code> calendar field.
1287 * @param second the value used to set the <code>SECOND</code> calendar field.
1304 * Sets all the calendar field values and the time value
1308 * calendar fields, and the date and time calculations will treat
1328 * Sets the given calendar field value and the time value
1345 * @param field the calendar field to be cleared.
1359 * Determines if the given calendar field has a value set,
1363 * @return <code>true</code> if the given calendar field has a value set;
1372 * Returns the string representation of the calendar
1376 * {@link Calendar#get(int) get(field)} to get the calendar
1378 * applicable to the given calendar <code>field</code>.
1388 * <p>The default implementation supports the calendar fields for
1393 * the calendar field for which the string representation
1407 * of the calendar fields have invalid values
1430 * Returns a <code>Map</code> containing all names of the calendar
1438 * <p>The values of other calendar fields may be taken into
1440 * this <code>Calendar</code> is a lunisolar calendar system and
1454 * the calendar field for which the display names are returned
1467 * of the calendar fields have invalid values
1549 * Fills in any unset fields in the calendar fields. First, the {@link
1552 * calendar field values. Then, the {@link #computeFields()} method is
1553 * called to calculate all calendar field values.
1566 * Returns whether the value of the specified calendar field has been set
1583 * Returns a field mask (bit mask) indicating all calendar fields that
1599 * Sets the state of the specified calendar fields to
1600 * <em>computed</em>. This state means that the specified calendar fields
1634 * Sets the state of the calendar fields that are <em>not</em> specified
1636 * specifies all the calendar fields, then the state of this
1637 * <code>Calendar</code> becomes that all the calendar fields are in sync
1640 * @param fieldMask the field mask indicating which calendar fields are in
1666 * Returns whether the calendar fields are partially in sync with the time
1674 * Returns whether the calendar fields are fully in sync with the time
1697 * Returns a field mask indicating which calendar field values
1698 * to be used to calculate the time value. The calendar fields are
1706 * <p>This method supports the calendar fields resolution as described in
1884 * the argument is a <code>Calendar</code> object of the same calendar
1922 * Returns a hash code for this calendar.
1995 * any invalid calendar values.
2003 * Adds or subtracts the specified amount of time to the given calendar field,
2004 * based on the calendar's rules. For example, to subtract 5 days from
2005 * the current time of the calendar, you can achieve it by calling:
2008 * @param field the calendar field.
2038 * Adds the specified (signed) amount to the specified calendar field
2049 * @param field the calendar field.
2050 * @param amount the signed amount to add to the calendar <code>field</code>.
2092 * @return the time zone object associated with this calendar.
2139 * @return <code>true</code> if the interpretation mode of this calendar is lenient;
2254 * <p>Unlike the {@code set} method, all of the calendar fields
2272 * or any of the calendar fields are inconsistent
2308 * Returns the minimum value for the given calendar field of this
2312 * calendar system specific parameters of the instance.
2314 * @param field the calendar field.
2315 * @return the minimum value for the given calendar field.
2325 * Returns the maximum value for the given calendar field of this
2329 * calendar system specific parameters of the instance.
2331 * @param field the calendar field.
2332 * @return the maximum value for the given calendar field.
2342 * Returns the highest minimum value for the given calendar field
2346 * greatest minimum value depends on calendar system specific
2349 * @param field the calendar field.
2350 * @return the highest minimum value for the given calendar field.
2360 * Returns the lowest maximum value for the given calendar field
2364 * maximum value depends on calendar system specific parameters of
2366 * Gregorian calendar system returns 28 for the
2368 * day of the shortest month of this calendar, February in a
2371 * @param field the calendar field.
2372 * @return the lowest maximum value for the given calendar field.
2382 * Returns the minimum value that the specified calendar field
2387 * calendar field. Subclasses should, if possible, override this
2391 * @param field the calendar field
2392 * @return the minimum of the given calendar field for the time
2410 // clone the calendar so we don't mess with the real one, and set it to
2434 * Returns the maximum value that the specified calendar field
2438 * other years in the Hebrew calendar system.
2442 * calendar field. Subclasses should, if possible, override this
2445 * @param field the calendar field
2446 * @return the maximum of the given calendar field for the time
2464 // clone the calendar so we don't mess with the real one, and set it to
2527 * Returns the name of the specified calendar field.
2529 * @param field the calendar field
2530 * @return the calendar field name
2539 * Return a string representation of this calendar. This method
2544 * @return a string representation of this calendar.
2617 private static final long getMillisOf(Calendar calendar) {
2618 if (calendar.isTimeSet) {
2619 return calendar.time;
2621 Calendar cal = (Calendar) calendar.clone();
2748 RuntimePermission perm = new RuntimePermission("accessClassInPackage.sun.util.calendar");