Lines Matching defs:Calendar

32  * \brief C++ API: Calendar object
53 * <code>Calendar</code> is an abstract base class for converting between
61 * Subclasses of <code>Calendar</code> interpret a <code>UDate</code>
63 * The most commonly used subclass of <code>Calendar</code> is
72 * Like other locale-sensitive classes, <code>Calendar</code> provides a
74 * object of this type. <code>Calendar</code>'s <code>createInstance</code> method
75 * returns the appropriate <code>Calendar</code> subclass whose
79 * Calendar *rightNow = Calendar::createInstance(errCode);
84 * A <code>Calendar</code> object can produce all the time field values
135 * Calendar resolves the time using the UTC offset before the transition by default.
141 * case, the ICU Calendar resolves the time using the UTC offset after the transition
144 * <p>Ambiguous wall clock time resolution behaviors can be customized by Calendar APIs
174 * <code>Calendar</code> provides an API for field "rolling", where fields
180 * <code>Calendar</code> also provides a date arithmetic function for
187 * <p>The allowable range of <code>Calendar</code> has been
191 * The new <code>Calendar</code> protocol specifies the
195 * should use the protected constants in <code>Calendar</code> to
200 class U_I18N_API Calendar : public UObject {
205 * specific. Example ranges given are for illustration only; see specific Calendar
248 * Useful constant for days of week. Note: Calendar day-of-week is 1-based. Clients
264 * Useful constants for month. Note: Calendar month is 0-based.
297 virtual ~Calendar();
305 virtual Calendar* clone(void) const = 0;
308 * Creates a Calendar using the default timezone and locale. Clients are responsible
311 * @param success Indicates the success/failure of Calendar creation. Filled in
315 * @return A Calendar if created successfully. NULL otherwise.
318 static Calendar* U_EXPORT2 createInstance(UErrorCode& success);
321 * Creates a Calendar using the given timezone and the default locale.
322 * The Calendar takes ownership of zoneToAdopt; the
326 * @param success Indicates the success/failure of Calendar creation. Filled in
329 * @return A Calendar if created successfully. NULL otherwise.
332 static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, UErrorCode& success);
335 * Creates a Calendar using the given timezone and the default locale. The TimeZone
339 * @param success Indicates the success/failure of Calendar creation. Filled in
342 * @return A Calendar if created successfully. NULL otherwise.
345 static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, UErrorCode& success);
348 * Creates a Calendar using the default timezone and the given locale.
351 * @param success Indicates the success/failure of Calendar creation. Filled in
354 * @return A Calendar if created successfully. NULL otherwise.
357 static Calendar* U_EXPORT2 createInstance(const Locale& aLocale, UErrorCode& success);
360 * Creates a Calendar using the given timezone and given locale.
361 * The Calendar takes ownership of zoneToAdopt; the
366 * @param success Indicates the success/failure of Calendar creation. Filled in
369 * @return A Calendar if created successfully. NULL otherwise.
372 static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const Locale& aLocale, UErrorCode& success);
375 * Gets a Calendar using the given timezone and given locale. The TimeZone
380 * @param success Indicates the success/failure of Calendar creation. Filled in
383 * @return A Calendar if created successfully. NULL otherwise.
386 static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, const Locale& aLocale, UErrorCode& success);
429 * Gets this Calendar's time as milliseconds. May involve recalculation of time due
444 * Sets this Calendar's current time with the given UDate. The time specified should
456 * Compares the equality of two Calendar objects. Objects of different subclasses
457 * are considered unequal. This comparison is very exacting; two Calendar objects
461 * @param that The Calendar object to be compared with.
462 * @return True if the given Calendar is the same as this Calendar; false
466 virtual UBool operator==(const Calendar& that) const;
469 * Compares the inequality of two Calendar objects.
471 * @param that The Calendar object to be compared with.
472 * @return True if the given Calendar is not the same as this Calendar; false
476 UBool operator!=(const Calendar& that) const {return !operator==(that);}
479 * Returns TRUE if the given Calendar object is equivalent to this
480 * one. An equivalent Calendar will behave exactly as this one
482 * the operator==() method to return TRUE, the other Calendar must
485 * @param other the Calendar to be compared with this Calendar
488 virtual UBool isEquivalentTo(const Calendar& other) const;
491 * Compares the Calendar time, whereas Calendar::operator== compares the equality of
492 * Calendar objects.
494 * @param when The Calendar to be compared with this Calendar. Although this is a
500 * @return True if the current time of this Calendar is equal to the time of
501 * Calendar when; false otherwise.
504 UBool equals(const Calendar& when, UErrorCode& status) const;
507 * Returns true if this Calendar's current time is before "when"'s current time.
509 * @param when The Calendar to be compared with this Calendar. Although this is a
515 * @return True if the current time of this Calendar is before the time of
516 * Calendar when; false otherwise.
519 UBool before(const Calendar& when, UErrorCode& status) const;
522 * Returns true if this Calendar's current time is after "when"'s current time.
524 * @param when The Calendar to be compared with this Calendar. Although this is a
530 * @return True if the current time of this Calendar is after the time of
531 * Calendar when; false otherwise.
534 UBool after(const Calendar& when, UErrorCode& status) const;
539 * the current time of the calendar, call add(Calendar::DATE, -5). When adding on
540 * the month or Calendar::MONTH field, other fields like date might conflict and
561 * the current time of the calendar, call add(Calendar::DATE, -5). When adding on
562 * the month or Calendar::MONTH field, other fields like date might conflict and
584 * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it
585 * will roll the year value in the range between getMinimum(Calendar::YEAR) and the
586 * value returned by getMaximum(Calendar::YEAR). When rolling on the month or
587 * Calendar::MONTH field, other fields like date might conflict and, need to be
600 * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
619 * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it
620 * will roll the year value in the range between getMinimum(Calendar::YEAR) and the
621 * value returned by getMaximum(Calendar::YEAR). When rolling on the month or
622 * Calendar::MONTH field, other fields like date might conflict and, need to be
635 * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
653 * roll(Calendar::DATE, +1, status). When rolling on the month or
654 * Calendar::MONTH field, other fields like date might conflict and, need to be
667 * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
686 * roll(Calendar::DATE, +1, status). When rolling on the month or
687 * Calendar::MONTH field, other fields like date might conflict and, need to be
700 * When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the
724 * Calendar::MONTH)</code> returns 3, then this calendar is set to
738 * int y = cal->fieldDifference(when, Calendar::YEAR, err);
739 * int m = cal->fieldDifference(when, Calendar::MONTH, err);
740 * int d = cal->fieldDifference(when, Calendar::DATE, err);</pre>
750 * int m1 = cal->fieldDifference(date2, Calendar::MONTH, err);
751 * int d1 = cal->fieldDifference(date2, Calendar::DATE, err);
753 * int m2 = cal->fieldDifference(date1, Calendar::MONTH, err);
754 * int d2 = cal->fieldDifference(date1, Calendar::DATE, err);</pre>
781 * Calendar::MONTH)</code> returns 3, then this calendar is set to
795 * int y = cal->fieldDifference(when, Calendar::YEAR, err);
796 * int m = cal->fieldDifference(when, Calendar::MONTH, err);
797 * int d = cal->fieldDifference(when, Calendar::DATE, err);</pre>
807 * int m1 = cal->fieldDifference(date2, Calendar::MONTH, err);
808 * int d1 = cal->fieldDifference(date2, Calendar::DATE, err);
810 * int m2 = cal->fieldDifference(date1, Calendar::MONTH, err);
811 * int d2 = cal->fieldDifference(date1, Calendar::DATE, err);</pre>
831 * Sets the calendar's time zone to be the one passed in. The Calendar takes ownership
852 * or this Calendar is destroyed.
862 * with this Calendar is the default TimeZone as returned by TimeZone::createDefault().
870 * Queries if the current date for this Calendar is in Daylight Savings Time.
873 * @return True if the current date for this Calendar is in Daylight Savings Time,
1113 * The version of this function on Calendar uses an iterative algorithm to determine the
1120 * @return the minimum of the given field for the current date of this Calendar
1130 * The version of this function on Calendar uses an iterative algorithm to determine the
1137 * @return the minimum of the given field for the current date of this Calendar
1149 * The version of this function on Calendar uses an iterative algorithm to determine the
1156 * @return the maximum of the given field for the current date of this Calendar
1168 * The version of this function on Calendar uses an iterative algorithm to determine the
1175 * @return the maximum of the given field for the current date of this Calendar
1215 * resolving of time in Calendar. Unset fields have a value of zero, by definition.
1226 * resolving of time in Calendar. Unset fields have a value of zero, by definition.
1330 * Concrete subclasses of Calendar must implement getDynamicClassID() and also a
1343 * Returns the calendar type name string for this Calendar object.
1379 * calendar system associated with this Calendar (the locale's region is
1422 * Returns TRUE if this Calendar's current date-time is in the weekend in
1424 * @return TRUE if this Calendar's current date-time is in the weekend in
1433 * Constructs a Calendar with the default time zone as returned by
1436 * @param success Indicates the status of Calendar object construction. Returns
1440 Calendar(UErrorCode& success);
1445 * @param source Calendar object to be copied from
1448 Calendar(const Calendar& source);
1453 * @param right Calendar object to be copied
1456 Calendar& operator=(const Calendar& right);
1459 * Constructs a Calendar with the given time zone and locale. Clients are no longer
1464 * @param success Indicates the status of Calendar object construction. Returns
1468 Calendar(TimeZone* zone, const Locale& aLocale, UErrorCode& success);
1471 * Constructs a Calendar with the given time zone and locale.
1475 * @param success Indicates the status of Calendar object construction. Returns
1479 Calendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& success);
1482 * Converts Calendar's time field values to GMT as milliseconds.
1505 * Gets this Calendar's current time as a long.
1516 * Sets this Calendar's current time from the given long value.
1671 * implementation than the default implementation in Calendar.
1680 * default implementation in Calendar.
1710 * The Calendar implementation assumes yearWoy is in extended gregorian form
1855 * True if the fields are in sync with the currently set time of this Calendar.
1948 * <p>The default implementation in <code>Calendar</code> implements
2156 * Time zone affects the time calculation done by Calendar. Calendar subclasses use
2176 * must be set when a Calendar is constructed. For example, in US locale,
2179 * a Calendar is constructed.
2189 * Sets firstDayOfWeek and minimalDaysInFirstWeek. Called at Calendar construction
2299 * <code>Calendar::validateField()</code>.
2349 * Register a new Calendar factory. The factory will be adopted.
2372 * Multiple Calendar Implementation
2378 * Multiple Calendar Implementation
2384 * Multiple Calendar Implementation
2435 inline Calendar*
2436 Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode)
2445 Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status)
2452 Calendar::roll(EDateFields field, UBool up, UErrorCode& status)
2467 Calendar::internalSet(UCalendarDateFields field, int32_t value)
2476 inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek)