Time Shield Library
C++ library for working with time
|
Main namespace for the Time Shield library. More...
Classes | |
struct | DateStruct |
Structure to represent a date. More... | |
struct | DateTimeStruct |
Structure to represent date and time. More... | |
struct | TimeStruct |
Structure to represent time. More... | |
struct | TimeZoneStruct |
Structure to represent time zone information. More... | |
Typedefs | |
typedef int64_t | year_t |
Type for representing years as integers. | |
typedef int64_t | uday_t |
Type for representing Unix days as integers (days since January 1, 1970). | |
typedef int64_t | ts_t |
Type for representing timestamps in seconds. | |
typedef int64_t | ts_ms_t |
Type for representing timestamps in milliseconds. | |
typedef int64_t | ts_us_t |
Type for representing timestamps in microseconds. | |
typedef double | fts_t |
Type for representing timestamps as floating-point numbers (e.g., fractional seconds). | |
typedef double | oadate_t |
Type for representing Automation Date (OADate) values as floating-point numbers. | |
typedef double | jd_t |
Type for representing Julian Dates as floating-point numbers. | |
typedef double | mjd_t |
Type for representing Modified Julian Dates as floating-point numbers. | |
typedef uint64_t | jdn_t |
Type for representing Julian Day Numbers as unsigned integers. | |
typedef int | tz_t |
Type for representing time zone offsets in minutes. | |
using | unixday_t = uday_t |
Alias for Unix day type (uday_t). | |
Enumerations | |
enum | FormatType { UPPERCASE_NAME = 0 , SHORT_NAME , FULL_NAME } |
Enumeration of the format options for representing a weekday or month. More... | |
enum | Weekday { SUN = 0 , MON , TUE , WED , THU , FRI , SAT } |
Enumeration of the days of the week. More... | |
enum | Month { JAN = 1 , FEB , MAR , APR , MAY , JUN , JUL , AUG , SEP , OCT , NOV , DEC } |
Enumeration of the months of the year. More... | |
enum | TimeZone { GMT , UTC , EET , CET , WET , EEST , CEST , WEST , UNKNOWN } |
Enumeration of the time zones. More... | |
enum | MoonPhase { WAXING_CRESCENT , FIRST_QUARTER , WAXING_GIBBOUS , FULL_MOON , WANING_GIBBOUS , LAST_QUARTER , WANING_CRESCENT , NEW_MOON } |
Enumeration of the moon phases. More... | |
enum | TimeFormatType { ISO8601_WITH_TZ , ISO8601_NO_TZ , MQL5_FULL , MQL5_DATE_ONLY , MQL5_TIME_ONLY , AMERICAN_MONTH_DAY , EUROPEAN_MONTH_DAY , AMERICAN_TIME , EUROPEAN_TIME } |
Enumeration of time format types. More... | |
Functions | |
const DateStruct | create_date_struct (int64_t year, int32_t mon=1, int32_t day=1) |
Creates a DateStruct instance. | |
const DateTimeStruct | 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 char * | to_cstr (Weekday value, FormatType format=UPPERCASE_NAME) |
Converts a Weekday enum value to a string. | |
const std::string & | to_str (Weekday value, FormatType format=UPPERCASE_NAME) |
Converts a Weekday enum value to a string. | |
const char * | to_cstr (Month value, FormatType format=UPPERCASE_NAME) |
Converts a Month enum value to a string. | |
const std::string & | to_str (Month value, FormatType format=UPPERCASE_NAME) |
Converts a Month enum value to a string. | |
const char * | to_cstr (TimeZone value, FormatType format=UPPERCASE_NAME) |
Converts a TimeZone enum value to a string. | |
const std::string & | to_str (TimeZone value, FormatType format=UPPERCASE_NAME) |
Converts a TimeZone enum value to a string. | |
template<class T = int> | |
constexpr const T | ns_of_sec (fts_t ts) noexcept |
Get the nanosecond part of the second from a floating-point timestamp. | |
template<class T = int> | |
constexpr const T | us_of_sec (fts_t ts) noexcept |
Get the microsecond part of the second from a floating-point timestamp. | |
template<class T = int> | |
constexpr const T | ms_of_sec (fts_t ts) noexcept |
Get the millisecond part of the second from a floating-point timestamp. | |
template<class T = int> | |
constexpr const T | ms_of_ts (ts_ms_t ts) noexcept |
Get the millisecond part of the timestamp. | |
template<class T > | |
constexpr const ts_ms_t | sec_to_ms_impl (T t, std::true_type) noexcept |
template<class T > | |
constexpr const ts_ms_t | sec_to_ms_impl (T t, std::false_type) noexcept |
template<class T1 = ts_ms_t, class T2 > | |
constexpr const T1 | sec_to_ms (T2 ts) noexcept |
Converts a timestamp from seconds to milliseconds. | |
constexpr const ts_ms_t | fsec_to_ms (fts_t ts) noexcept |
Converts a floating-point timestamp from seconds to milliseconds. | |
template<class T1 = ts_t, class T2 = ts_ms_t> | |
constexpr const T1 | ms_to_sec (T2 ts_ms) noexcept |
Converts a timestamp from milliseconds to seconds. | |
template<class T = ts_ms_t> | |
constexpr const fts_t | ms_to_fsec (T ts_ms) noexcept |
Converts a timestamp from milliseconds to floating-point seconds. | |
template<class T = year_t> | |
constexpr const T | get_unix_year (ts_t ts) noexcept |
Converts a UNIX timestamp to a year. | |
template<class T = year_t> | |
constexpr const T | unix_year (ts_t ts) noexcept |
Alias for get_unix_year function. | |
template<class T = year_t> | |
constexpr const T | to_unix_year (ts_t ts) noexcept |
Alias for get_unix_year function. | |
template<class T = int> | |
TIME_SHIELD_CONSTEXPR const T | hour24_to_12 (T hour) noexcept |
Converts a 24-hour format hour to a 12-hour format. | |
template<class T = int> | |
TIME_SHIELD_CONSTEXPR const T | h24_to_h12 (T hour) noexcept |
Alias for hour24_to_12 function. | |
template<class T1 , class T2 = ts_t> | |
T1 | to_date_time (T2 ts) |
Converts a timestamp to a date-time structure. | |
template<class T1 , class T2 = ts_t> | |
T1 | to_dt (T2 ts) |
Alias for to_date_time function. | |
template<class T > | |
T | to_date_time_ms (ts_ms_t ts) |
Converts a timestamp in milliseconds to a date-time structure with milliseconds. | |
template<class T > | |
T | to_dt_ms (ts_ms_t ts) |
Alias for to_date_time_ms function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_t | 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> | |
TIME_SHIELD_CONSTEXPR const ts_t | to_ts (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0) |
Alias for to_timestamp function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_t | get_ts (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0) |
Alias for to_timestamp function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_t | ts (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0) |
Alias for to_timestamp function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_t | timestamp (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0) |
Alias for to_timestamp function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_t | get_timestamp (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0) |
Alias for to_timestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | dt_to_timestamp (const T &date_time) |
Converts a date-time structure to a timestamp. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | to_timestamp (const T &date_time) |
Alias for dt_to_timestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | to_ts (const T &date_time) |
Alias for dt_to_timestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | ts (const T &date_time) |
Alias for dt_to_timestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | timestamp (const T &date_time) |
Alias for dt_to_timestamp function. | |
TIME_SHIELD_CONSTEXPR const ts_t | tm_to_timestamp (const std::tm *timeinfo) |
Converts a std::tm structure to a timestamp. | |
TIME_SHIELD_CONSTEXPR const ts_t | to_timestamp (const std::tm *timeinfo) |
Alias for tm_to_timestamp function. | |
TIME_SHIELD_CONSTEXPR const ts_t | to_ts (const std::tm *timeinfo) |
Alias for tm_to_timestamp function. | |
TIME_SHIELD_CONSTEXPR const ts_t | ts (const std::tm *timeinfo) |
Alias for tm_to_timestamp function. | |
TIME_SHIELD_CONSTEXPR const ts_t | timestamp (const std::tm *timeinfo) |
Alias for tm_to_timestamp function. | |
TIME_SHIELD_CONSTEXPR const ts_t | ts_from_tm (const std::tm *timeinfo) |
Alias for tm_to_timestamp function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | to_timestamp_ms (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T2 ms=0) |
Converts a date and time to a timestamp in milliseconds. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | to_ts_ms (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T2 ms=0) |
Alias for to_timestamp_ms function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | ts_ms (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T2 ms=0) |
Alias for to_timestamp_ms function. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | timestamp_ms (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T2 ms=0) |
Alias for to_timestamp_ms function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | dt_to_timestamp_ms (const T &date_time) |
Converts a date-time structure to a timestamp in milliseconds. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | to_timestamp_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | to_ts_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | ts_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const ts_t | timestamp_ms (const T &date_time) |
Alias for dt_to_timestamp_ms function. | |
TIME_SHIELD_CONSTEXPR const ts_t | tm_to_timestamp_ms (const std::tm *timeinfo) |
Converts a std::tm structure to a timestamp in milliseconds. | |
TIME_SHIELD_CONSTEXPR const ts_t | to_timestamp_ms (const std::tm *timeinfo) |
Alias for tm_to_timestamp_ms function. | |
TIME_SHIELD_CONSTEXPR const ts_t | to_ts_ms (const std::tm *timeinfo) |
Alias for tm_to_timestamp_ms function. | |
TIME_SHIELD_CONSTEXPR const ts_t | ts_ms (const std::tm *timeinfo) |
Alias for tm_to_timestamp_ms function. | |
TIME_SHIELD_CONSTEXPR const ts_t | timestamp_ms (const std::tm *timeinfo) |
Alias for tm_to_timestamp_ms function. | |
template<class T1 = year_t, class T2 = int, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const fts_t | 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. | |
template<class T1 = year_t, class T2 = int, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const fts_t | to_fts (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T3 ms=0) |
Alias for to_ftimestamp function. | |
template<class T1 = year_t, class T2 = int, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const fts_t | fts (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T3 ms=0) |
Alias for to_ftimestamp function. | |
template<class T1 = year_t, class T2 = int, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const fts_t | ftimestamp (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T3 ms=0) |
Alias for to_ftimestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const fts_t | dt_to_ftimestamp (const T &date_time) |
Converts a date-time structure to a floating-point timestamp. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const fts_t | to_ftimestamp (const T &date_time) |
Alias for dt_to_ftimestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const fts_t | to_fts (const T &date_time) |
Alias for dt_to_ftimestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const fts_t | fts (const T &date_time) |
Alias for dt_to_ftimestamp function. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const fts_t | ftimestamp (const T &date_time) |
Alias for dt_to_ftimestamp function. | |
TIME_SHIELD_CONSTEXPR const fts_t | tm_to_ftimestamp (const std::tm *timeinfo) |
Converts a std::tm structure to a floating-point timestamp. | |
TIME_SHIELD_CONSTEXPR const fts_t | to_ftimestamp (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp function. | |
TIME_SHIELD_CONSTEXPR const fts_t | to_fts (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp function. | |
TIME_SHIELD_CONSTEXPR const fts_t | fts (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp function. | |
TIME_SHIELD_CONSTEXPR const fts_t | ftimestamp (const std::tm *timeinfo) |
Alias for tm_to_ftimestamp function. | |
template<class T = uday_t> | |
constexpr const T | get_unix_day (ts_t ts=ts()) noexcept |
Get UNIX day. | |
template<class T = uday_t> | |
constexpr const T | get_unixday (ts_t ts=ts()) noexcept |
Alias for get_unix_day function. | |
template<class T = uday_t> | |
constexpr const T | unix_day (ts_t ts=ts()) noexcept |
Alias for get_unix_day function. | |
template<class T = uday_t> | |
constexpr const T | unixday (ts_t ts=ts()) noexcept |
Alias for get_unix_day function. | |
template<class T = uday_t> | |
constexpr const T | uday (ts_t ts=ts()) noexcept |
Alias for get_unix_day function. | |
template<class T = int> | |
constexpr const T | get_days_difference (ts_t start, ts_t stop) noexcept |
Get the number of days between two timestamps. | |
template<class T = int> | |
constexpr const T | get_days (ts_t start, ts_t stop) noexcept |
Alias for get_days_difference function. | |
template<class T = int> | |
constexpr const T | days (ts_t start, ts_t stop) noexcept |
Alias for get_days_difference function. | |
template<class T = uday_t> | |
constexpr const T | get_unix_day_ms (ts_ms_t t_ms=ts_ms()) noexcept |
Get UNIX day from milliseconds timestamp. | |
template<class T = uday_t> | |
constexpr const T | get_unixday_ms (ts_ms_t t_ms=ts_ms()) noexcept |
Alias for get_unix_day_ms function. | |
template<class T = uday_t> | |
constexpr const T | unix_day_ms (ts_ms_t t_ms=ts_ms()) noexcept |
Alias for get_unix_day_ms function. | |
template<class T = uday_t> | |
constexpr const T | unixday_ms (ts_ms_t t_ms=ts_ms()) noexcept |
Alias for get_unix_day_ms function. | |
template<class T = uday_t> | |
constexpr const T | uday_ms (ts_ms_t t_ms=ts_ms()) noexcept |
Alias for get_unix_day_ms function. | |
template<class T = ts_t> | |
constexpr const T | unix_day_to_timestamp (uday_t unix_day) noexcept |
Converts a UNIX day to a timestamp in seconds. | |
template<class T = ts_t> | |
constexpr const T | unix_day_to_ts (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp function. | |
template<class T = ts_t> | |
constexpr const T | unixday_to_ts (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp function. | |
template<class T = ts_t> | |
constexpr const T | uday_to_ts (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp function. | |
template<class T = ts_t> | |
constexpr const T | start_of_day_from_unix_day (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp function. | |
template<class T = ts_t> | |
constexpr const T | unix_day_to_timestamp_ms (uday_t unix_day) noexcept |
Converts a UNIX day to a timestamp in milliseconds. | |
template<class T = ts_t> | |
constexpr const T | unix_day_to_ts_ms (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp_ms function. | |
template<class T = ts_t> | |
constexpr const T | unixday_to_ts_ms (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp_ms function. | |
template<class T = ts_t> | |
constexpr const T | uday_to_ts_ms (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp_ms function. | |
template<class T = ts_t> | |
constexpr const T | start_of_day_from_unix_day_ms (uday_t unix_day) noexcept |
Alias for unix_day_to_timestamp_ms function. | |
template<class T = ts_t> | |
constexpr const T | end_of_day_from_unix_day (uday_t unix_day) noexcept |
Converts a UNIX day to a timestamp representing the end of the day in seconds. | |
template<class T = ts_ms_t> | |
constexpr const T | end_of_day_from_unix_day_ms (uday_t unix_day) noexcept |
Converts a UNIX day to a timestamp representing the end of the day in milliseconds. | |
template<class T = ts_ms_t> | |
constexpr const T | start_of_next_day_from_unix_day (uday_t unix_day) noexcept |
Converts a UNIX day to a timestamp representing the start of the next day in seconds. | |
template<class T = ts_ms_t> | |
constexpr const T | start_of_next_day_from_unix_day_ms (uday_t unix_day) noexcept |
Converts a UNIX day to a timestamp representing the start of the next day in milliseconds. | |
template<class T = ts_t> | |
constexpr const T | next_day_from_unix_day (uday_t unix_day) noexcept |
Alias for start_of_next_day_from_unix_day function. | |
template<class T = ts_t> | |
constexpr const T | next_day_unix_day (uday_t unix_day) noexcept |
Alias for start_of_next_day_from_unix_day function. | |
template<class T = ts_t> | |
constexpr const T | next_day_unixday (uday_t unix_day) noexcept |
Alias for start_of_next_day_from_unix_day function. | |
template<class T = ts_ms_t> | |
constexpr const T | next_day_from_unix_day_ms (uday_t unix_day) noexcept |
Alias for start_of_next_day_from_unix_day_ms function. | |
template<class T = ts_ms_t> | |
constexpr const T | next_day_unix_day_ms (uday_t unix_day) noexcept |
Alias for start_of_next_day_from_unix_day_ms function. | |
template<class T = ts_ms_t> | |
constexpr const T | next_day_unixday_ms (uday_t unix_day) noexcept |
Alias for start_of_next_day_from_unix_day_ms function. | |
template<class T = int64_t> | |
constexpr const T | get_unix_min (ts_t ts=ts()) |
Get UNIX minute. | |
template<class T = int64_t> | |
constexpr const T | unix_min (ts_t ts=ts()) |
Alias for get_unix_min function. | |
template<class T = int64_t> | |
constexpr const T | to_unix_min (ts_t ts=ts()) |
Alias for get_unix_min function. | |
template<class T = int64_t> | |
constexpr const T | umin (ts_t ts=ts()) |
Alias for get_unix_min function. | |
template<class T = int> | |
constexpr const T | sec_of_day (ts_t ts=ts()) noexcept |
Get the second of the day. | |
template<class T = int> | |
constexpr const T | sec_of_day_ms (ts_ms_t ts_ms) noexcept |
Get the second of the day from milliseconds timestamp. | |
template<class T1 = int, class T2 = int> | |
constexpr const T1 | sec_of_day (T2 hour, T2 min, T2 sec) noexcept |
Get the second of the day. | |
template<class T = int> | |
constexpr const T | sec_of_min (ts_t ts=ts()) |
Get the second of the minute. | |
template<class T = int> | |
constexpr const T | sec_of_hour (ts_t ts=ts()) |
Get the second of the hour. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const T | get_year (ts_t ts=ts()) |
Get the year from the timestamp. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const T | year (ts_t ts=ts()) |
Alias for get_year function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const T | to_year (ts_t ts=ts()) |
Alias for get_year function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const T | get_year_ms (ts_ms_t ts_ms=ts_ms()) |
Get the year from the timestamp in milliseconds. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const T | year_ms (ts_ms_t ts_ms=ts_ms()) |
Alias for get_year_ms function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const T | to_year_ms (ts_ms_t ts_ms=ts_ms()) |
Alias for get_year_ms function. | |
TIME_SHIELD_CONSTEXPR const ts_t | start_of_year (ts_t ts) noexcept |
Get the start of the year timestamp. | |
TIME_SHIELD_CONSTEXPR const ts_t | year_start (ts_t ts=ts()) |
Alias for start_of_year function. | |
TIME_SHIELD_CONSTEXPR const ts_t | year_begin (ts_t ts=ts()) |
Alias for start_of_year function. | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | start_of_year_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the start of the year timestamp in milliseconds. | |
TIME_SHIELD_CONSTEXPR const ts_t | year_start_ms (ts_t ts_ms=ts_ms()) |
Alias for start_of_year_ms function. | |
TIME_SHIELD_CONSTEXPR const ts_t | year_begin_ms (ts_t ts_ms=ts_ms()) |
Alias for start_of_year_ms function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const ts_t | start_of_year_date (T year) |
Get the timestamp of the start of the year. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const ts_t | year_start_date (T year) |
Alias for start_of_year_date function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const ts_t | year_begin_date (T year) |
Alias for start_of_year_date function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | start_of_year_date_ms (T year) |
Get the timestamp in milliseconds of the start of the year. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | year_start_date_ms (T year) |
Alias for start_of_year_date_ms function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | year_begin_date_ms (T year) |
Alias for start_of_year_date_ms function. | |
TIME_SHIELD_CONSTEXPR ts_t | end_of_year (ts_t ts=ts()) |
Get the end-of-year timestamp. | |
TIME_SHIELD_CONSTEXPR const ts_t | year_end (ts_t ts=ts()) |
Alias for end_of_year function. | |
template<class T = year_t> | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | end_of_year_ms (ts_ms_t ts_ms=ts_ms()) |
Get the timestamp in milliseconds of the end of the year. | |
TIME_SHIELD_CONSTEXPR const ts_ms_t | year_end_ms (ts_ms_t ts_ms=ts_ms()) |
Alias for end_of_year_ms function. | |
template<class T = int> | |
const T | day_of_year (ts_t ts=ts()) |
Get the day of the year. | |
template<class T = Month> | |
TIME_SHIELD_CONSTEXPR const T | month_of_year (ts_t ts) noexcept |
Get the month of the year. | |
template<class T = int> | |
TIME_SHIELD_CONSTEXPR const T | day_of_month (ts_t ts) |
Get the day of the month. | |
template<class T1 = int, class T2 = year_t, class T3 = int> | |
constexpr const T1 | num_days_in_month (T2 year, T3 month) noexcept |
Get the number of days in a month. | |
template<class T1 = int, class T2 = year_t, class T3 = int> | |
constexpr const T1 | days_in_month (T2 year, T3 month) noexcept |
Alias for num_days_in_month function. | |
template<class T1 = int> | |
TIME_SHIELD_CONSTEXPR const T1 | num_days_in_month_ts (ts_t ts=ts()) noexcept |
Get the number of days in the month of the given timestamp. | |
template<class T1 = int> | |
constexpr const T1 | num_days_in_month (ts_t ts=ts()) noexcept |
Alias for num_days_in_month_ts function. | |
template<class T1 = int> | |
constexpr const T1 | days_in_month (ts_t ts=ts()) noexcept |
Alias for num_days_in_month_ts function. | |
template<class T1 = int, class T2 = year_t> | |
constexpr const T1 | num_days_in_year (T2 year) noexcept |
Get the number of days in a given year. | |
template<class T1 = int, class T2 = year_t> | |
constexpr const T1 | days_in_year (T2 year) noexcept |
Alias for num_days_in_year function. | |
template<class T = int> | |
constexpr const T | num_days_in_year_ts (ts_t ts=ts()) |
Get the number of days in the current year. | |
template<class T = int> | |
constexpr const T | days_in_year_ts (ts_t ts=ts()) |
Alias for num_days_in_year_ts function. | |
constexpr const ts_t | start_of_day (ts_t ts=ts()) noexcept |
Get the start of the day timestamp. | |
constexpr const ts_t | day_start (ts_t ts=ts()) noexcept |
Alias for start_of_day function. | |
template<class T = int> | |
constexpr const ts_t | start_of_prev_day (ts_t ts=ts(), T days=1) noexcept |
Get timestamp of the start of the previous day. | |
template<class T = int> | |
constexpr const ts_t | previous_day_start (ts_t ts=ts(), T days=1) noexcept |
Alias for start_of_prev_day function. | |
constexpr const ts_t | start_of_day_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the start of the day timestamp in seconds. | |
constexpr const ts_t | day_start_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for start_of_day_sec function. | |
constexpr const ts_ms_t | start_of_day_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the start of the day timestamp in milliseconds. | |
constexpr const ts_ms_t | day_start_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for start_of_day_ms function. | |
template<class T = int> | |
constexpr const ts_t | 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 const ts_t | next_day_start (ts_t ts, T days=1) noexcept |
Alias for start_of_next_day function. | |
template<class T = int> | |
constexpr const ts_ms_t | 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 const ts_ms_t | next_day_start_ms (ts_ms_t ts_ms, T days=1) noexcept |
Alias for start_of_next_day_ms function. | |
template<class T = int> | |
constexpr const ts_t | 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 const ts_ms_t | 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 const ts_t | end_of_day (const ts_t &ts=ts()) noexcept |
Get the timestamp at the end of the day. | |
constexpr const ts_t | day_end (const ts_t &ts=ts()) noexcept |
Alias for end_of_day function. | |
constexpr const ts_t | end_of_day_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the timestamp at the end of the day in seconds. | |
constexpr const ts_t | day_end_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for end_of_day_sec function. | |
constexpr const ts_ms_t | end_of_day_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the timestamp at the end of the day in milliseconds. | |
constexpr const ts_ms_t | day_end_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for end_of_day_ms function. | |
template<class T1 = Weekday, class T2 = year_t, class T3 = int> | |
constexpr const T1 | day_of_week_date (T2 year, T3 month, T3 day) |
Get the day of the week. | |
template<class T1 = Weekday, class T2 = year_t, class T3 = int> | |
constexpr const T1 | get_weekday (T2 year, T3 month, T3 day) |
Alias for day_of_week_date function. | |
template<class T1 = Weekday, class T2 = year_t, class T3 = int> | |
constexpr const T1 | day_of_week (T2 year, T3 month, T3 day) |
Alias for day_of_week_date function. | |
template<class T1 = Weekday, class T2 > | |
constexpr const T1 | get_weekday_from_date (const T2 &date) |
Get the day of the week from a date structure. | |
template<class T1 = int, class T2 > | |
constexpr const T1 | day_of_week_dt (const T2 &date) |
Alias for get_weekday_from_date function that accepts a date structure. | |
template<class T1 = int, class T2 > | |
constexpr const T1 | day_of_week (const T2 &date) |
Alias for get_weekday_from_date function that accepts a date structure. | |
template<class T = Weekday> | |
constexpr const T | get_weekday_from_ts (ts_t ts) noexcept |
Get the weekday from a timestamp. | |
template<class T = Weekday> | |
constexpr const T | day_of_week (ts_t ts) noexcept |
Alias for get_weekday_from_ts function. | |
template<class T = Weekday> | |
constexpr const T | get_weekday_from_ts_ms (ts_ms_t ts_ms) |
Get the weekday from a timestamp in milliseconds. | |
template<class T = Weekday> | |
constexpr const T | day_of_week_ms (const ts_ms_t &ts_ms) |
Alias for get_weekday_from_ts_ms function. | |
TIME_SHIELD_CONSTEXPR const ts_t | start_of_month (ts_t ts=ts()) |
Get the timestamp at the start of the current month. | |
TIME_SHIELD_CONSTEXPR const ts_t | month_begin (ts_t ts=ts()) |
Alias for start_of_month function. | |
TIME_SHIELD_CONSTEXPR const ts_t | end_of_month (ts_t ts=ts()) |
Get the last timestamp of the current month. | |
TIME_SHIELD_CONSTEXPR const ts_t | last_day_of_month (ts_t ts=ts()) |
Alias for end_of_month function. | |
TIME_SHIELD_CONSTEXPR const ts_t | last_sunday_of_month (ts_t ts=ts()) |
Get the timestamp of the last Sunday of the current month. | |
TIME_SHIELD_CONSTEXPR const ts_t | final_sunday_of_month (ts_t ts=ts()) |
Alias for last_sunday_of_month function. | |
template<class T1 = int, class T2 = year_t, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const T1 | last_sunday_month_day (T2 year, T3 month) |
Get the day of the last Sunday of the given month and year. | |
template<class T1 = int, class T2 = year_t, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const T1 | final_sunday_month_day (T2 year, T3 month) |
Alias for last_sunday_month_day function. | |
constexpr const ts_t | start_of_hour (ts_t ts=ts()) noexcept |
Get the timestamp at the start of the hour. | |
constexpr const ts_t | hour_begin (ts_t ts=ts()) noexcept |
Alias for start_of_hour function. | |
constexpr const ts_t | start_of_hour_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the timestamp at the start of the hour. | |
constexpr const ts_t | hour_begin_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for start_of_hour_sec function. | |
constexpr const ts_ms_t | start_of_hour_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the timestamp at the start of the hour. This function sets the minute and second to zero. | |
constexpr const ts_ms_t | hour_begin_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for start_of_hour_ms function. | |
constexpr const ts_t | end_of_hour (ts_t ts=ts()) noexcept |
Get the timestamp at the end of the hour. This function sets the minute and second to 59. | |
constexpr const ts_t | finish_of_hour (ts_t ts=ts()) noexcept |
Alias for end_of_hour function. | |
constexpr const ts_t | end_of_hour_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the timestamp at the end of the hour. | |
constexpr const ts_t | finish_of_hour_sec (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for end_of_hour_sec function. | |
constexpr const ts_ms_t | end_of_hour_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Get the timestamp at the end of the hour. | |
constexpr const ts_ms_t | finish_of_hour_ms (ts_ms_t ts_ms=ts_ms()) noexcept |
Alias for end_of_hour_ms function. | |
template<class T = int> | |
constexpr const T | hour_of_day (ts_t ts=ts()) noexcept |
Get the hour of the day. | |
template<class T = int> | |
constexpr const T | hour_in_day (ts_t ts=ts()) noexcept |
Alias for hour_of_day function. | |
constexpr const ts_t | start_of_week (ts_t ts=ts()) |
Get the timestamp of the beginning of the week. | |
constexpr const ts_t | week_begin (ts_t ts=ts()) |
Alias for start_of_week function. | |
constexpr const ts_t | end_of_week (ts_t ts=ts()) |
Get the timestamp of the end of the week. | |
constexpr const ts_t | finish_of_week (ts_t ts=ts()) |
Alias for end_of_week function. | |
constexpr const ts_t | start_of_saturday (ts_t ts=ts()) |
Get the timestamp of the start of Saturday. | |
constexpr const ts_t | saturday_begin (ts_t ts=ts()) |
Alias for start_of_saturday function. | |
constexpr const ts_t | start_of_min (ts_t ts=ts()) noexcept |
Get the timestamp of the beginning of the minute. | |
constexpr const ts_t | min_begin (ts_t ts=ts()) noexcept |
Alias for start_of_min function. | |
constexpr const ts_t | end_of_min (ts_t ts=ts()) noexcept |
Get the timestamp of the end of the minute. | |
constexpr const ts_t | finish_of_min (ts_t ts=ts()) noexcept |
Alias for end_of_min function. | |
template<class T = int> | |
constexpr const T | min_of_day (ts_t ts=ts()) noexcept |
Get minute of day. This function returns a value between 0 to 1439 (minute of day). | |
template<class T = int> | |
constexpr const T | min_of_hour (ts_t ts=ts()) noexcept |
Get minute of hour. This function returns a value between 0 to 59. | |
template<class T = int> | |
constexpr const ts_t | start_of_period (T p, ts_t ts=ts()) |
Get the timestamp of the start of the period. | |
template<class T = int> | |
constexpr const ts_t | end_of_period (T p, ts_t ts=ts()) |
Get the timestamp of the end of the period. | |
template<class T = TimeZoneStruct> | |
const TimeZoneStruct | to_time_zone (tz_t offset) |
Converts an integer to a time zone structure. | |
void | process_format_impl (char last_char, size_t repeat_count, ts_t ts, tz_t utc_offset, const DateTimeStruct &dt, std::string &result) |
template<class T = ts_t> | |
const std::string | to_string (const std::string &format_str, T timestamp, tz_t utc_offset=0) |
Convert timestamp to string with custom format. | |
template<class T = ts_t> | |
const std::string | to_str (const std::string &format_str, T timestamp, tz_t utc_offset=0) |
Alias for to_string function. | |
template<class T = ts_ms_t> | |
const std::string | to_string_ms (const std::string &format_str, T timestamp, tz_t utc_offset=0) |
Convert timestamp in milliseconds to string with custom format. | |
template<class T = ts_t> | |
const std::string | to_str_ms (const std::string &format_str, T timestamp, tz_t utc_offset=0) |
Alias for to_string function. | |
template<class T = ts_t> | |
const std::string | to_iso8601 (T ts) |
Converts a timestamp to an ISO8601 string. | |
template<class T = ts_t> | |
const std::string | to_iso8601_date (T ts) |
Converts a timestamp to an ISO8601 date string. | |
template<class T = ts_t> | |
const std::string | to_iso8601_time (T ts) |
Converts a timestamp to an ISO8601 time string. | |
template<class T = ts_t> | |
const std::string | to_iso8601_time_utc (T ts) |
Converts a timestamp to an ISO8601 UTC time string. | |
template<class T = ts_t> | |
const std::string | to_iso8601_utc (T ts) |
Converts a timestamp to an ISO8601 string in UTC format. | |
const std::string | to_iso8601_utc_ms (ts_ms_t ts_ms) |
Converts a timestamp in milliseconds to an ISO8601 string in UTC format. | |
const std::string | to_iso8601_ms (ts_ms_t ts_ms) |
Converts a timestamp in milliseconds to an ISO8601 string. | |
template<class T = ts_t> | |
const std::string | to_iso8601 (T ts, tz_t utc_offset) |
Converts a timestamp to an ISO8601 string with timezone offset. | |
const std::string | to_iso8601_ms (ts_ms_t ts_ms, tz_t utc_offset) |
Converts a timestamp in milliseconds to an ISO8601 string with timezone offset. | |
const std::string | to_mql5_date_time (ts_t ts) |
Converts a timestamp to a string in MQL5 date and time format. | |
const std::string | to_mql5_full (ts_t ts) |
Alias for to_mql5_date_time_str function. | |
const std::string | to_mql5_date (ts_t ts) |
Converts a timestamp to a string in MQL5 date format. | |
const std::string | to_mql5_time (ts_t ts) |
Converts a timestamp to a string in MQL5 time format. | |
const std::string | to_windows_filename (ts_t ts) |
Converts a timestamp in seconds to a Windows-compatible filename format. | |
const std::string | to_windows_filename_ms (ts_ms_t ts) |
Converts a timestamp in milliseconds to a Windows-compatible filename format. | |
std::string | to_human_readable (ts_t ts) |
Converts a timestamp in seconds to a human-readable format. | |
std::string | to_human_readable_ms (ts_ms_t ts) |
Converts a timestamp in milliseconds to a human-readable format. | |
template<class T = Month> | |
const T | get_month_number (const std::string &month) |
Get the month number by name. | |
template<class T = Month> | |
const T | month_of_year (const std::string &month) |
Alias for get_month_number function. | |
template<class T = Month> | |
const bool | try_get_month_number (const std::string &month, T &value) |
Get the month number by name, with output parameter. | |
template<class T = Month> | |
const bool | get_month_number (const std::string &month, T &value) |
Alias for try_get_month_number function. | |
template<class T = Month> | |
const bool | month_of_year (const std::string &month, T &value) |
Alias for try_get_month_number function. | |
const bool | parse_time_zone (const std::string &tz_str, TimeZoneStruct &tz) |
Parse a time zone string into a TimeZoneStruct. | |
const bool | parse_tz (const std::string &tz_str, TimeZoneStruct &tz) |
Alias for parse_time_zone function. | |
const bool | parse_iso8601 (const std::string &input, DateTimeStruct &dt, TimeZoneStruct &tz) |
Parse a date and time string in ISO8601 format. | |
const bool | str_to_ts (const std::string &str, ts_t &ts) |
Convert an ISO8601 string to a timestamp (ts_t). | |
const bool | str_to_ts_ms (const std::string &str, ts_ms_t &ts) |
Convert an ISO8601 string to a millisecond timestamp (ts_ms_t). | |
const bool | str_to_fts (const std::string &str, fts_t &ts) |
Convert an ISO8601 string to a floating-point timestamp (fts_t). | |
const ts_t | ts (const std::string &str) |
Convert an ISO8601 string to a timestamp (ts_t). | |
const ts_ms_t | ts_ms (const std::string &str) |
Convert an ISO8601 string to a millisecond timestamp (ts_ms_t). | |
const fts_t | fts (const std::string &str) |
Convert an ISO8601 string to a floating-point timestamp (fts_t). | |
const ts_t | ts (const char *str) |
Convert an ISO8601 C-style string to a timestamp (ts_t). | |
const ts_ms_t | ts_ms (const char *str) |
Convert an ISO8601 C-style string to a millisecond timestamp (ts_ms_t). | |
const fts_t | fts (const char *str) |
Convert an ISO8601 C-style string to a floating-point timestamp (fts_t). | |
const TimeStruct | create_time_struct (int16_t hour, int16_t min, int16_t sec=0, int16_t ms=0) |
Creates a TimeStruct instance. | |
const struct timespec | get_timespec_impl () noexcept |
Get the current timespec. | |
template<class T = int> | |
const T | ns_of_sec () noexcept |
Get the nanosecond part of the current second. | |
template<class T = int> | |
const T | us_of_sec () noexcept |
Get the microsecond part of the current second. | |
template<class T = int> | |
const T | ms_of_sec () noexcept |
Get the millisecond part of the current second. | |
const ts_t | ts () noexcept |
Get the current UTC timestamp in seconds. | |
const ts_t | timestamp () noexcept |
Get the current UTC timestamp in seconds. | |
const fts_t | fts () noexcept |
Get the current UTC timestamp in floating-point seconds. | |
const fts_t | ftimestamp () noexcept |
Get the current UTC timestamp in floating-point seconds. | |
const ts_ms_t | ts_ms () noexcept |
Get the current UTC timestamp in milliseconds. | |
const ts_ms_t | timestamp_ms () noexcept |
Get the current UTC timestamp in milliseconds. | |
const ts_ms_t | now () noexcept |
Get the current UTC timestamp in milliseconds. | |
const ts_us_t | ts_us () noexcept |
Get the current UTC timestamp in microseconds. | |
const ts_us_t | timestamp_us () noexcept |
Get the current UTC timestamp in microseconds. | |
const TimeZoneStruct | create_time_zone_struct (int hour, int min, bool is_positive=true) |
Creates a TimeZoneStruct instance. | |
const TimeZoneStruct | to_time_zone_struct (tz_t offset) |
Converts an integer to a TimeZoneStruct. | |
const TimeZoneStruct | to_tz (tz_t offset) |
Alias for to_time_zone_struct function. | |
const std::string | time_zone_struct_to_string (const TimeZoneStruct &tz) |
Converts a TimeZoneStruct to a string representation. | |
const std::string | to_string (const TimeZoneStruct &tz) |
Alias for time_zone_struct_to_string function. | |
const std::string | to_str (const TimeZoneStruct &tz) |
Alias for time_zone_struct_to_string function. | |
const tz_t | time_zone_struct_to_offset (const TimeZoneStruct &tz) |
Converts a TimeZoneStruct to a single integer representation. | |
const tz_t | tz_to_offset (const TimeZoneStruct &tz) |
Alias for time_zone_struct_to_offset function. | |
const tz_t | to_offset (const TimeZoneStruct &tz) |
Alias for time_zone_struct_to_offset function. | |
template<class T = year_t> | |
constexpr const bool | is_leap_year_date (T year) noexcept |
Checks if the given year is a leap year. | |
template<class T = year_t> | |
constexpr const bool | check_leap_year (T year) noexcept |
Alias for is_leap_year_date function. | |
template<class T = year_t> | |
constexpr const bool | leap_year (T year) noexcept |
Alias for is_leap_year_date function. | |
TIME_SHIELD_CONSTEXPR const bool | is_leap_year_ts (ts_t ts) |
Checks if the given year is a leap year. | |
TIME_SHIELD_CONSTEXPR const bool | leap_year_ts (ts_t ts) |
Alias for is_leap_year_ts function. | |
TIME_SHIELD_CONSTEXPR const bool | check_leap_year_ts (ts_t ts) |
Alias for is_leap_year_ts function. | |
TIME_SHIELD_CONSTEXPR const bool | is_leap_year (ts_t ts) |
Alias for is_leap_year_ts function. | |
template<class T = int> | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_time_zone (T hour, T min) noexcept |
Check if the time zone is valid. | |
template<class T = int> | |
TIME_SHIELD_CONSTEXPR bool | is_valid_tz (T hour, T min) |
Alias for is_valid_time_zone function. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_time_zone_offset (const T &time_zone) noexcept |
Check if the time zone is valid. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_time_zone (const T &time_zone) |
Alias for is_valid_time_zone_offset function. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_tz (const T &time_zone) |
Alias for is_valid_time_zone_offset function. | |
template<class T1 = int, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_time (T1 hour, T1 min, T1 sec, T2 ms=0) noexcept |
Checks the correctness of the specified time. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_time (const T &time) noexcept |
Checks the correctness of the specified time. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_date (T1 year, T2 month, T2 day) noexcept |
Checks the correctness of the specified date. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_date (const T &date) noexcept |
Checks the correctness of the specified date. | |
template<class T1 = year_t, class T2 = int, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_date_time (T1 year, T2 month, T2 day, T2 hour=0, T2 min=0, T2 sec=0, T3 ms=0) noexcept |
Checks the correctness of a date and time. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const bool | is_valid_date_time (const T &date_time) noexcept |
Checks the correctness of a date and time. | |
TIME_SHIELD_CONSTEXPR const bool | is_day_off (ts_t ts) noexcept |
Check if a given timestamp corresponds to a weekend day (Saturday or Sunday). | |
TIME_SHIELD_CONSTEXPR const bool | is_weekend (ts_t ts) noexcept |
Alias for is_day_off function. | |
template<class T = uday_t> | |
TIME_SHIELD_CONSTEXPR bool | is_day_off_unix_day (T unix_day) noexcept |
Check if a given day (since Unix epoch) corresponds to a weekend day (Saturday or Sunday). This function checks if the given day (number of days since Unix epoch) falls on a weekend day, which is either Saturday or Sunday. | |
template<class T = uday_t> | |
TIME_SHIELD_CONSTEXPR bool | is_weekend_unix_day (T unix_day) noexcept |
Alias for is_day_off_unix_day function. | |
Variables | |
constexpr int64_t | NS_PER_US = 1000 |
Nanoseconds per microsecond. | |
constexpr int64_t | NS_PER_MS = 1000000 |
Nanoseconds per millisecond. | |
constexpr int64_t | NS_PER_SEC = 1000000000 |
Nanoseconds per second. | |
constexpr int64_t | US_PER_SEC = 1000000 |
Microseconds per second. | |
constexpr int64_t | MS_PER_SEC = 1000 |
Milliseconds per second. | |
constexpr int64_t | MS_PER_5_SEC = 5000 |
Milliseconds per 5 second. | |
constexpr int64_t | MS_PER_10_SEC = 5000 |
Milliseconds per 10 second. | |
constexpr int64_t | MS_PER_15_SEC = 15000 |
Milliseconds per 15 second. | |
constexpr int64_t | MS_PER_30_SEC = 30000 |
Milliseconds per 30 second. | |
constexpr int64_t | MS_PER_MIN = 60000 |
Milliseconds per minute. | |
constexpr int64_t | MS_PER_5_MIN = 300000 |
Milliseconds per 5 minute. | |
constexpr int64_t | MS_PER_10_MIN = 600000 |
Milliseconds per 10 minute. | |
constexpr int64_t | MS_PER_15_MIN = 900000 |
Milliseconds per 15 minute. | |
constexpr int64_t | MS_PER_30_MIN = 1800000 |
Milliseconds per 30 minute. | |
constexpr int64_t | MS_PER_HALF_HOUR = 1800000 |
Milliseconds per half hour. | |
constexpr int64_t | MS_PER_HOUR = 3600000 |
Milliseconds per hour. | |
constexpr int64_t | MS_PER_DAY = 86400000 |
Milliseconds per day. | |
constexpr int64_t | SEC_PER_MIN = 60 |
Seconds per minute. | |
constexpr int64_t | SEC_PER_3_MIN = 180 |
Seconds per 3 minute. | |
constexpr int64_t | SEC_PER_5_MIN = 300 |
Seconds per 5 minute. | |
constexpr int64_t | SEC_PER_10_MIN = 600 |
Seconds per 10 minute. | |
constexpr int64_t | SEC_PER_15_MIN = 900 |
Seconds per 15 minute. | |
constexpr int64_t | SEC_PER_HALF_HOUR = 1800 |
Seconds per half hour. | |
constexpr int64_t | SEC_PER_HOUR = 3600 |
Seconds per hour. | |
constexpr int64_t | SEC_PER_DAY = 86400 |
Seconds per day. | |
constexpr int64_t | SEC_PER_YEAR = 31536000 |
Seconds per year (365 days) | |
constexpr int64_t | AVG_SEC_PER_YEAR = 31557600 |
Average seconds per year (365.25 days) | |
constexpr int64_t | SEC_PER_LEAP_YEAR = 31622400 |
Seconds per leap year (366 days) | |
constexpr int64_t | SEC_PER_4_YEARS = 126230400 |
Seconds per 4 years. | |
constexpr int64_t | SEC_PER_FIRST_100_YEARS = 3155760000 |
Seconds per first 100 years. | |
constexpr int64_t | SEC_PER_100_YEARS = 3155673600 |
Seconds per 100 years. | |
constexpr int64_t | SEC_PER_400_YEARS = 12622780800 |
Seconds per 400 years. | |
constexpr int64_t | MAX_SEC_PER_DAY = 86399 |
Maximum seconds per day. | |
constexpr int64_t | MIN_PER_HOUR = 60 |
Minutes per hour. | |
constexpr int64_t | MIN_PER_DAY = 1440 |
Minutes per day. | |
constexpr int64_t | MIN_PER_2_DAY = 2*1440 |
Minutes per 2 day. | |
constexpr int64_t | MIN_PER_5_DAY = 5*1440 |
Minutes per 5 day. | |
constexpr int64_t | MIN_PER_7_DAY = 7*1440 |
Minutes per 7 day. | |
constexpr int64_t | MIN_PER_WEEK = 10080 |
Minutes per week. | |
constexpr int64_t | MIN_PER_10_DAY = 10*1440 |
Minutes per 10 day. | |
constexpr int64_t | MIN_PER_15_DAY = 15*1440 |
Minutes per 15 day. | |
constexpr int64_t | MIN_PER_30_DAY = 15*1440 |
Minutes per 30 day. | |
constexpr int64_t | MIN_PER_MONTH = 40320 |
Minutes per month (28 days) | |
constexpr int64_t | MAX_MOON_MIN = 42523 |
Maximum lunar minutes. | |
constexpr int64_t | HOURS_PER_DAY = 24 |
Hours per day. | |
constexpr int64_t | DAYS_PER_WEEK = 7 |
Days per week. | |
constexpr int64_t | DAYS_PER_LEAP_YEAR = 366 |
Days per leap year. | |
constexpr int64_t | DAYS_PER_YEAR = 365 |
Days per year. | |
constexpr int64_t | DAYS_PER_4_YEARS = 1461 |
Days per 4 years. | |
const int64_t | MONTHS_PER_YEAR = 12 |
Months per year. | |
const int64_t | MAX_DAYS_PER_MONTH = 31 |
Maximum days per month. | |
const int64_t | LEAP_YEAR_PER_100_YEAR = 24 |
Leap years per 100 years. | |
const int64_t | LEAP_YEAR_PER_400_YEAR = 97 |
Leap years per 400 years. | |
constexpr int64_t | UNIX_EPOCH = 1970 |
Start year of UNIX time. | |
constexpr int64_t | OLE_EPOCH = 25569 |
OLE automation date since UNIX epoch. | |
constexpr int64_t | MAX_YEAR = 292277022000LL |
Maximum representable year. | |
constexpr int64_t | MIN_YEAR = -2967369602200LL |
Minimum representable year. | |
constexpr int64_t | ERROR_YEAR = 9223372036854770000LL |
Error year value. | |
constexpr int64_t | MAX_TIMESTAMP = 9223371890843040000LL |
Maximum timestamp value. | |
constexpr int64_t | ERROR_TIMESTAMP = 9223372036854770000LL |
Error timestamp value. | |
constexpr double | MAX_OADATE = std::numeric_limits<double>::max() |
Maximum OLE automation date. | |
constexpr double | AVG_DAYS_PER_YEAR = 365.25 |
Average days per year. | |
Main namespace for the Time Shield library.
The time_shield namespace contains all the core components and functions of the Time Shield library. It includes various utilities for working with time and dates, their formatting, conversion, and validation.