Home | History | Annotate | Download | only in unicode

Lines Matching refs:field

83  * A <code>Calendar</code> object can produce all the time field values
97 * the Gregorian calendar, the default for a field is the same as that of the
105 * most recently set single field, will be used.
152 * <code>Calendar</code> provides an API for field "rolling", where fields
159 * adding the specified (signed) amount of time to a particular time field.
169 * Field IDs for date and time. Used to specify date/time fields. ERA is calendar
207 * who create locale resources for the field of first-day-of-week should be aware of
393 * to previous calls to set time field values. The time specified is non-local UTC
398 * previously set in the time field is invalid or restricted by
412 * set in the time field
461 * previously set in the time field is invalid or restricted by
476 * previously set in the time field is invalid or restricted by
491 * previously set in the time field is invalid or restricted by
501 * time field, based on the calendar's rules. For example, to subtract 5 days from
503 * the month or Calendar::MONTH field, other fields like date might conflict and
507 * @param field Specifies which date field to modify.
508 * @param amount The amount of time to be added to the field, in the natural unit
509 * for that field (e.g., days for the day fields, hours for the hour
510 * field.)
512 * previously set in the time field is invalid or restricted by
514 * @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
516 virtual void add(EDateFields field, int32_t amount, UErrorCode& status);
520 * time field, based on the calendar's rules. For example, to subtract 5 days from
522 * the month or Calendar::MONTH field, other fields like date might conflict and
526 * @param field Specifies which date field to modify.
527 * @param amount The amount of time to be added to the field, in the natural unit
528 * for that field (e.g., days for the day fields, hours for the hour
529 * field.)
531 * previously set in the time field is invalid or restricted by
535 virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode& status);
538 * Time Field Rolling function. Rolls (up/down) a single unit of time on the given
539 * time field. For example, to roll the current date up by one day, call
540 * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it
543 * Calendar::MONTH field, other fields like date might conflict and, need to be
547 * hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the hour value in the range
552 * @param field The time field.
553 * @param up Indicates if the value of the specified time field is to be rolled
556 * previously set in the time field is invalid or restricted by
558 * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, UErrorCode& status) instead.
560 inline void roll(EDateFields field, UBool up, UErrorCode& status);
563 * Time Field Rolling function. Rolls (up/down) a single unit of time on the given
564 * time field. For example, to roll the current date up by one day, call
565 * roll(Calendar::DATE, true). When rolling on the year or Calendar::YEAR field, it
568 * Calendar::MONTH field, other fields like date might conflict and, need to be
572 * hour-in-day or Calendar::HOUR_OF_DAY field, it will roll the hour value in the range
577 * @param field The time field.
578 * @param up Indicates if the value of the specified time field is to be rolled
581 * previously set in the time field is invalid or restricted by
585 inline void roll(UCalendarDateFields field, UBool up, UErrorCode& status);
588 * Time Field Rolling function. Rolls by the given amount on the given
589 * time field. For example, to roll the current date up by one day, call
591 * Calendar::MONTH field, other fields like date might conflict and, need to be
595 * calendar. When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will
602 * @param field The time field.
605 * previously set in the time field is invalid, this will be set to
607 * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
609 virtual void roll(EDateFields field, int32_t amount, UErrorCode& status);
612 * Time Field Rolling function. Rolls by the given amount on the given
613 * time field. For example, to roll the current date up by one day, call
615 * Calendar::MONTH field, other fields like date might conflict and, need to be
619 * calendar. When rolling on the hour-in-day or Calendar::HOUR_OF_DAY field, it will
626 * @param field The time field.
629 * previously set in the time field is invalid, this will be set to
633 virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status);
641 * <code>field</code> parameter specifies the units of the return
649 * this method has the side effect of calling <code>add(field,
653 * field of interest, then with progressively smaller fields. For
681 * @param field the field in which to compute the result
683 * previously set in the time field is invalid, this will be set to
687 * <code>field</code>.
688 * @deprecated ICU 2.6. Use fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status).
690 virtual int32_t fieldDifference(UDate when, EDateFields field, UErrorCode& status);
698 * <code>field</code> parameter specifies the units of the return
706 * this method has the side effect of calling <code>add(field,
710 * field of interest, then with progressively smaller fields. For
738 * @param field the field in which to compute the result
740 * previously set in the time field is invalid, this will be set to
744 * <code>field</code>.
747 virtual int32_t fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status);
802 * such dates will cause an error when computing time from the time field values
876 * Gets the minimum value for the given time field. e.g., for Gregorian
879 * @param field The given time field.
880 * @return The minimum value for the given time field.
881 * @deprecated ICU 2.6. Use getMinimum(UCalendarDateFields field) instead.
883 virtual int32_t getMinimum(EDateFields field) const;
886 * Gets the minimum value for the given time field. e.g., for Gregorian
889 * @param field The given time field.
890 * @return The minimum value for the given time field.
893 virtual int32_t getMinimum(UCalendarDateFields field) const;
896 * Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
899 * @param field The given time field.
900 * @return The maximum value for the given time field.
901 * @deprecated ICU 2.6. Use getMaximum(UCalendarDateFields field) instead.
903 virtual int32_t getMaximum(EDateFields field) const;
906 * Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
909 * @param field The given time field.
910 * @return The maximum value for the given time field.
913 virtual int32_t getMaximum(UCalendarDateFields field) const;
916 * Gets the highest minimum value for the given field if varies. Otherwise same as
919 * @param field The given time field.
920 * @return The highest minimum value for the given time field.
921 * @deprecated ICU 2.6. Use getGreatestMinimum(UCalendarDateFields field) instead.
923 virtual int32_t getGreatestMinimum(EDateFields field) const;
926 * Gets the highest minimum value for the given field if varies. Otherwise same as
929 * @param field The given time field.
930 * @return The highest minimum value for the given time field.
933 virtual int32_t getGreatestMinimum(UCalendarDateFields field) const;
936 * Gets the lowest maximum value for the given field if varies. Otherwise same as
939 * @param field The given time field.
940 * @return The lowest maximum value for the given time field.
941 * @deprecated ICU 2.6. Use getLeastMaximum(UCalendarDateFields field) instead.
943 virtual int32_t getLeastMaximum(EDateFields field) const;
946 * Gets the lowest maximum value for the given field if varies. Otherwise same as
949 * @param field The given time field.
950 * @return The lowest maximum value for the given time field.
953 virtual int32_t getLeastMaximum(UCalendarDateFields field) const;
956 * Return the minimum value that this field could have, given the current date.
960 * actual minimum value for the field. There is almost always a more efficient way to
964 * @param field the field to determine the minimum of
966 * @return the minimum of the given field for the current date of this Calendar
967 * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field, UErrorCode& status) instead.
969 int32_t getActualMinimum(EDateFields field, UErrorCode& status) const;
972 * Return the minimum value that this field could have, given the current date.
976 * actual minimum value for the field. There is almost always a more efficient way to
980 * @param field the field to determine the minimum of
982 * @return the minimum of the given field for the current date of this Calendar
985 virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode& status) const;
988 * Return the maximum value that this field could have, given the current date.
989 * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
994 * actual maximum value for the field. There is almost always a more efficient way to
998 * @param field the field to determine the maximum of
1000 * @return the maximum of the given field for the current date of this Calendar
1001 * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field, UErrorCode& status) instead.
1003 int32_t getActualMaximum(EDateFields field, UErrorCode& status) const;
1006 * Return the maximum value that this field could have, given the current date.
1007 * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
1012 * actual maximum value for the field. There is almost always a more efficient way to
1016 * @param field the field to determine the maximum of
1018 * @return the maximum of the given field for the current date of this Calendar
1021 virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const;
1024 * Gets the value for a given time field. Recalculate the current time field values
1030 * @param field The given time field.
1032 * @return The value for the given time field, or zero if the field is unset,
1033 * and set() has been called for any other field.
1034 * @deprecated ICU 2.6. Use get(UCalendarDateFields field, UErrorCode& status) instead.
1036 int32_t get(EDateFields field, UErrorCode& status) const;
1039 * Gets the value for a given time field. Recalculate the current time field values
1045 * @param field The given time field.
1047 * @return The value for the given time field, or zero if the field is unset,
1048 * and set() has been called for any other field.
1051 int32_t get(UCalendarDateFields field, UErrorCode& status) const;
1054 * Determines if the given time field has a value set. This can affect in the
1057 * @param field The given time field.
1058 * @return True if the given time field has a value set; false otherwise.
1059 * @deprecated ICU 2.6. Use isSet(UCalendarDateFields field) instead.
1061 UBool isSet(EDateFields field) const;
1064 * Determines if the given time field has a value set. This can affect in the
1067 * @param field The given time field.
1068 * @return True if the given time field has a value set; false otherwise.
1071 UBool isSet(UCalendarDateFields field) const;
1074 * Sets the given time field with the given value.
1076 * @param field The given time field.
1077 * @param value The value to be set for the given time field.
1078 * @deprecated ICU 2.6. Use set(UCalendarDateFields field, int32_t value) instead.
1080 void set(EDateFields field, int32_t value);
1083 * Sets the given time field with the given value.
1085 * @param field The given time field.
1086 field.
1089 void set(UCalendarDateFields field, int32_t value);
1092 * Sets the values for the fields YEAR, MONTH, and DATE. Other field values are
1095 * @param year The value used to set the YEAR time field.
1096 * @param month The value used to set the MONTH time field. Month value is 0-based.
1098 * @param date The value used to set the DATE time field.
1105 * field values are retained; call clear() first if this is not desired.
1107 * @param year The value used to set the YEAR time field.
1108 * @param month The value used to set the MONTH time field. Month value is
1110 * @param date The value used to set the DATE time field.
1111 * @param hour The value used to set the HOUR_OF_DAY time field.
1112 * @param minute The value used to set the MINUTE time field.
1119 * Other field values are retained; call clear() first if this is not desired.
1121 * @param year The value used to set the YEAR time field.
1122 * @param month The value used to set the MONTH time field. Month value is
1124 * @param date The value used to set the DATE time field.
1125 * @param hour The value used to set the HOUR_OF_DAY time field.
1126 * @param minute The value used to set the MINUTE time field.
1127 * @param second The value used to set the SECOND time field.
1134 * them a value of zero. The field values will be determined during the next
1141 * Clears the value in the given time field, both making it unset and assigning it a
1142 * value of zero. This field value will be determined during the next resolving of
1145 * @param field The time field to be cleared.
1146 * @deprecated ICU 2.6. Use clear(UCalendarDateFields field) instead.
1148 void clear(EDateFields field);
1151 * Clears the value in the given time field, both making it unset and assigning it a
1152 * value of zero. This field value will be determined during the next resolving of
1155 * @param field The time field to be cleared.
1158 void clear(UCalendarDateFields field);
1239 * Converts Calendar's time field values to GMT as milliseconds.
1242 * previously set in the time field is invalid or restricted by
1249 * Converts GMT as milliseconds to time field values. This allows you to sync up the
1250 * time field values with a new time that is set for the calendar. This method
1255 * previously set in the time field is invalid or restricted by
1265 * previously set in the time field is invalid or restricted by
1276 * previously set in the time field is invalid or restricted by
1284 * unset fields in the time field list.
1287 * previously set in the time field is invalid or restricted by
1294 * Gets the value for a given time field. Subclasses can use this function to get
1295 * field values without forcing recomputation of time.
1297 * @param field The given time field.
1298 * @return The value for the given time field.
1299 * @deprecated ICU 2.6. Use internalGet(UCalendarDateFields field) instead.
1301 inline int32_t internalGet(EDateFields field) const {return fFields[field];}
1304 * Gets the value for a given time field. Subclasses can use this function to get
1305 * field values without forcing recomputation of time. If the field's stamp is UNSET,
1308 * @param field The given time field.
1309 * @param defaultValue a default value used if the field is unset.
1310 * @return The value for the given time field.
1313 inline int32_t internalGet(UCalendarDateFields field, int32_t defaultValue) const {return fStamp[field]>kUnset ? fFields[field] : defaultValue;}
1316 * Gets the value for a given time field. Subclasses can use this function to get
1317 * field values without forcing recomputation of time.
1319 * @param field The given time field.
1320 * @return The value for the given time field.
1323 inline int32_t internalGet(UCalendarDateFields field) const {return fFields[field];}
1326 * Sets the value for a given time field. This is a fast internal method for
1330 * @param field The given time field.
1331 * @param value The value for the given time field.
1332 * @deprecated ICU 2.6. Use internalSet(UCalendarDateFields field, int32_t value) instead.
1334 void internalSet(EDateFields field, int32_t value);
1337 * Sets the value for a given time field. This is a fast internal method for
1341 * @param field The given time field.
1342 * @param value The value for the given time field.
1345 inline void internalSet(UCalendarDateFields field, int32_t value);
1353 virtual void prepareGetActual(UCalendarDateFields field, UBool isMinimum, UErrorCode &status);
1383 * @param field one of the above field numbers
1388 virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const = 0;
1391 * Return a limit for a field.
1392 * @param field the field, from <code>0..UCAL_MAX_FIELD</code>
1397 virtual int32_t getLimit(UCalendarDateFields field, ELimitType limitType) const;
1437 * use the UCAL_EXTENDED_YEAR field or the UCAL_YEAR and supra-year fields (such
1449 * @param bestField which field to use to calculate the date
1467 * the JULIAN_DAY field directly, or other fields.
1505 * Values for field resolution tables
1512 /** Value to be bitwised "ORed" against resolve table field values for remapping. Example: (UCAL_DATE | kResolveRemap) in 1st column will cause 'UCAL_DATE' to be returned, but will not examine the value of UCAL_DATE. */
1538 * Given a precedence table, return the newest field combination in
1543 * lines. Each line is an array of field numbers. Within a line, if
1545 * the stamp of the most recently set field. If any field of a line is
1547 * the newest time stamp is selected. The first field of the line is
1550 * <p>In some cases, it may be desirable to map a line to field that
1551 * whose stamp is NOT examined. For example, if the best field is
1555 * field value. This field will NOT be examined; it only determines
1558 * <p>If all lines of a group contain at least one unset field, then no
1573 * Return the field that is newer, either defaultField, or
1583 * @param field The field being investigated
1584 * @param startValue starting (least max) value of field
1585 * @param endValue ending (greatest max) value of field
1589 int32_t getActualHelper(UCalendarDateFields field, int32_t startValue, int32_t endValue, UErrorCode &status) const;
1601 * If false, then the next attempt to get the value of a field will
1603 * field.
1651 * The flags which tell if a specified time field for the calendar is set.
1666 * Pseudo-time-stamps which specify when each field was set. There
1759 * Adjust the specified field so that it is within
1762 * field for a calendar set to April 31 would cause it to be set
1774 * a slow, iterative algorithm for a particular field, it would be
1775 * unwise to attempt to call <code>pinField</code> for that field. If you
1777 * something more efficient for that field.
1779 * @param field The calendar field whose value should be pinned.
1787 virtual void pinField(UCalendarDateFields field, UErrorCode& status);
1925 * previously set in the time field is invalid or restricted by
1987 * <p>The YEAR_WOY field is computed simplistically. It is equal to YEAR
1992 * is part of a calendar system with an N-year cycle field CYCLE, then
1997 * complexity is not warranted, since the intention of the YEAR_WOY field is
1999 * proleptic Gregorian calendar, which has no field larger than a year.
2005 * Ensure that each field is within its valid range by calling {@link
2006 * #validateField(int, int&)} on each field that has been set. This method
2015 * Validate a single field of this calendar. Subclasses should
2022 virtual void validateField(UCalendarDateFields field, UErrorCode &status);
2025 * Validate a single field of this calendar given its minimum and
2026 * maximum allowed value. If the field is out of range,
2032 void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status);
2152 Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status)
2154 roll(field, (int32_t)(up ? +1 : -1), status);
2158 Calendar::roll(EDateFields field, UBool up, UErrorCode& status)
2160 roll((UCalendarDateFields) field, up, status);
2172 Calendar::internalSet(UCalendarDateFields field, int32_t value)
2174 fFields[field] = value;
2175 fStamp[field] = kInternallySet;
2176 fIsSet[field] = TRUE; // Remove later