Enumerate the set of daylight-saving time (DST) policy values.
More...
Detailed Description
- Outline
-
-
- Purpose:
- Enumerate the set of daylight-saving time (DST) policy values.
-
- Classes:
-
- See also:
- Component baltzo_localtimevalidity, Component baltzo_timezoneutil
-
- Description:
- This component provides a namespace for the
enum
type baltzo::DstPolicy::Enum
, which enumerates the set of policies for interpreting whether an associated local time is a daylight-saving time value. A baltzo::DstPolicy
is particularly important when interpreting a local time that is not associated with a UTC offset (e.g., a bdlt::Datetime
object), as such a representation may be ambiguous or invalid (see baltzo_localtimevalidity
).
-
- Enumerators:
Name Description
------------- ---------------------------------------------------
e_DST Local time is interpreted as daylight-saving time.
e_STANDARD Local time is interpreted as standard time.
e_UNSPECIFIED Local time is interpreted as either daylight-saving time or
standard time (as appropriate).
-
- Usage:
- This section illustrates intended use of this component.
-
- Example 1: Basic Syntax:
- The following snippets of code provide a simple illustration of using
baltzo::DstPolicy
.
- First, we create a variable
value
of type baltzo::DstPolicy::Enum
and initialize it with the enumerator value baltzo::DstPolicy::e_STANDARD
: Now, we store the address of its ASCII representation in a pointer variable, asciiValue
, of type const char *
: Finally, we print value
to bsl::cout
. bsl::cout << value << bsl::endl;
This statement produces the following output on stdout
: