TimeZoneRule is a class representing a rule for time zone.
More...
#include <tzrule.h>

Public Member Functions | |
| virtual | ~TimeZoneRule () |
| Destructor. | |
| virtual TimeZoneRule * | clone (void) const =0 |
| Clone this TimeZoneRule object polymorphically. | |
| virtual UBool | operator== (const TimeZoneRule &that) const |
Return true if the given TimeZoneRule objects are semantically equal. | |
| virtual UBool | operator!= (const TimeZoneRule &that) const |
Return true if the given TimeZoneRule objects are semantically unequal. | |
| UnicodeString & | getName (UnicodeString &name) const |
| Fills in "name" with the name of this time zone. | |
| int32_t | getRawOffset (void) const |
| Gets the standard time offset. | |
| int32_t | getDSTSavings (void) const |
| Gets the amount of daylight saving delta time from the standard time. | |
| virtual UBool | isEquivalentTo (const TimeZoneRule &other) const |
| Returns if this rule represents the same rule and offsets as another. | |
| virtual UBool | getFirstStart (int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const =0 |
| Gets the very first time when this rule takes effect. | |
| virtual UBool | getFinalStart (int32_t prevRawOffset, int32_t prevDSTSavings, UDate &result) const =0 |
| Gets the final time when this rule takes effect. | |
| 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 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. | |
Protected Member Functions | |
| 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 daylight saving offset adjustment. | |
| TimeZoneRule (const TimeZoneRule &source) | |
| Copy constructor. | |
| TimeZoneRule & | operator= (const TimeZoneRule &right) |
| Assignment operator. | |
TimeZoneRule is a class representing a rule for time zone.
TimeZoneRule has a set of time zone attributes, such as zone name, raw offset (UTC offset for standard time) and daylight saving time offset.
Definition at line 32 of file tzrule.h.
| virtual TimeZoneRule::~TimeZoneRule | ( | ) | [virtual] |
| TimeZoneRule::TimeZoneRule | ( | const UnicodeString & | name, | |
| int32_t | rawOffset, | |||
| int32_t | dstSavings | |||
| ) | [protected] |
Constructs a TimeZoneRule with the name, the GMT offset of its standard time and the amount of daylight saving offset adjustment.
| name | The time zone name. | |
| rawOffset | The UTC offset of its standard time in milliseconds. | |
| dstSavings | The amount of daylight saving offset adjustment in milliseconds. If this ia a rule for standard time, the value of this argument is 0. |
| TimeZoneRule::TimeZoneRule | ( | const TimeZoneRule & | source | ) | [protected] |
| virtual TimeZoneRule* TimeZoneRule::clone | ( | void | ) | const [pure virtual] |
Clone this TimeZoneRule object polymorphically.
The caller owns the result and should delete it when done.
Implemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
| int32_t TimeZoneRule::getDSTSavings | ( | void | ) | const |
Gets the amount of daylight saving delta time from the standard time.
| virtual UBool TimeZoneRule::getFinalStart | ( | int32_t | prevRawOffset, | |
| int32_t | prevDSTSavings, | |||
| UDate & | result | |||
| ) | const [pure virtual] |
Gets the final time when this rule takes effect.
| prevRawOffset | The standard time offset from UTC before this rule takes effect in milliseconds. | |
| prevDSTSavings | The amount of daylight saving offset from the standard time. | |
| result | Receives the final time when this rule takes effect. |
Implemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
| virtual UBool TimeZoneRule::getFirstStart | ( | int32_t | prevRawOffset, | |
| int32_t | prevDSTSavings, | |||
| UDate & | result | |||
| ) | const [pure virtual] |
Gets the very first time when this rule takes effect.
| prevRawOffset | The standard time offset from UTC before this rule takes effect in milliseconds. | |
| prevDSTSavings | The amount of daylight saving offset from the standard time. | |
| result | Receives the very first time when this rule takes effect. |
Implemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
| UnicodeString& TimeZoneRule::getName | ( | UnicodeString & | name | ) | const |
Fills in "name" with the name of this time zone.
| name | Receives the name of this time zone. |
| virtual UBool TimeZoneRule::getNextStart | ( | UDate | base, | |
| int32_t | prevRawOffset, | |||
| int32_t | prevDSTSavings, | |||
| UBool | inclusive, | |||
| UDate & | result | |||
| ) | const [pure virtual] |
Gets the first time when this rule takes effect after the specified time.
| base | The first start time after this base time will be returned. | |
| prevRawOffset | The standard time offset from UTC before this rule takes effect in milliseconds. | |
| prevDSTSavings | The amount of daylight saving offset from the standard time. | |
| inclusive | Whether the base time is inclusive or not. | |
| result | Receives The first time when this rule takes effect after the specified base time. |
Implemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
| virtual UBool TimeZoneRule::getPreviousStart | ( | UDate | base, | |
| int32_t | prevRawOffset, | |||
| int32_t | prevDSTSavings, | |||
| UBool | inclusive, | |||
| UDate & | result | |||
| ) | const [pure virtual] |
Gets the most recent time when this rule takes effect before the specified time.
| base | The most recent time before this base time will be returned. | |
| prevRawOffset | The standard time offset from UTC before this rule takes effect in milliseconds. | |
| prevDSTSavings | The amount of daylight saving offset from the standard time. | |
| inclusive | Whether the base time is inclusive or not. | |
| result | Receives The most recent time when this rule takes effect before the specified base time. |
Implemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
| int32_t TimeZoneRule::getRawOffset | ( | void | ) | const |
Gets the standard time offset.
| virtual UBool TimeZoneRule::isEquivalentTo | ( | const TimeZoneRule & | other | ) | const [virtual] |
Returns if this rule represents the same rule and offsets as another.
When two TimeZoneRule objects differ only its names, this method returns true.
| other | The TimeZoneRule object to be compared with. |
TimeZoneRule is the same as this one. Reimplemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
| virtual UBool TimeZoneRule::operator!= | ( | const TimeZoneRule & | that | ) | const [virtual] |
Return true if the given TimeZoneRule objects are semantically unequal.
Objects of different subclasses are considered unequal.
| that | The object to be compared with. |
TimeZoneRule objects are semantically unequal. Reimplemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
| TimeZoneRule& TimeZoneRule::operator= | ( | const TimeZoneRule & | right | ) | [protected] |
| virtual UBool TimeZoneRule::operator== | ( | const TimeZoneRule & | that | ) | const [virtual] |
Return true if the given TimeZoneRule objects are semantically equal.
Objects of different subclasses are considered unequal.
| that | The object to be compared with. |
TimeZoneRule objects are semantically equal. Reimplemented in InitialTimeZoneRule, AnnualTimeZoneRule, and TimeArrayTimeZoneRule.
1.5.7.1