Skip to content

Commit

Permalink
ICU-22991 Change fIsTimeSet fAreFieldsSet fAreAllFieldsSet fAreFields…
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankYFTang committed Dec 23, 2024
1 parent b0ae845 commit ff31805
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions icu4c/source/i18n/unicode/calendar.h
Original file line number Diff line number Diff line change
Expand Up @@ -1882,10 +1882,9 @@ class U_I18N_API Calendar : public UObject {
int32_t getActualHelper(UCalendarDateFields field, int32_t startValue, int32_t endValue, UErrorCode &status) const;


protected:
private:
/**
* The flag which indicates if the current time is set in the calendar.
* @stable ICU 2.0
*/
UBool fIsTimeSet;

Expand All @@ -1897,14 +1896,12 @@ class U_I18N_API Calendar : public UObject {
* <P>
* This should really be named areFieldsInSync, but the old name is retained
* for backward compatibility.
* @stable ICU 2.0
*/
UBool fAreFieldsSet;

/**
* True if all of the fields have been set. This is initially false, and set to
* true by computeFields().
* @stable ICU 2.0
*/
UBool fAreAllFieldsSet;

Expand All @@ -1913,10 +1910,10 @@ class U_I18N_API Calendar : public UObject {
* computed. This occurs only in setTimeInMillis(). A calendar set
* to this state will compute all fields from the time if it becomes
* necessary, but otherwise will delay such computation.
* @stable ICU 3.0
*/
UBool fAreFieldsVirtuallySet;

protected:
/**
* Get the current time without recomputing.
*
Expand All @@ -1940,14 +1937,13 @@ class U_I18N_API Calendar : public UObject {
*/
int32_t fFields[UCAL_FIELD_COUNT];

#ifndef U_FORCE_HIDE_DEPRECATED_API
private:
/**
* The flags which tell if a specified time field for the calendar is set.
* @deprecated ICU 2.8 use (fStamp[n]!=kUnset)
*/
UBool fIsSet[UCAL_FIELD_COUNT];
#endif // U_FORCE_HIDE_DEPRECATED_API

protected:
/** Special values of stamp[]
* @stable ICU 2.0
*/
Expand All @@ -1957,14 +1953,15 @@ class U_I18N_API Calendar : public UObject {
kMinimumUserStamp
};

private:
/**
* Pseudo-time-stamps which specify when each field was set. There
* are two special values, UNSET and INTERNALLY_SET. Values from
* MINIMUM_USER_SET to Integer.MAX_VALUE are legal user set values.
* @stable ICU 2.0
*/
int32_t fStamp[UCAL_FIELD_COUNT];

protected:
/**
* Subclasses may override this method to compute several fields
* specific to each calendar system. These are:
Expand Down

0 comments on commit ff31805

Please sign in to comment.