|
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::IsoWeekDateStruct |
| Structure to represent an ISO week date. 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. | |
| template<class T1 = DateTimeStruct, class T2 = ts_t> | |
| T1 | time_shield::legacy::to_date_time (T2 ts) |
| Converts a timestamp to a date-time structure. | |
| 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 IsoWeekDateStruct | time_shield::create_iso_week_date_struct (int64_t year, int32_t week=1, int32_t weekday=1) |
| Creates an IsoWeekDateStruct 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. | |
| 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 = Weekday, class T2> | |
| TIME_SHIELD_CONSTEXPR T1 | time_shield::weekday_of_date (const T2 &date) |
| Get the day of the week from a date structure. | |
| template<class T1 = Weekday, class T2> | |
| TIME_SHIELD_CONSTEXPR T1 | time_shield::weekday_from_date (const T2 &date) |
| Alias for weekday_of_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 ts_t | time_shield::dt_to_timestamp (const T &date_time) |
| Converts a date-time structure to a timestamp. | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::tm_to_timestamp (const std::tm *timeinfo) |
| Converts a std::tm structure to a timestamp. | |
| template<class T1 = year_t, class T2 = int> | |
| TIME_SHIELD_CONSTEXPR ts_ms_t | time_shield::to_timestamp_ms (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T2 ms=0) |
| Converts a date-time structure to a timestamp in milliseconds. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_ms_t | time_shield::dt_to_timestamp_ms (const T &date_time) |
| Converts a date-time structure to a timestamp in milliseconds. | |
| TIME_SHIELD_CONSTEXPR 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 fts_t | time_shield::dt_to_ftimestamp (const T &date_time) |
| Converts a date-time structure to a floating-point timestamp. | |
| template<class T1 = year_t, class T2 = int> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::to_timestamp_unchecked (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0) noexcept |
| Converts a date and time to a timestamp without validation. | |
| template<class T1 = year_t, class T2 = int> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::to_timestamp (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0) |
| Converts a date and time to a timestamp. | |
| template<class T1 = year_t, class T2 = int, class T3 = int> | |
| TIME_SHIELD_CONSTEXPR fts_t | time_shield::to_ftimestamp (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T3 ms=0) |
| Converts a date and time to a floating-point timestamp. | |
| TIME_SHIELD_CONSTEXPR fts_t | time_shield::tm_to_ftimestamp (const std::tm *timeinfo) |
| Converts a std::tm structure to a floating-point timestamp. | |
| constexpr ts_t | time_shield::start_of_day (ts_t ts=time_shield::ts()) noexcept |
| Get the start of the day timestamp. | |
| template<class T = int> | |
| constexpr ts_t | time_shield::start_of_prev_day (ts_t ts=time_shield::ts(), T days=1) noexcept |
| Get timestamp of the start of the previous day. | |
| constexpr ts_t | time_shield::start_of_day_sec (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the start of the day timestamp in seconds. | |
| constexpr ts_ms_t | time_shield::start_of_day_ms (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the start of the day timestamp in milliseconds. | |
| template<class T = int> | |
| constexpr ts_t | time_shield::start_of_next_day (ts_t ts, T days=1) noexcept |
| Get the timestamp of the start of the day after a specified number of days. | |
| template<class T = int> | |
| constexpr ts_ms_t | time_shield::start_of_next_day_ms (ts_ms_t ts_ms, T days=1) noexcept |
| Get the timestamp of the start of the day after a specified number of days. | |
| template<class T = int> | |
| constexpr ts_t | time_shield::next_day (ts_t ts, T days=1) noexcept |
| Calculate the timestamp for a specified number of days in the future. | |
| template<class T = int> | |
| constexpr ts_ms_t | time_shield::next_day_ms (ts_ms_t ts_ms, T days=1) noexcept |
| Calculate the timestamp for a specified number of days in the future (milliseconds). | |
| constexpr ts_t | time_shield::end_of_day (ts_t ts=time_shield::ts()) noexcept |
| Get the timestamp at the end of the day. | |
| constexpr ts_t | time_shield::end_of_day_sec (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the timestamp at the end of the day in seconds. | |
| constexpr ts_ms_t | time_shield::end_of_day_ms (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the timestamp at the end of the day in milliseconds. | |
| template<class T = year_t> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::start_of_year_date (T year) |
| Get the timestamp of the start of the year. | |
| template<class T = year_t> | |
| TIME_SHIELD_CONSTEXPR ts_ms_t | time_shield::start_of_year_date_ms (T year) |
| Get the timestamp in milliseconds of the start of the year. | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::start_of_year (ts_t ts) noexcept |
| Get the start of the year timestamp. | |
| TIME_SHIELD_CONSTEXPR ts_ms_t | time_shield::start_of_year_ms (ts_ms_t ts_ms=time_shield::ts_ms()) |
| Get the timestamp at the start of the year in milliseconds. | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::end_of_year (ts_t ts=time_shield::ts()) |
| Get the end-of-year timestamp. | |
| template<class T = year_t> | |
| TIME_SHIELD_CONSTEXPR ts_ms_t | time_shield::end_of_year_ms (ts_ms_t ts_ms=time_shield::ts_ms()) |
| Get the timestamp in milliseconds of the end of the year. | |
| template<class T = int> | |
| T | time_shield::day_of_year (ts_t ts=time_shield::ts()) |
| Get the day of the year. | |
| template<class T = Month> | |
| TIME_SHIELD_CONSTEXPR T | time_shield::month_of_year (ts_t ts) noexcept |
| Get the month of the year. | |
| template<class T = int> | |
| TIME_SHIELD_CONSTEXPR T | time_shield::day_of_month (ts_t ts=time_shield::ts()) |
| Get the day of the month. | |
| template<class T1 = int, class T2 = year_t, class T3 = int> | |
| TIME_SHIELD_CONSTEXPR T1 | time_shield::num_days_in_month (T2 year, T3 month) noexcept |
| Get the number of days in a month. | |
| template<class T1 = int> | |
| TIME_SHIELD_CONSTEXPR T1 | time_shield::num_days_in_month_ts (ts_t ts=time_shield::ts()) noexcept |
| Get the number of days in the month of the given timestamp. | |
| template<class T = Weekday> | |
| constexpr T | time_shield::weekday_of_ts (ts_t ts) noexcept |
| Get the second of the week day from a timestamp. | |
| template<class T = Weekday> | |
| constexpr T | time_shield::weekday_of_ts_ms (ts_ms_t ts_ms) |
| Get the weekday from a timestamp in milliseconds. | |
| template<class T = Weekday> | |
| constexpr T | time_shield::get_weekday_from_ts (ts_t ts) noexcept |
| Alias for weekday_of_ts. | |
| template<class T = Weekday> | |
| constexpr T | time_shield::get_weekday_from_ts_ms (ts_ms_t ts_ms) |
| Alias for weekday_of_ts_ms. | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::start_of_month (ts_t ts=time_shield::ts()) |
| Get the timestamp at the start of the current month. | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::end_of_month (ts_t ts=time_shield::ts()) |
| Get the last timestamp of the current month. | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::last_sunday_of_month (ts_t ts=time_shield::ts()) |
| Get the timestamp of the last Sunday of the current month. | |
| template<class T1 = int, class T2 = year_t, class T3 = int> | |
| TIME_SHIELD_CONSTEXPR T1 | time_shield::last_sunday_month_day (T2 year, T3 month) |
| Get the day of the last Sunday of the given month and year. | |
| constexpr ts_t | time_shield::start_of_week (ts_t ts=time_shield::ts()) |
| Get the timestamp of the beginning of the week. | |
| constexpr ts_t | time_shield::end_of_week (ts_t ts=time_shield::ts()) |
| Get the timestamp of the end of the week. | |
| constexpr ts_t | time_shield::start_of_saturday (ts_t ts=time_shield::ts()) |
| Get the timestamp of the start of Saturday. | |
| constexpr ts_t | time_shield::start_of_hour (ts_t ts=time_shield::ts()) noexcept |
| Get the timestamp at the start of the hour. | |
| constexpr ts_t | time_shield::start_of_hour_sec (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the timestamp at the start of the hour. | |
| constexpr ts_ms_t | time_shield::start_of_hour_ms (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the timestamp at the start of the hour. This function sets the minute and second to zero. | |
| constexpr ts_t | time_shield::end_of_hour (ts_t ts=time_shield::ts()) noexcept |
| Get the timestamp at the end of the hour. | |
| constexpr ts_t | time_shield::end_of_hour_sec (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the timestamp at the end of the hour in seconds. | |
| constexpr ts_ms_t | time_shield::end_of_hour_ms (ts_ms_t ts_ms=time_shield::ts_ms()) noexcept |
| Get the timestamp at the end of the hour in milliseconds. | |
| constexpr ts_t | time_shield::start_of_min (ts_t ts=time_shield::ts()) noexcept |
| Get the timestamp of the beginning of the minute. | |
| constexpr ts_t | time_shield::end_of_min (ts_t ts=time_shield::ts()) noexcept |
| Get the timestamp of the end of the minute. | |
| template<class T = int> | |
| constexpr T | time_shield::min_of_day (ts_t ts=time_shield::ts()) noexcept |
| Get minute of day. This function returns a value between 0 to 1439 (minute of day). | |
| template<class T = int> | |
| constexpr T | time_shield::hour_of_day (ts_t ts=time_shield::ts()) noexcept |
| Get hour of day. This function returns a value between 0 to 23. | |
| template<class T = int> | |
| constexpr T | time_shield::min_of_hour (ts_t ts=time_shield::ts()) noexcept |
| Get minute of hour. This function returns a value between 0 to 59. | |
| template<class T = int> | |
| constexpr ts_t | time_shield::start_of_period (T p, ts_t ts=time_shield::ts()) |
| Get the timestamp of the start of the period. | |
| template<class T = int> | |
| constexpr ts_t | time_shield::end_of_period (T p, ts_t ts=time_shield::ts()) |
| Get the timestamp of the end of the period. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR auto | time_shield::dt_to_ts (const T &date_time) -> decltype(dt_to_timestamp(date_time)) |
| Alias for dt_to_timestamp. | |
| TIME_SHIELD_CONSTEXPR auto | time_shield::tm_to_ts (const std::tm *timeinfo) -> decltype(tm_to_timestamp(timeinfo)) |
| Alias for tm_to_timestamp. | |
| 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. | |
| auto | time_shield::to_dt (ts_t ts) -> decltype(to_date_time(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. | |
| auto | time_shield::to_dt_ms (ts_ms_t ts_ms) -> decltype(to_date_time_ms< DateTimeStruct >(ts_ms)) |
| Alias for to_date_time_ms function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::to_timestamp (const T &date_time) |
| Alias for dt_to_timestamp function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::to_ts (const T &date_time) |
| Alias for dt_to_timestamp function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::ts (const T &date_time) |
| Alias for dt_to_timestamp function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::timestamp (const T &date_time) |
| Alias for dt_to_timestamp function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::to_timestamp_ms (const T &date_time) |
| Alias for dt_to_timestamp_ms function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR auto | time_shield::dt_to_ts_ms (const T &date_time) -> decltype(dt_to_timestamp_ms(date_time)) |
| Alias for dt_to_timestamp_ms function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::to_ts_ms (const T &date_time) |
| Alias for dt_to_timestamp_ms function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR ts_t | time_shield::ts_ms (const T &date_time) |
| Alias for dt_to_timestamp_ms function. | |
| template<class T> | |
| TIME_SHIELD_CONSTEXPR 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 auto | time_shield::dt_to_fts (const T &date_time) -> decltype(dt_to_ftimestamp(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. | |
| TIME_SHIELD_CONSTEXPR fts_t | time_shield::to_ftimestamp (const std::tm *timeinfo) |
| Alias for tm_to_ftimestamp. | |
| TIME_SHIELD_CONSTEXPR auto | time_shield::tm_to_fts (const std::tm *timeinfo) -> decltype(tm_to_ftimestamp(timeinfo)) |
| Alias for tm_to_ftimestamp. | |
| TIME_SHIELD_CONSTEXPR fts_t | time_shield::to_fts (const std::tm *timeinfo) |
| Alias for tm_to_ftimestamp. | |
| TIME_SHIELD_CONSTEXPR fts_t | time_shield::fts (const std::tm *timeinfo) |
| Alias for tm_to_ftimestamp. | |
| TIME_SHIELD_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> | |
| TIME_SHIELD_CONSTEXPR T1 | time_shield::get_weekday_from_date (const T2 &date) |
| Alias for weekday_of_date. | |
| 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 weekday_of_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 weekday_of_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 weekday_of_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 weekday_of_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 weekday_of_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 weekday_of_date. | |
| template<class T1 = Weekday, class T2, typename std::enable_if< std::is_class< T2 >::value, int >::type = 0> | |
| constexpr T1 | time_shield::wd (const T2 &date) |
| Alias for weekday_of_date. | |
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 27 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 37 of file date_time_struct.hpp.
|
inline |
Creates an IsoWeekDateStruct instance.
| year | ISO week-numbering year component. |
| week | ISO week number component. |
| weekday | ISO weekday component (1=Monday .. 7=Sunday). |
Definition at line 29 of file iso_week_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 29 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 34 of file time_zone_struct.hpp.
|
inline |
Get the day of the month.
This function returns the day of the month for the specified timestamp.
| ts | Timestamp. |
Definition at line 931 of file date_time_conversions.hpp.
|
constexpr |
Alias for weekday_of_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 1938 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for weekday_of_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 1930 of file time_conversion_aliases.hpp.
|
inline |
Get the day of the year.
This function returns the day of the year for the specified timestamp.
| ts | Timestamp. |
Definition at line 892 of file date_time_conversions.hpp.
|
constexpr |
Alias for weekday_of_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 1946 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for weekday_of_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 1914 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 622 of file date_time_conversions.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 1489 of file time_conversion_aliases.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 465 of file date_time_conversions.hpp.
|
inline |
Converts a date-time structure to a timestamp in milliseconds.
This function converts a given date and 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 containing year, month, day, hour, minute, second, and millisecond fields. |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 547 of file date_time_conversions.hpp.
|
inline |
Alias for dt_to_timestamp.
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 272 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 and 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 containing year, month, day, hour, minute, second, and millisecond fields. |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1332 of file time_conversion_aliases.hpp.
|
constexprnoexcept |
Get the timestamp at the end of the day.
This function sets the hour to 23, minute to 59, and second to 59.
| ts | Timestamp. |
Definition at line 747 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the end of the day in milliseconds.
This function sets the hour to 23, minute to 59, second to 59, and millisecond to 999.
| ts_ms | Timestamp in milliseconds. |
Definition at line 767 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the end of the day in seconds.
This function sets the hour to 23, minute to 59, and second to 59.
| ts_ms | Timestamp in milliseconds. |
Definition at line 757 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the end of the hour.
| ts | Timestamp (default: current timestamp). |
Definition at line 1130 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the end of the hour in milliseconds.
| ts_ms | Timestamp in milliseconds (default: current timestamp). |
Definition at line 1144 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the end of the hour in seconds.
| ts_ms | Timestamp in milliseconds (default: current timestamp). |
Definition at line 1137 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp of the end of the minute.
| ts | Timestamp (default: current timestamp). |
Definition at line 1158 of file date_time_conversions.hpp.
|
inline |
Get the last timestamp of the current month.
This function returns the last timestamp of the current month, setting the day to the last day of the month and the time to 23:59:59.
| ts | Timestamp (default is current timestamp) |
Definition at line 1037 of file date_time_conversions.hpp.
|
constexpr |
Get the timestamp of the end of the period.
| p | Period duration in seconds. |
| ts | Timestamp (default: current timestamp). |
Definition at line 1206 of file date_time_conversions.hpp.
|
constexpr |
Get the timestamp of the end of the week.
This function finds the timestamp of the end of the week, which corresponds to the end of Saturday.
| ts | Timestamp (default: current timestamp). |
Definition at line 1083 of file date_time_conversions.hpp.
|
inline |
Get the end-of-year timestamp.
This function finds the last timestamp of the current year.
| ts | Timestamp. |
Definition at line 868 of file date_time_conversions.hpp.
|
inline |
Get the timestamp in milliseconds of the end of the year.
This function finds the last millisecond of the current year in milliseconds.
| ts_ms | Timestamp in milliseconds. |
Definition at line 881 of file date_time_conversions.hpp.
|
inline |
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 1552 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 1514 of file time_conversion_aliases.hpp.
|
inline |
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 1545 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 1506 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for weekday_of_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 1906 of file time_conversion_aliases.hpp.
|
inline |
Alias for weekday_of_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 1898 of file time_conversion_aliases.hpp.
|
constexprnoexcept |
Alias for weekday_of_ts.
Get the second of the week day from a timestamp.
| ts | Timestamp. |
Definition at line 1008 of file date_time_conversions.hpp.
|
constexpr |
Alias for weekday_of_ts_ms.
Get the weekday from a timestamp in milliseconds.
| ts_ms | Timestamp in milliseconds. |
Definition at line 1015 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get hour of day. This function returns a value between 0 to 23.
| ts | Timestamp in seconds (default: current timestamp). |
Definition at line 1177 of file date_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 265 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 301 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 217 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 174 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 165 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 183 of file validation.hpp.
|
inline |
Get the day of the last Sunday of the given month and year.
This function returns the day of the last Sunday of the specified month and year.
| year | Year |
| month | Month (1 = January, 12 = December) |
Definition at line 1060 of file date_time_conversions.hpp.
|
inline |
Get the timestamp of the last Sunday of the current month.
This function returns the timestamp of the last Sunday of the current month, setting the day to the last Sunday and the time to 00:00:00.
| ts | Timestamp (default is current timestamp) |
Definition at line 1048 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get minute of day. This function returns a value between 0 to 1439 (minute of day).
| ts | Timestamp in seconds (default: current timestamp). |
Definition at line 1167 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get minute of hour. This function returns a value between 0 to 59.
| ts | Timestamp in seconds (default: current timestamp). |
Definition at line 1187 of file date_time_conversions.hpp.
|
inlinenoexcept |
Get the month of the year.
This function returns the month of the year for the specified timestamp.
| ts | Timestamp. |
Definition at line 903 of file date_time_conversions.hpp.
Calculate the timestamp for a specified number of days in the future.
Adds the given number of days to the provided timestamp, without adjusting to the start of the day.
| ts | The current timestamp in seconds. |
| days | The number of days to add to the current timestamp (default is 1). |
Definition at line 725 of file date_time_conversions.hpp.
|
constexprnoexcept |
Calculate the timestamp for a specified number of days in the future (milliseconds).
Adds the given number of days to the provided timestamp, without adjusting to the start of the day.
| ts_ms | The current timestamp in milliseconds. |
| days | The number of days to add to the current timestamp (default is 1). |
Definition at line 737 of file date_time_conversions.hpp.
|
noexcept |
Get the number of days in a month.
This function calculates and returns the number of days in the specified month and year.
| year | Year as an integer. |
| month | Month as an integer. |
Definition at line 965 of file date_time_conversions.hpp.
|
noexcept |
Get the number of days in the month of the given timestamp.
This function calculates and returns the number of days in the month of the specified timestamp.
| ts | The timestamp to extract month and year from. |
Definition at line 979 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the start of the day timestamp.
This function returns the timestamp at the start of the day. The function sets the hours, minutes, and seconds to zero.
| ts | Timestamp. |
Definition at line 653 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the start of the day timestamp in milliseconds.
This function returns the timestamp at the start of the day in milliseconds. The function sets the hours, minutes, seconds, and milliseconds to zero.
| ts_ms | Timestamp in milliseconds. |
Definition at line 687 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the start of the day timestamp in seconds.
This function returns the timestamp at the start of the day in seconds. The function sets the hours, minutes, and seconds to zero.
| ts_ms | Timestamp in milliseconds. |
Definition at line 676 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the start of the hour.
This function sets the minute and second to zero.
| ts | Timestamp (default: current timestamp). |
Definition at line 1105 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the start of the hour. This function sets the minute and second to zero.
| ts_ms | Timestamp in milliseconds (default: current timestamp in milliseconds). |
Definition at line 1123 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp at the start of the hour.
This function sets the minute and second to zero.
| ts_ms | Timestamp in milliseconds (default: current timestamp in milliseconds). |
Definition at line 1115 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp of the beginning of the minute.
| ts | Timestamp (default: current timestamp). |
Definition at line 1151 of file date_time_conversions.hpp.
|
inline |
Get the timestamp at the start of the current month.
This function returns the timestamp at the start of the current month, setting the day to the first day of the month and the time to 00:00:00.
| ts | Timestamp (default is current timestamp) |
Definition at line 1026 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp of the start of the day after a specified number of days.
Calculates the timestamp for the beginning of the day after a specified number of days relative to the given timestamp.
| ts | The current timestamp in seconds. |
| days | The number of days after the current day (default is 1). |
Definition at line 700 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get the timestamp of the start of the day after a specified number of days.
Calculates the timestamp for the beginning of the day after a specified number of days relative to the given timestamp in milliseconds.
| ts_ms | The current timestamp in milliseconds. |
| days | The number of days after the current day (default is 1). |
Definition at line 713 of file date_time_conversions.hpp.
|
constexpr |
Get the timestamp of the start of the period.
| p | Period duration in seconds. |
| ts | Timestamp (default: current timestamp). |
Definition at line 1197 of file date_time_conversions.hpp.
|
constexprnoexcept |
Get timestamp of the start of the previous day.
This function returns the timestamp at the start of the previous day.
| ts | Timestamp of the current day. |
| days | Number of days to go back (default is 1). |
Definition at line 665 of file date_time_conversions.hpp.
|
constexpr |
Get the timestamp of the start of Saturday.
This function finds the timestamp of the beginning of the day on Saturday, which corresponds to the start of Saturday.
| ts | Timestamp (default: current timestamp). |
Definition at line 1094 of file date_time_conversions.hpp.
|
constexpr |
Get the timestamp of the beginning of the week.
This function finds the timestamp of the beginning of the week, which corresponds to the start of Sunday.
| ts | Timestamp (default: current timestamp). |
Definition at line 1072 of file date_time_conversions.hpp.
Get the start of the year timestamp.
This function resets the days, months, hours, minutes, and seconds of the given timestamp to the beginning of the year.
| ts | Timestamp. |
Definition at line 800 of file date_time_conversions.hpp.
|
inline |
Get the timestamp of the start of the year.
| year | Year. |
Definition at line 775 of file date_time_conversions.hpp.
|
inline |
Get the timestamp in milliseconds of the start of the year.
This function returns the timestamp at the start of the specified year in milliseconds.
| year | Year. |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 789 of file date_time_conversions.hpp.
|
inline |
Get the timestamp at the start of the year in milliseconds.
| ts_ms | Timestamp in milliseconds. |
Definition at line 858 of file date_time_conversions.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 791 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 and 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 containing year, month, day, hour, minute, second, and millisecond fields. |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1359 of file time_conversion_aliases.hpp.
|
inline |
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 641 of file date_time_conversions.hpp.
|
inline |
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 1530 of file time_conversion_aliases.hpp.
|
inline |
Converts a std::tm structure to a timestamp.
This function converts a given std::tm structure to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
| timeinfo | Pointer to a std::tm structure containing the date and time information. |
Definition at line 485 of file date_time_conversions.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 570 of file date_time_conversions.hpp.
|
inline |
Alias for tm_to_timestamp.
Converts a std::tm structure to a timestamp.
This function converts a given std::tm structure to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
| timeinfo | Pointer to a std::tm structure containing the date and time information. |
Definition at line 280 of file time_conversion_aliases.hpp.
| T1 time_shield::legacy::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 47 of file date_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 160 of file date_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 193 of file date_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 300 of file time_conversion_aliases.hpp.
|
inline |
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 315 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 326 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 341 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 308 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 334 of file time_conversion_aliases.hpp.
|
inline |
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 1523 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 1481 of file time_conversion_aliases.hpp.
|
inline |
Converts a date and time to a floating-point timestamp.
This function converts a given date and time to a floating-point timestamp, which is the number of seconds (with fractional milliseconds) since the Unix epoch (January 1, 1970).
| T1 | The type of the year parameter (default is year_t). |
| T2 | The type of the month, day, hour, minute, and second parameters (default is int). |
| T3 | The type of the millisecond parameter (default is int). |
| year | The year value. |
| month | The month value. |
| day | The day value. |
| hour | The hour value (default is 0). |
| min | The minute value (default is 0). |
| sec | The second value (default is 0). |
| ms | The millisecond value (default is 0). |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 594 of file date_time_conversions.hpp.
|
inline |
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 1538 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 1498 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 764 of file time_conversion_aliases.hpp.
|
inline |
Converts a date and time 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).
If the day is ≥ 1970 and year ≤ 31, parameters are assumed to be in DD-MM-YYYY order and are automatically reordered.
| T1 | The type of the year parameter (default is int64_t). |
| T2 | The type of the other date and time parameters (default is int). |
| year | The year value. |
| month | The month value. |
| day | The day value. |
| hour | The hour value (default is 0). |
| min | The minute value (default is 0). |
| sec | The second value (default is 0). |
| std::invalid_argument | if the date-time combination is invalid. |
ts(...)get_ts(...)get_timestamp(...)timestamp(...)to_ts(...)These aliases are macro-generated and behave identically to to_timestamp.
Definition at line 436 of file date_time_conversions.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 and 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 containing year, month, day, hour, minute, second, and millisecond fields. |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1323 of file time_conversion_aliases.hpp.
|
inline |
Converts a date-time structure to a timestamp in milliseconds.
This function converts a given date and time to a timestamp in milliseconds, which is the number of milliseconds since the Unix epoch (January 1, 1970).
| T1 | The type of the year parameter (default is year_t). |
| T2 | The type of the month, day, hour, minute, and second parameters (default is int). |
| year | The year value. |
| month | The month value. |
| day | The day value. |
| hour | The hour value (default is 0). |
| min | The minute value (default is 0). |
| sec | The second value (default is 0). |
| ms | The millisecond value (default is 0). |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 515 of file date_time_conversions.hpp.
|
inlinenoexcept |
Converts a date and time to a timestamp without validation.
This function converts a given date and time to a timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
If the day is ≥ 1970 and year ≤ 31, parameters are assumed to be in DD-MM-YYYY order and are automatically reordered.
| T1 | The type of the year parameter (default is int64_t). |
| T2 | The type of the other date and time parameters (default is int). |
| year | The year value. |
| month | The month value. |
| day | The day value. |
| hour | The hour value (default is 0). |
| min | The minute value (default is 0). |
| sec | The second value (default is 0). |
Definition at line 382 of file date_time_conversions.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 773 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 and 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 containing year, month, day, hour, minute, second, and millisecond fields. |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1341 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 782 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 and 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 containing year, month, day, hour, minute, second, and millisecond fields. |
| std::invalid_argument | if the date-time combination is invalid. |
Definition at line 1350 of file time_conversion_aliases.hpp.
|
constexpr |
Alias for weekday_of_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 1954 of file time_conversion_aliases.hpp.
|
inline |
Alias for weekday_of_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 104 of file date_conversions.hpp.
|
constexpr |
Alias for weekday_of_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 1922 of file time_conversion_aliases.hpp.
|
inline |
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 96 of file date_conversions.hpp.
|
constexprnoexcept |
Get the second of the week day from a timestamp.
| ts | Timestamp. |
Definition at line 992 of file date_time_conversions.hpp.
|
constexpr |
Get the weekday from a timestamp in milliseconds.
| ts_ms | Timestamp in milliseconds. |
Definition at line 1001 of file date_time_conversions.hpp.