19#if U_SHOW_CPLUSPLUS_API
21#if !UCONFIG_NO_FORMATTING
312 UBool inclusive,
UDate& result)
const override;
329 UBool inclusive,
UDate& result)
const override;
391 const DateTimeRule& dateTimeRule, int32_t startYear, int32_t endYear);
410 DateTimeRule* dateTimeRule, int32_t startYear, int32_t endYear);
547 UBool inclusive,
UDate& result)
const override;
564 UBool inclusive,
UDate& result)
const override;
753 UBool inclusive,
UDate& result)
const override;
770 UBool inclusive,
UDate& result)
const override;
774 enum { TIMEARRAY_STACK_BUFFER_SIZE = 32 };
776 UDate getUTC(
UDate time, int32_t raw, int32_t dst)
const;
779 int32_t fNumStartTimes;
781 UDate fLocalStartTimes[TIMEARRAY_STACK_BUFFER_SIZE];
AnnualTimeZoneRule is a class used for representing a time zone rule which takes effect annually.
virtual ~AnnualTimeZoneRule()
Destructor.
AnnualTimeZoneRule(const UnicodeString &name, int32_t rawOffset, int32_t dstSavings, DateTimeRule *dateTimeRule, int32_t startYear, int32_t endYear)
Constructs a AnnualTimeZoneRule with the name, the GMT offset of its standard time,...
static const int32_t MAX_YEAR
The constant representing the maximum year used for designating a rule is permanent.
virtual UClassID getDynamicClassID(void) const override
Returns a unique class ID POLYMORPHICALLY.
AnnualTimeZoneRule & operator=(const AnnualTimeZoneRule &right)
Assignment operator.
virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const override
Gets the first time when this rule takes effect after the specified time.
UBool getStartInYear(int32_t year, int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const
Gets the time when this rule takes effect in the given year.
const DateTimeRule * getRule(void) const
Gets the start date/time rule used by this rule.
AnnualTimeZoneRule(const UnicodeString &name, int32_t rawOffset, int32_t dstSavings, const DateTimeRule &dateTimeRule, int32_t startYear, int32_t endYear)
Constructs a AnnualTimeZoneRule with the name, the GMT offset of its standard time,...
virtual UBool isEquivalentTo(const TimeZoneRule &that) const override
Returns if this rule represents the same rule and offsets as another.
int32_t getEndYear(void) const
Gets the end year when this rule takes effect.
int32_t getStartYear(void) const
Gets the first year when this rule takes effect.
static UClassID getStaticClassID(void)
Return the class ID for this class.
virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const override
Gets the very first time when this rule takes effect.
virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const override
Gets the final time when this rule takes effect.
virtual AnnualTimeZoneRule * clone() const override
Clone this AnnualTimeZoneRule object polymorphically.
virtual bool operator==(const TimeZoneRule &that) const override
Return true if the given TimeZoneRule objects are semantically equal.
virtual bool operator!=(const TimeZoneRule &that) const override
Return true if the given TimeZoneRule objects are semantically unequal.
virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const override
Gets the most recent time when this rule takes effect before the specified time.
AnnualTimeZoneRule(const AnnualTimeZoneRule &source)
Copy constructor.
DateTimeRule is a class representing a time in a year by a rule specified by month,...
TimeRuleType
Time rule type constants.
InitialTimeZoneRule represents a time zone rule representing a time zone effective from the beginning...
InitialTimeZoneRule(const UnicodeString &name, int32_t rawOffset, int32_t dstSavings)
Constructs an InitialTimeZoneRule with the name, the GMT offset of its standard time and the amount o...
virtual bool operator==(const TimeZoneRule &that) const override
Return true if the given TimeZoneRule objects are semantically equal.
static UClassID getStaticClassID(void)
Return the class ID for this class.
virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const override
Gets the first time when this rule takes effect after the specified time.
virtual InitialTimeZoneRule * clone() const override
Clone this InitialTimeZoneRule object polymorphically.
virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const override
Gets the final time when this rule takes effect.
InitialTimeZoneRule & operator=(const InitialTimeZoneRule &right)
Assignment operator.
virtual bool operator!=(const TimeZoneRule &that) const override
Return true if the given TimeZoneRule objects are semantically unequal.
virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const override
Gets the most recent time when this rule takes effect before the specified time.
InitialTimeZoneRule(const InitialTimeZoneRule &source)
Copy constructor.
virtual ~InitialTimeZoneRule()
Destructor.
virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const override
Gets the very first time when this rule takes effect.
virtual UBool isEquivalentTo(const TimeZoneRule &that) const override
Returns if this rule represents the same rule and offsets as another.
virtual UClassID getDynamicClassID(void) const override
Returns a unique class ID POLYMORPHICALLY.
TimeArrayTimeZoneRule represents a time zone rule whose start times are defined by an array of millis...
virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const override
Gets the first time when this rule takes effect after the specified time.
virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const override
Gets the final time when this rule takes effect.
virtual ~TimeArrayTimeZoneRule()
Destructor.
DateTimeRule::TimeRuleType getTimeType(void) const
Gets the time type of the start times used by this rule.
TimeArrayTimeZoneRule(const UnicodeString &name, int32_t rawOffset, int32_t dstSavings, const UDate *startTimes, int32_t numStartTimes, DateTimeRule::TimeRuleType timeRuleType)
Constructs a TimeArrayTimeZoneRule with the name, the GMT offset of its standard time,...
virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const override
Gets the very first time when this rule takes effect.
virtual UBool isEquivalentTo(const TimeZoneRule &that) const override
Returns if this rule represents the same rule and offsets as another.
virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const override
Gets the most recent time when this rule takes effect before the specified time.
UBool getStartTimeAt(int32_t index, UDate &result) const
Gets a start time at the index stored in this rule.
static UClassID getStaticClassID(void)
Return the class ID for this class.
virtual bool operator==(const TimeZoneRule &that) const override
Return true if the given TimeZoneRule objects are semantically equal.
virtual UClassID getDynamicClassID(void) const override
Returns a unique class ID POLYMORPHICALLY.
TimeArrayTimeZoneRule & operator=(const TimeArrayTimeZoneRule &right)
Assignment operator.
TimeArrayTimeZoneRule(const TimeArrayTimeZoneRule &source)
Copy constructor.
virtual bool operator!=(const TimeZoneRule &that) const override
Return true if the given TimeZoneRule objects are semantically unequal.
int32_t countStartTimes(void) const
Returns the number of start times stored in this rule.
virtual TimeArrayTimeZoneRule * clone() const override
Clone this TimeArrayTimeZoneRule object polymorphically.
TimeZoneRule is a class representing a rule for time zone.
virtual UBool getFirstStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const =0
Gets the very first time when this rule takes effect.
TimeZoneRule(const UnicodeString &name, int32_t rawOffset, int32_t dstSavings)
Constructs a TimeZoneRule with the name, the GMT offset of its standard time and the amount of daylig...
virtual UBool getNextStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const =0
Gets the first time when this rule takes effect after the specified time.
virtual bool operator!=(const TimeZoneRule &that) const
Return true if the given TimeZoneRule objects are semantically unequal.
int32_t getRawOffset(void) const
Gets the standard time offset.
virtual ~TimeZoneRule()
Destructor.
virtual UBool isEquivalentTo(const TimeZoneRule &other) const
Returns if this rule represents the same rule and offsets as another.
virtual UBool getPreviousStart(UDate base, int32_t prevRawOffset, int32_t prevDSTSavings, UBool inclusive, UDate &result) const =0
Gets the most recent time when this rule takes effect before the specified time.
virtual bool operator==(const TimeZoneRule &that) const
Return true if the given TimeZoneRule objects are semantically equal.
int32_t getDSTSavings(void) const
Gets the amount of daylight saving delta time from the standard time.
TimeZoneRule & operator=(const TimeZoneRule &right)
Assignment operator.
virtual UBool getFinalStart(int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const =0
Gets the final time when this rule takes effect.
TimeZoneRule(const TimeZoneRule &source)
Copy constructor.
UnicodeString & getName(UnicodeString &name) const
Fills in "name" with the name of this time zone.
virtual TimeZoneRule * clone() const =0
Clone this TimeZoneRule object polymorphically.
UObject is the common ICU "boilerplate" class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: Rule for specifying date and time in an year.
int8_t UBool
The ICU boolean type, a signed-byte integer.
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
double UDate
Date and Time data type.