Loading...
Searching...
No Matches
icu::InitialTimeZoneRule Class Reference

`InitialTimeZoneRule` represents a time zone rule representing a time zone effective from the beginning and has no actual start times. More...

`#include <tzrule.h>`

Inheritance diagram for icu::InitialTimeZoneRule:

## Public Member Functions

| 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 of daylight saving offset adjustment.
| InitialTimeZoneRule (const InitialTimeZoneRule &source)
| Copy constructor.
virtual | ~InitialTimeZoneRule ()
| Destructor.
virtual InitialTimeZoneRule * | clone () const override
| Clone this InitialTimeZoneRule object polymorphically.
InitialTimeZoneRule & | operator= (const InitialTimeZoneRule &right)
| Assignment operator.
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 | isEquivalentTo (const TimeZoneRule &that) const override
| Returns if this rule represents the same rule and offsets as another.
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 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 | 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.
virtual UClassID | getDynamicClassID () const override
| Returns a unique class ID POLYMORPHICALLY.
Public Member Functions inherited from icu::TimeZoneRule
virtual | ~TimeZoneRule ()
| Destructor.
UnicodeString & | getName (UnicodeString &name) const
| Fills in "name" with the name of this time zone.
int32_t | getRawOffset () const
| Gets the standard time offset.
int32_t | getDSTSavings () const
| Gets the amount of daylight saving delta time from the standard time.
Public Member Functions inherited from icu::UObject
virtual | ~UObject ()
| Destructor.

## Static Public Member Functions

static UClassID | getStaticClassID ()
| Return the class ID for this class.

## Additional Inherited Members

Protected Member Functions inherited from icu::TimeZoneRule
| 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.

## Detailed Description

`InitialTimeZoneRule` represents a time zone rule representing a time zone effective from the beginning and has no actual start times.

Stable
  ICU 3.8

Definition at line 202 of file tzrule.h.

## Constructor & Destructor Documentation

## InitialTimeZoneRule() [1/2]

icu::InitialTimeZoneRule::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 of daylight saving offset adjustment.

Parameters

  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.

Stable
  ICU 3.8

Referenced by clone(), InitialTimeZoneRule(), and operator=().

## InitialTimeZoneRule() [2/2]

icu::InitialTimeZoneRule::InitialTimeZoneRule | ( | const InitialTimeZoneRule & | source | ) |

Copy constructor.

Parameters

  source | The InitialTimeZoneRule object to be copied.

Stable
  ICU 3.8

References InitialTimeZoneRule().

## ~InitialTimeZoneRule()

virtual icu::InitialTimeZoneRule::~InitialTimeZoneRule | ( |  | ) |

virtual

Destructor.

Stable
  ICU 3.8

## Member Function Documentation

## clone()

virtual InitialTimeZoneRule * icu::InitialTimeZoneRule::clone | ( |  | ) | const

override virtual

Clone this InitialTimeZoneRule object polymorphically.

The caller owns the result and should delete it when done.

Returns
  A copy of the object.

Stable
  ICU 3.8

Implements icu::TimeZoneRule.

References InitialTimeZoneRule().

## getDynamicClassID()

virtual UClassID icu::InitialTimeZoneRule::getDynamicClassID | ( |  | ) | const

override virtual

Returns a unique class ID POLYMORPHICALLY.

Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic operator==() and clone() methods call this method.

Returns
  The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs.

Stable
  ICU 3.8

Reimplemented from icu::UObject.

## getFinalStart()

virtual UBool icu::InitialTimeZoneRule::getFinalStart | ( | int32_t | prevRawOffset,
|  | int32_t | prevDSTSavings,
|  | UDate & | result ) const

override virtual

Gets the final time when this rule takes effect.

Parameters

  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.

Returns
  true if the start time is available. When false is returned, output parameter "result" is unchanged.

Stable
  ICU 3.8

Implements icu::TimeZoneRule.

## getFirstStart()

virtual UBool icu::InitialTimeZoneRule::getFirstStart | ( | int32_t | prevRawOffset,
|  | int32_t | prevDSTSavings,
|  | UDate & | result ) const

override virtual

Gets the very first time when this rule takes effect.

Parameters

  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.

Returns
  true if the start time is available. When false is returned, output parameter "result" is unchanged.

Stable
  ICU 3.8

Implements icu::TimeZoneRule.

## getNextStart()

virtual UBool icu::InitialTimeZoneRule::getNextStart | ( | UDate | base,
|  | int32_t | prevRawOffset,
|  | int32_t | prevDSTSavings,
|  | UBool | inclusive,
|  | UDate & | result ) const

override virtual

Gets the first time when this rule takes effect after the specified time.

Parameters

  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.

Returns
  true if the start time is available. When false is returned, output parameter "result" is unchanged.

Stable
  ICU 3.8

Implements icu::TimeZoneRule.

## getPreviousStart()

virtual UBool icu::InitialTimeZoneRule::getPreviousStart | ( | UDate | base,
|  | int32_t | prevRawOffset,
|  | int32_t | prevDSTSavings,
|  | UBool | inclusive,
|  | UDate & | result ) const

override virtual

Gets the most recent time when this rule takes effect before the specified time.

Parameters

  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.

Returns
  true if the start time is available. When false is returned, output parameter "result" is unchanged.

Stable
  ICU 3.8

Implements icu::TimeZoneRule.

## getStaticClassID()

UClassID icu::InitialTimeZoneRule::getStaticClassID | ( |  | ) |

static

Return the class ID for this class.

This is useful only for comparing to a return value from getDynamicClassID(). For example:

    .   Base* polymorphic_pointer = createPolymorphicObject();
    .   if (polymorphic_pointer->getDynamicClassID() ==
    .       erived::getStaticClassID()) ...

Returns
  The class ID for all objects of this class.

Stable
  ICU 3.8

## isEquivalentTo()

virtual UBool icu::InitialTimeZoneRule::isEquivalentTo | ( | const TimeZoneRule & | that | ) | const

override 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.

Parameters

  that | The `TimeZoneRule` object to be compared with.

Returns
  true if the other `TimeZoneRule` is equivalent to this one.

Stable
  ICU 3.8

Reimplemented from icu::TimeZoneRule.

References icu::TimeZoneRule::TimeZoneRule().

## operator!=()

virtual bool icu::InitialTimeZoneRule::operator!= | ( | const TimeZoneRule & | that | ) | const

override virtual

Return true if the given `TimeZoneRule` objects are semantically unequal.

Objects of different subclasses are considered unequal.

Parameters

  that | The object to be compared with.

Returns
  true if the given `TimeZoneRule` objects are semantically unequal.

Stable
  ICU 3.8

Reimplemented from icu::TimeZoneRule.

References icu::TimeZoneRule::TimeZoneRule().

## operator=()

InitialTimeZoneRule & icu::InitialTimeZoneRule::operator= | ( | const InitialTimeZoneRule & | right | ) |

Assignment operator.

Parameters

  right | The object to be copied.

Stable
  ICU 3.8

References InitialTimeZoneRule().

## operator==()

virtual bool icu::InitialTimeZoneRule::operator== | ( | const TimeZoneRule & | that | ) | const

override virtual

Return true if the given `TimeZoneRule` objects are semantically equal.

Objects of different subclasses are considered unequal.

Parameters

  that | The object to be compared with.

Returns
  true if the given `TimeZoneRule` objects are semantically equal.

Stable
  ICU 3.8

Reimplemented from icu::TimeZoneRule.

References icu::TimeZoneRule::TimeZoneRule().

The documentation for this class was generated from the following file:

- i18n/unicode/tzrule.h