Time Shield Library
C++ library for working with time
|
Structures for representing and working with time and date components. More...
Topics | |
Time structure conversions | |
Time structure formatting | |
Classes | |
struct | time_shield::DateStruct |
Structure to represent a date. More... | |
struct | time_shield::DateTimeStruct |
Structure to represent date and time. More... | |
struct | time_shield::TimeStruct |
Structure to represent time. More... | |
struct | time_shield::TimeZoneStruct |
Structure to represent time zone information. More... | |
Functions | |
const DateStruct | time_shield::create_date_struct (int64_t year, int32_t mon=1, int32_t day=1) |
Creates a DateStruct instance. | |
const DateTimeStruct | time_shield::create_date_time_struct (int64_t year, int mon=1, int day=1, int hour=0, int min=0, int sec=0, int ms=0) |
Creates a DateTimeStruct instance. | |
const TimeStruct | time_shield::create_time_struct (int16_t hour, int16_t min, int16_t sec=0, int16_t ms=0) |
Creates a TimeStruct instance. | |
const TimeZoneStruct | time_shield::create_time_zone_struct (int hour, int min, bool is_positive=true) |
Creates a TimeZoneStruct instance. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_valid_time_zone_offset (const T &time_zone) noexcept |
Check if the time zone is valid. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_valid_time_zone (const T &time_zone) |
Alias for is_valid_time_zone_offset function. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_valid_tz (const T &time_zone) |
Alias for is_valid_time_zone_offset function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_valid_time (const T &time) noexcept |
Checks the correctness of the specified time. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_valid_date (const T &date) noexcept |
Checks the correctness of the specified date. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_valid_date_time (const T &date_time) noexcept |
Checks the correctness of a date and time. | |
DateStruct | time_shield::create_date_struct (const long year, const int mon=1, const int day=1) |
Creates a DateStruct instance. | |
DateTimeStruct | time_shield::create_date_time_struct (const long year, const int mon=1, const int day=1, const int hour=0, const int min=0, const int sec=0, const int ms=0) |
Creates a DateTimeStruct instance. | |
TimeStruct | time_shield::create_time_struct (const int hour, const int min, const int sec=0, const int ms=0) |
Creates a TimeStruct instance. | |
template<class T1, class T2 = ts_t> | |
T1 | time_shield::to_dt (T2 ts) |
Alias for to_date_time function. | |
template<class T1, class T2 = ts_t> | |
T1 | time_shield::to_dt_struct (T2 ts) |
Alias for to_date_time function. | |
template<class T> | |
T | time_shield::to_dt_ms (ts_ms_t ts) |
Alias for to_date_time_ms function. | |
template<class T> | |
T | time_shield::to_dt_struct_ms (ts_ms_t ts) |
Alias for to_date_time_ms function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::to_timestamp (const T &date_time) |
Alias for dt_to_timestamp function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::to_ts (const T &date_time) |
Alias for dt_to_timestamp function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::ts (const T &date_time) |
Alias for dt_to_timestamp function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::timestamp (const T &date_time) |
Alias for dt_to_timestamp function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::to_timestamp_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::to_ts_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::ts_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::timestamp_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
template<class T> | |
constexpr fts_t | time_shield::to_ftimestamp (const T &date_time) |
Alias for dt_to_ftimestamp. | |
template<class T> | |
constexpr fts_t | time_shield::to_fts (const T &date_time) |
Alias for dt_to_ftimestamp. | |
template<class T> | |
constexpr fts_t | time_shield::fts (const T &date_time) |
Alias for dt_to_ftimestamp. | |
template<class T> | |
constexpr fts_t | time_shield::ftimestamp (const T &date_time) |
Alias for dt_to_ftimestamp. | |
constexpr fts_t | time_shield::to_ftimestamp (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp. | |
constexpr fts_t | time_shield::to_fts (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp. | |
constexpr fts_t | time_shield::fts (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp. | |
constexpr fts_t | time_shield::ftimestamp (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp. | |
template<class T1 = Weekday, class T2, typename std::enable_if< std::is_class< T2 >::value, int >::type = 0> | |
constexpr T1 | time_shield::get_dow (const T2 &date) |
Alias for get_weekday_from_date. | |
template<class T1 = Weekday, class T2, typename std::enable_if< std::is_class< T2 >::value, int >::type = 0> | |
constexpr T1 | time_shield::dow_from_date (const T2 &date) |
Alias for get_weekday_from_date. | |
template<class T1 = Weekday, class T2, typename std::enable_if< std::is_class< T2 >::value, int >::type = 0> | |
constexpr T1 | time_shield::weekday_of (const T2 &date) |
Alias for get_weekday_from_date. | |
template<class T1 = Weekday, class T2, typename std::enable_if< std::is_class< T2 >::value, int >::type = 0> | |
constexpr T1 | time_shield::day_of_week_dt (const T2 &date) |
Alias for get_weekday_from_date. | |
template<class T1 = Weekday, class T2, typename std::enable_if< std::is_class< T2 >::value, int >::type = 0> | |
constexpr T1 | time_shield::day_of_week (const T2 &date) |
Alias for get_weekday_from_date. | |
template<class T1 = Weekday, class T2, typename std::enable_if< std::is_class< T2 >::value, int >::type = 0> | |
constexpr T1 | time_shield::dow (const T2 &date) |
Alias for get_weekday_from_date. | |
template<class T1 = DateTimeStruct, class T2 = ts_t> | |
T1 | time_shield::to_date_time (T2 ts) |
Converts a timestamp to a date-time structure. | |
template<class T> | |
T | time_shield::to_date_time_ms (ts_ms_t ts) |
Converts a timestamp in milliseconds to a date-time structure with milliseconds. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::dt_to_timestamp (const T &date_time) |
Converts a date-time structure to a timestamp. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::dt_to_timestamp_ms (const T &date_time) |
Converts a date-time structure to a timestamp in milliseconds. | |
TIME_SHIELD_CONSTEXPR const ts_t | time_shield::tm_to_timestamp_ms (const std::tm *timeinfo) |
Converts a std::tm structure to a timestamp in milliseconds. | |
template<class T> | |
TIME_SHIELD_CONSTEXPR const fts_t | time_shield::dt_to_ftimestamp (const T &date_time) |
Converts a date-time structure to a floating-point timestamp. | |
template<class T1 = Weekday, class T2> | |
constexpr const T1 | time_shield::get_weekday_from_date (const T2 &date) |
Get the day of the week from a date structure. | |
Structures for representing and working with time and date components.
This group includes various structures used for representing time, date, and date-time combinations, along with related utility functions for creating and manipulating these structures.
TimeStruct
: Represents time components (hour, minute, second, millisecond).DateStruct
: Represents date components (year, month, day).DateTimeStruct
: Represents combined date and time components.TimeZoneStruct
: Represents time zone offsets.DateStruct time_shield::create_date_struct | ( | const long | year, |
const int | mon = 1, | ||
const int | day = 1 ) |
Creates a DateStruct
instance.
year | The year component of the date. |
mon | The month component of the date, defaults to 1 (January). |
day | The day component of the date, defaults to 1. |
DateStruct
instance with the provided date components. Definition at line 37 of file date_struct.mqh.
|
inline |
Creates a DateStruct instance.
year | The year component of the date. |
mon | The month component of the date, defaults to 1 (January). |
day | The day component of the date, defaults to 1. |
Definition at line 26 of file date_struct.hpp.
DateTimeStruct time_shield::create_date_time_struct | ( | const long | year, |
const int | mon = 1, | ||
const int | day = 1, | ||
const int | hour = 0, | ||
const int | min = 0, | ||
const int | sec = 0, | ||
const int | ms = 0 ) |
Creates a DateTimeStruct
instance.
year | The year component of the date. |
mon | The month component of the date, defaults to 1 (January). |
day | The day component of the date, defaults to 1. |
hour | The hour component of the time, defaults to 0. |
min | The minute component of the time, defaults to 0. |
sec | The second component of the time, defaults to 0. |
ms | The millisecond component of the time, defaults to 0. |
DateTimeStruct
instance with the provided date and time components. Definition at line 46 of file date_time_struct.mqh.
|
inline |
Creates a DateTimeStruct instance.
year | The year component of the date. |
mon | The month component of the date, defaults to 1 (January). |
day | The day component of the date, defaults to 1. |
hour | The hour component of the time, defaults to 0. |
min | The minute component of the time, defaults to 0. |
sec | The second component of the time, defaults to 0. |
ms | The millisecond component of the time, defaults to 0. |
Definition at line 34 of file date_time_struct.hpp.
TimeStruct time_shield::create_time_struct | ( | const int | hour, |
const int | min, | ||
const int | sec = 0, | ||
const int | ms = 0 ) |
Creates a TimeStruct
instance.
hour | The hour component of the time. |
min | The minute component of the time. |
sec | The second component of the time, defaults to 0. |
ms | The millisecond component of the time, defaults to 0. |
TimeStruct
instance with the provided time components. Definition at line 40 of file time_struct.mqh.
|
inline |
Creates a TimeStruct instance.
hour | The hour component of the time. |
min | The minute component of the time. |
sec | The second component of the time, defaults to 0. |
ms | The millisecond component of the time, defaults to 0. |
Definition at line 28 of file time_struct.hpp.
|
inline |
Creates a TimeZoneStruct instance.
hour | The hour component of the time. |
min | The minute component of the time. |
is_positive | True if the time zone offset is positive, false if negative. |
Definition at line 32 of file time_zone_struct.hpp.
|
constexpr |
Alias for get_weekday_from_date.
Get the day of the week from a date structure.
This function takes a date structure with fields 'year', 'mon', and 'day', and returns the day of the week (SUN = 0, MON = 1, ... SAT = 6).
date | Structure containing year, month, and day. |
Definition at line 1796 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for get_weekday_from_date.
Get the day of the week from a date structure.
This function takes a date structure with fields 'year', 'mon', and 'day', and returns the day of the week (SUN = 0, MON = 1, ... SAT = 6).
date | Structure containing year, month, and day. |
Definition at line 1788 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for get_weekday_from_date.
Get the day of the week from a date structure.
This function takes a date structure with fields 'year', 'mon', and 'day', and returns the day of the week (SUN = 0, MON = 1, ... SAT = 6).
date | Structure containing year, month, and day. |
Definition at line 1804 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for get_weekday_from_date.
Get the day of the week from a date structure.
This function takes a date structure with fields 'year', 'mon', and 'day', and returns the day of the week (SUN = 0, MON = 1, ... SAT = 6).
date | Structure containing year, month, and day. |
Definition at line 1772 of file time_conversion_aliases.hpp.
|
inline |
Converts a date-time structure to a floating-point timestamp.
This function converts a given date and time structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure containing year, month, day, hour, minute, second, and millisecond fields. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 815 of file time_conversions.hpp.
|
inline |
Converts a date-time structure to a timestamp.
This function converts a given date and time to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 673 of file time_conversions.hpp.
|
inline |
Converts a date-time structure to a timestamp in milliseconds.
This function converts a given date-time structure to a timestamp in milliseconds, which is the number of milliseconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 748 of file time_conversions.hpp.
|
constexpr |
Alias for tm_to_ftimestamp.
Converts a std::tm structure to a floating-point timestamp.
This function converts a given std::tm structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
timeinfo | Pointer to the std::tm structure containing the date and time. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1446 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for dt_to_ftimestamp.
Converts a date-time structure to a floating-point timestamp.
This function converts a given date and time structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure containing year, month, day, hour, minute, second, and millisecond fields. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1416 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for tm_to_ftimestamp.
Converts a std::tm structure to a floating-point timestamp.
This function converts a given std::tm structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
timeinfo | Pointer to the std::tm structure containing the date and time. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1439 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for dt_to_ftimestamp.
Converts a date-time structure to a floating-point timestamp.
This function converts a given date and time structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure containing year, month, day, hour, minute, second, and millisecond fields. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1408 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for get_weekday_from_date.
Get the day of the week from a date structure.
This function takes a date structure with fields 'year', 'mon', and 'day', and returns the day of the week (SUN = 0, MON = 1, ... SAT = 6).
date | Structure containing year, month, and day. |
Definition at line 1764 of file time_conversion_aliases.hpp.
|
constexpr |
Get the day of the week from a date structure.
This function takes a date structure with fields 'year', 'mon', and 'day', and returns the day of the week (SUN = 0, MON = 1, ... SAT = 6).
date | Structure containing year, month, and day. |
Definition at line 1593 of file time_conversions.hpp.
|
inlinenoexcept |
Checks the correctness of the specified date.
T | The type of the date-time structure. |
date | Date-time structure. |
Definition at line 262 of file validation.hpp.
|
inlinenoexcept |
Checks the correctness of a date and time.
T | The type of the date-time structure. |
date_time | Date-time structure. |
Definition at line 298 of file validation.hpp.
|
inlinenoexcept |
Checks the correctness of the specified time.
T | The type of the time structure. |
time | Time structure. |
Definition at line 215 of file validation.hpp.
|
inline |
Alias for is_valid_time_zone_offset function.
Check if the time zone is valid.
T | The type of the time zone structure (default is TimeZoneStruct). |
time_zone | The time zone structure containing hour and minute components. |
Definition at line 172 of file validation.hpp.
|
inlinenoexcept |
Check if the time zone is valid.
T | The type of the time zone structure (default is TimeZoneStruct). |
time_zone | The time zone structure containing hour and minute components. |
Definition at line 163 of file validation.hpp.
|
inline |
Alias for is_valid_time_zone_offset function.
Check if the time zone is valid.
T | The type of the time zone structure (default is TimeZoneStruct). |
time_zone | The time zone structure containing hour and minute components. |
Definition at line 181 of file validation.hpp.
|
inline |
Alias for dt_to_timestamp function.
Converts a date-time structure to a timestamp.
This function converts a given date and time to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 718 of file time_conversion_aliases.hpp.
|
inline |
Alias for dt_to_timestamp_ms function.
Converts a date-time structure to a timestamp in milliseconds.
This function converts a given date-time structure to a timestamp in milliseconds, which is the number of milliseconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1277 of file time_conversion_aliases.hpp.
|
inline |
Converts a std::tm structure to a timestamp in milliseconds.
This function converts a given std::tm structure to a timestamp in milliseconds, which is the number of milliseconds since the Unix epoch (January 1, 1970).
timeinfo | Pointer to a std::tm structure containing the date and time information. |
Definition at line 763 of file time_conversions.hpp.
T1 time_shield::to_date_time | ( | T2 | ts | ) |
Converts a timestamp to a date-time structure.
This function converts a timestamp (usually an integer representing seconds since epoch) to a custom date-time structure. The default type for the timestamp is int64_t.
T1 | The date-time structure type to be returned. |
T2 | The type of the timestamp (default is int64_t). |
ts | The timestamp to be converted. |
Definition at line 461 of file time_conversions.hpp.
|
inline |
Converts a timestamp in milliseconds to a date-time structure with milliseconds.
T | The type of the date-time structure to return. |
ts | The timestamp in milliseconds to convert. |
Definition at line 566 of file time_conversions.hpp.
T1 time_shield::to_dt | ( | T2 | ts | ) |
Alias for to_date_time function.
Converts a timestamp to a date-time structure.
This function converts a timestamp (usually an integer representing seconds since epoch) to a custom date-time structure. The default type for the timestamp is int64_t.
T1 | The date-time structure type to be returned. |
T2 | The type of the timestamp (default is int64_t). |
ts | The timestamp to be converted. |
Definition at line 243 of file time_conversion_aliases.hpp.
|
inline |
Alias for to_date_time_ms function.
Converts a timestamp in milliseconds to a date-time structure with milliseconds.
T | The type of the date-time structure to return. |
ts | The timestamp in milliseconds to convert. |
Definition at line 261 of file time_conversion_aliases.hpp.
T1 time_shield::to_dt_struct | ( | T2 | ts | ) |
Alias for to_date_time function.
Converts a timestamp to a date-time structure.
This function converts a timestamp (usually an integer representing seconds since epoch) to a custom date-time structure. The default type for the timestamp is int64_t.
T1 | The date-time structure type to be returned. |
T2 | The type of the timestamp (default is int64_t). |
ts | The timestamp to be converted. |
Definition at line 251 of file time_conversion_aliases.hpp.
|
inline |
Alias for to_date_time_ms function.
Converts a timestamp in milliseconds to a date-time structure with milliseconds.
T | The type of the date-time structure to return. |
ts | The timestamp in milliseconds to convert. |
Definition at line 269 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for tm_to_ftimestamp.
Converts a std::tm structure to a floating-point timestamp.
This function converts a given std::tm structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
timeinfo | Pointer to the std::tm structure containing the date and time. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1425 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for dt_to_ftimestamp.
Converts a date-time structure to a floating-point timestamp.
This function converts a given date and time structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure containing year, month, day, hour, minute, second, and millisecond fields. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1392 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for tm_to_ftimestamp.
Converts a std::tm structure to a floating-point timestamp.
This function converts a given std::tm structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
timeinfo | Pointer to the std::tm structure containing the date and time. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1432 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for dt_to_ftimestamp.
Converts a date-time structure to a floating-point timestamp.
This function converts a given date and time structure to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure containing year, month, day, hour, minute, second, and millisecond fields. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1400 of file time_conversion_aliases.hpp.
|
inline |
Alias for dt_to_timestamp function.
Converts a date-time structure to a timestamp.
This function converts a given date and time to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 691 of file time_conversion_aliases.hpp.
|
inline |
Alias for dt_to_timestamp_ms function.
Converts a date-time structure to a timestamp in milliseconds.
This function converts a given date-time structure to a timestamp in milliseconds, which is the number of milliseconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1250 of file time_conversion_aliases.hpp.
|
inline |
Alias for dt_to_timestamp function.
Converts a date-time structure to a timestamp.
This function converts a given date and time to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 700 of file time_conversion_aliases.hpp.
|
inline |
Alias for dt_to_timestamp_ms function.
Converts a date-time structure to a timestamp in milliseconds.
This function converts a given date-time structure to a timestamp in milliseconds, which is the number of milliseconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1259 of file time_conversion_aliases.hpp.
|
inline |
Alias for dt_to_timestamp function.
Converts a date-time structure to a timestamp.
This function converts a given date and time to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 709 of file time_conversion_aliases.hpp.
|
inline |
Alias for dt_to_timestamp_ms function.
Converts a date-time structure to a timestamp in milliseconds.
This function converts a given date-time structure to a timestamp in milliseconds, which is the number of milliseconds since the Unix epoch (January 1, 1970).
T | The type of the date-time structure. |
date_time | The date-time structure. |
std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1268 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for get_weekday_from_date.
Get the day of the week from a date structure.
This function takes a date structure with fields 'year', 'mon', and 'day', and returns the day of the week (SUN = 0, MON = 1, ... SAT = 6).
date | Structure containing year, month, and day. |
Definition at line 1780 of file time_conversion_aliases.hpp.