Country Generator 3.3.2
Procedural country generation for C++23
Loading...
Searching...
No Matches
dasmig::time_zone_request Struct Reference

Per-call time-zone selection options (cntg::get_time_zone()). More...

#include <countrygen.hpp>

Public Attributes

std::optional< std::string > country {std::nullopt}
 ISO 3166-1 alpha-2 code, any case; unset draws the country as get_country() does.
 
std::chrono::year_month_day reference_date {default_reference_date}
 The date whose offset, abbreviation and daylight flag are reported.
 
bool weighted {true}
 Weighted by population (default); false makes every zone of the country, and every country, equally likely.
 

Static Public Attributes

static constexpr std::chrono::year_month_day default_reference_date
 The date whose offset a result reports, at 12:00 UTC, unless set.
 

Detailed Description

Per-call time-zone selection options (cntg::get_time_zone()).

Definition at line 1554 of file countrygen.hpp.

Member Data Documentation

◆ country

std::optional<std::string> dasmig::time_zone_request::country {std::nullopt}

ISO 3166-1 alpha-2 code, any case; unset draws the country as get_country() does.

Definition at line 1562 of file countrygen.hpp.

◆ default_reference_date

constexpr std::chrono::year_month_day dasmig::time_zone_request::default_reference_date
staticconstexpr
Initial value:
{std::chrono::year{2023} /
std::chrono::July / 1}

The date whose offset a result reports, at 12:00 UTC, unless set.

Definition at line 1557 of file countrygen.hpp.

◆ reference_date

std::chrono::year_month_day dasmig::time_zone_request::reference_date {default_reference_date}

The date whose offset, abbreviation and daylight flag are reported.

Definition at line 1565 of file countrygen.hpp.

◆ weighted

bool dasmig::time_zone_request::weighted {true}

Weighted by population (default); false makes every zone of the country, and every country, equally likely.

Definition at line 1569 of file countrygen.hpp.


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