#include <mw/vtzrules.h>
class TTzRule |
Public Member Functions | |
---|---|
TTzRule(TInt16, TInt16, TInt16, TInt16, TMonth, TTzRuleDay, TUint8, TUint8, TTzTimeReference, TUint16) | |
TTzRule() | |
TTzRule(const TTzRule &) | |
TTzRule(TTimeWithReference, TTimeWithReference, TInt16, TInt16, TMonth, TTzRuleDay, TUint8, TUint8, TTzTimeReference, TUint16) | |
IMPORT_C TVTzActualisedRule | Actualise(TInt) |
IMPORT_C TVTzActualisedRule | ActualiseL(TInt) |
void | ExternalizeL(RWriteStream &) |
void | InternalizeL(RReadStream &) |
TBool | RuleApplies(const TTime &, const TTime &) |
Encapsulates one time zone rule.
IMPORT_C | TTzRule | ( | TInt16 | aFromYear, |
TInt16 | aToYear, | |||
TInt16 | aOldOffset, | |||
TInt16 | aNewOffset, | |||
TMonth | aMonth, | |||
TTzRuleDay | aDayRule, | |||
TUint8 | aDayOfMonth, | |||
TUint8 | aDayOfWeek, | |||
TTzTimeReference | aTimeReference, | |||
TUint16 | aTimeOfChange | |||
) |
Constructor for a time zone rule.
Parameter | Description |
---|---|
aFromYear | The first year in which the rule applies. |
aToYear | The last year in which the rule applies. |
aOldOffset | The UTC offset in minutes which applies before the DST change. |
aNewOffset | The UTC offset in minutes which applies after the DST change. |
aMonth | The month in which the DST change occurs. |
aDayRule | The rule defining on which day the DST change takes place. |
aDayOfMonth | The number of the day within the month, offset from zero. Used in conjunction with aDayRule to define the day where DST changes. |
aDayOfWeek | The number of the day within the week, the numerical equivalent of a TDay value. Used in conjunction with aDayRule to define the day where DST changes. |
aTimeReference | Defines whether aTimeOfChange is a local (wall-clock) time or a UTC time. |
aTimeOfChange | The time of the DST change in minutes from midnight. |
IMPORT_C | TTzRule | ( | ) |
Default constructor for a time zone rule.
All member variables are set to zero values.
IMPORT_C | TTzRule | ( | const TTzRule & | aRule | ) |
Copy constructor for a time zone rule.
IMPORT_C | TTzRule | ( | TTimeWithReference | aFromYear, |
TTimeWithReference | aToYear, | |||
TInt16 | aOldOffset, | |||
TInt16 | aNewOffset, | |||
TMonth | aMonth, | |||
TTzRuleDay | aDayRule, | |||
TUint8 | aDayOfMonth, | |||
TUint8 | aDayOfWeek, | |||
TTzTimeReference | aTimeReference, | |||
TUint16 | aTimeOfChange | |||
) |
Constructor for a time zone rule.
Parameter | Description |
---|---|
aFromYear | The first date at which the rule applies. |
aToYear | The last date at which the rule applies. |
aOldOffset | The UTC offset in minutes which applies before the DST change. |
aNewOffset | The UTC offset in minutes which applies after the DST change. |
aMonth | The month in which the DST change occurs. |
aDayRule | The rule defining on which day the DST change takes place. |
aDayOfMonth | The number of the day within the month, offset from zero. Used in conjunction with aDayRule to define the day when DST changes. |
aDayOfWeek | The number of the day within the week, the numerical equivalent of a TDay value. Used in conjunction with aDayRule to define the day where DST changes. |
aTimeReference | Defines whether aTimeOfChange is a local (wall-clock) time or a UTC time. |
aTimeOfChange | The time of the DST change in minutes from midnight. |
IMPORT_C TVTzActualisedRule | Actualise | ( | TInt | aYear | ) | const |
Resolves the date rule to the precise date and time for the given year, and returns it in a TVTzActualisedRule
For day rules ETzDayAfterDate & ETzDayBeforeDate, the reference date entered is inclusive in the calculation. ie. If the reference date fits the criteria, the reference date will be returned.
eg. Actualise(Friday, ETzDayAfterDate, Fri Jun 22, 2007) returns Jun 22, 2007.
Deprecated. Use TVTzActualisedRule TTzRule::ActualiseL instead.
See also: TVTzActualisedRule TTzRule::ActualiseL(TInt aYear) const
Parameter | Description |
---|---|
aYear | Year to actualise time rules |
Returns: The time zone rule with the precise date and time for the given year.
IMPORT_C TVTzActualisedRule | ActualiseL | ( | TInt | aYear | ) | const |
Resolves the date rule to the precise date and time for the given year, and returns it in a TVTzActualisedRule
For day rules ETzDayAfterDate & ETzDayBeforeDate, the reference date entered is inclusive in the calculation. ie. If the reference date fits the criteria, the reference date will be returned.
eg. Actualise(Friday, ETzDayAfterDate, Fri Jun 22, 2007) returns Jun 22, 2007.
Parameter | Description |
---|---|
aYear | Year to actualise time rules |
Returns: The time zone rule with the precise date and time for the given year.
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises a time zone rule to a write stream.
Parameter | Description |
---|---|
aStream | Stream to which the object should be externalised. |
void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalizes a time zone rule from a read stream.
Parameter | Description |
---|---|
aStream | Stream from which the object should be internalised. |
Check if a time zone rule is applicable during a time range.
Parameter | Description |
---|---|
aStart | Start of time range, inclusively. ie. For a rule to be applicable, this time can be equal to or earlier than the rule's end time. This time should use the same time reference used when TTzRule is constructed. |
aEnd | End of time range, exclusively. ie. In order for a rule to be applicable, this time must be later than the rule's start time. This time should use the same time reference used when TTzRule is constructed. |
Returns: ETrue if the rule applies during the supplied time range, EFalse otherwise.