Hegel 0.18.3
Property-based testing for C++
Loading...
Searching...
No Matches
hegel::extras::boost_date_time Namespace Reference

Zone sources from Boost.DateTime; see hegel/extras/boost_date_time.h. More...

Functions

generators::temporal::ZoneData zone_data (const ::boost::local_time::time_zone_ptr &zone)
 The data of a Boost time zone: its rule for all time, with no transitions.
generators::temporal::ZoneSource zone_source (const ::boost::local_time::tz_database &db)
 A zone source holding every region of a Boost time zone database, each under the name the database gives it, such as America/New_York.

Detailed Description

Zone sources from Boost.DateTime; see hegel/extras/boost_date_time.h.

Function Documentation

◆ zone_data()

generators::temporal::ZoneData hegel::extras::boost_date_time::zone_data ( const ::boost::local_time::time_zone_ptr & zone)
inline

The data of a Boost time zone: its rule for all time, with no transitions.

The standard type has the zone's base offset and standard abbreviation; the daylight-saving type, when the zone has one, the base offset plus its adjustment, and its daylight-saving abbreviation.

Parameters
zoneA Boost time zone, such as a boost::local_time::posix_time_zone or one from a boost::local_time::tz_database.
Returns
The zone's data, for ZoneSource::add_zone().
Exceptions
std::invalid_argumentfor a null zone, or one whose daylight-saving time starts or ends on February 29.

◆ zone_source()

generators::temporal::ZoneSource hegel::extras::boost_date_time::zone_source ( const ::boost::local_time::tz_database & db)
inline

A zone source holding every region of a Boost time zone database, each under the name the database gives it, such as America/New_York.

Parameters
dbThe database.
Returns
A new source with one zone per region.
Exceptions
std::invalid_argumentas zone_data() does, or for a region name the engine rejects.