HydraExpress 4.6 |
HydraExpress C++ API Reference Guide |
|
Represents a single Daylight Saving Time rule. More...
#include <rwsf/core/TimeZone.h>
Public Attributes | |
DaylightRule const * | next_ |
short | firstYear_ |
char | observed_ |
DaylightBoundary | begin_ |
DaylightBoundary | end_ |
DaylightRule is a structure that declares a single Daylight Saving Time (DST) rule in a DST ruleset. A full ruleset is a set of linked DaylightRule structures, moving backward in time from the most recent to the first year the daylight savings time was put into effect.
A single DaylightRule holds data (in the specified order) for:
0
to completely disable DST, 1
to keep it on).Here's an example of a daylight ruleset for U.S. DST rules (remember, the daylight boundaries use 0-based indices, so a month of 0
= January
):
// Rule is defined as: { linkToNext , year, On?, { m, w, wd, min } start, { m, w, wd, min } stop };
DaylightRule usRuleAuld = { 0, 0000, 1, { 3, 4, 0, 120 }, { 9, 4, 0, 120 } };
DaylightRule usRule1967 = { &usRuleAuld, 1967, 1, { 3, 0, 0, 120 }, { 9, 4, 0, 120 } };
DaylightRule usRule1974 = { &usRule1967, 1974, 1, { 0, 0, 0, 120 }, { 9, 4, 0, 120 } };
DaylightRule usRule1975 = { &usRule1974, 1975, 1, { 1, 4, 0, 120 }, { 9, 4, 0, 120 } };
DaylightRule usRule1976 = { &usRule1975, 1976, 1, { 3, 4, 0, 120 }, { 9, 4, 0, 120 } };
DaylightRule usRule1987 = { &usRule1976, 1987, 1, { 3, 0, 0, 120 }, { 9, 4, 0, 120 } };
DaylightRule usRule2007 = { &usRule1987, 2007, 1, { 2, 1, 0, 120 }, {10, 0, 0, 120 } };
So, use of the rule usRule2007
will result in a DST ruleset that captures all DST rules in U.S. history, using the correct rule for the year requested.
This structure indicates the time of year, to the minute, when DST begins during this period (See struct description for DaylightBoundary).
This structure indicates the time of year, to the minute, when standard time resumes during this period (See struct description for DaylightBoundary).
Four-digit representation of the year in which this rule first goes into effect.
Points to the next rule in a chain that continues backwards in time.
A boolean value used to specify a period of years for which Daylight Saving Time is not observed.
1
- Daylight Saving Time is in effect during this period0
- Daylight Saving Time is not in effect during this periodnumeric
values, not the ASCII characters '1'
and '0'
.) Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.