Hegel 0.18.3
Property-based testing for C++
Loading...
Searching...
No Matches
hegel::generators::temporal::ZoneData Struct Reference

A zone's data given as fields: the TZif model of RFC 9636. More...

#include <zone_source.h>

Public Attributes

ZoneType initial
 The type in force before the first transition.
std::vector< ZoneTransition > transitions
 The transitions, strictly ascending by instant.
std::variant< HoldLast, ZoneRule, InferRule > after
 What is in force after the last transition.

Detailed Description

A zone's data given as fields: the TZif model of RFC 9636.

A zone with one rule for all time, such as one from a POSIX TZ string, has no transitions and its rule in after:

ZoneType est{-5 * 3600, false, "EST"};
ZoneType edt{-4 * 3600, true, "EDT"};
ZoneData data{
est, {},
ZoneRule{est, DaylightRule{
edt,
@ Sunday
Sunday.
Definition temporal_types.h:743
@ November
November.
Definition temporal_types.h:758
@ March
March.
Definition temporal_types.h:750
static RuleDate month_week_day(Month month, uint8_t week, Weekday weekday, int32_t time=7200)
Definition zone_source.h:101
A local time type of a zone: an offset, its daylight-saving flag and its abbreviation.
Definition zone_source.h:21

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