|
Time Shield Library 2.0.0
C++ library for working with time
|
A comprehensive set of functions for parsing and converting date and time strings. More...
Namespaces | |
| namespace | time_shield::detail |
Functions | |
| bool | time_shield::try_parse_format (const char *data, std::size_t length, const char *format, std::size_t format_length, DateTimeStruct &out_dt, TimeZoneStruct &out_tz) noexcept |
| Parse input using formatter-compatible custom pattern. | |
| bool | time_shield::try_parse_format_ts (const char *data, std::size_t length, const char *format, std::size_t format_length, ts_t &out_ts) noexcept |
| Parse input using formatter-compatible custom pattern and convert to UTC seconds. | |
| bool | time_shield::try_parse_format_ts_ms (const char *data, std::size_t length, const char *format, std::size_t format_length, ts_ms_t &out_ts) noexcept |
| Parse input using formatter-compatible custom pattern and convert to UTC milliseconds. | |
| bool | time_shield::try_parse_format (const std::string &data, const std::string &format, DateTimeStruct &out_dt, TimeZoneStruct &out_tz) noexcept |
| Parse std::string using formatter-compatible custom pattern. | |
| bool | time_shield::try_parse_format (const char *data, const char *format, DateTimeStruct &out_dt, TimeZoneStruct &out_tz) noexcept |
| Parse null-terminated strings using formatter-compatible custom pattern. | |
| bool | time_shield::try_parse_format_ts (const std::string &data, const std::string &format, ts_t &out_ts) noexcept |
| Parse std::string using formatter-compatible custom pattern and convert to UTC seconds. | |
| bool | time_shield::try_parse_format_ts (const char *data, const char *format, ts_t &out_ts) noexcept |
| Parse null-terminated strings using custom format and convert to UTC seconds. | |
| bool | time_shield::try_parse_format_ts_ms (const std::string &data, const std::string &format, ts_ms_t &out_ts) noexcept |
| Parse std::string using formatter-compatible custom pattern and convert to UTC milliseconds. | |
| bool | time_shield::try_parse_format_ts_ms (const char *data, const char *format, ts_ms_t &out_ts) noexcept |
| Parse null-terminated strings using custom format and convert to UTC milliseconds. | |
| bool | time_shield::try_parse_format (std::string_view data, std::string_view format, DateTimeStruct &out_dt, TimeZoneStruct &out_tz) noexcept |
| Parse std::string_view using formatter-compatible custom pattern. | |
| bool | time_shield::try_parse_format_ts (std::string_view data, std::string_view format, ts_t &out_ts) noexcept |
| Parse std::string_view using formatter-compatible custom pattern and convert to UTC seconds. | |
| bool | time_shield::try_parse_format_ts_ms (std::string_view data, std::string_view format, ts_ms_t &out_ts) noexcept |
| Parse std::string_view using formatter-compatible custom pattern and convert to UTC milliseconds. | |
| bool | time_shield::try_parse_month (const std::string &month, int &value) |
| Try parse month name token into month index [1..12]. | |
| int | time_shield::parse_month (const std::string &month) |
| Parse month name token into month index [1..12]. | |
| bool | time_shield::try_parse_month (std::string_view month, int &value) |
| Try parse month name token into month index [1..12], string_view overload. | |
| int | time_shield::parse_month (std::string_view month) |
| Parse month name token into month index [1..12], string_view overload. | |
| template<class T = Month> | |
| T | time_shield::parse_month_enum (const std::string &month) |
| Parse month name token into Month enum (throwing). | |
| template<class T = Month> | |
| bool | time_shield::try_parse_month_enum (const std::string &month, T &value) |
| Try parse month name token into Month enum (or any T). | |
| template<class T = Month> | |
| T | time_shield::parse_month_enum (std::string_view month) |
| Parse month name token into Month enum (throwing), string_view overload. | |
| template<class T = Month> | |
| bool | time_shield::try_parse_month_enum (std::string_view month, T &value) |
| Try parse month name token into Month enum (or any T), string_view overload. | |
| bool | time_shield::try_get_month_index (const std::string &month, int &value) |
| Try parse month name token into month index [1..12]. | |
| int | time_shield::get_month_index (const std::string &month) |
| Parse month name token into month index [1..12]. | |
| Month | time_shield::get_month_index_enum (const std::string &month) |
| Parse month name token into Month enum. | |
| bool | time_shield::try_get_month_index (std::string_view month, int &value) |
| Try parse month name token into month index [1..12], string_view overload. | |
| int | time_shield::get_month_index (std::string_view month) |
| Parse month name token into month index [1..12], string_view overload. | |
| Month | time_shield::get_month_index_enum (std::string_view month) |
| Parse month name token into Month enum, string_view overload. | |
| template<class T = Month> | |
| T | time_shield::get_month_number (const std::string &month) |
| Get the month number by name (throwing). | |
| template<class T = Month> | |
| T | time_shield::month_of_year (const std::string &month) |
| Alias for get_month_number (throwing). | |
| template<class T = Month> | |
| bool | time_shield::try_get_month_number (const std::string &month, T &value) |
| Try get the month number by name, with output parameter. | |
| template<class T = Month> | |
| bool | time_shield::get_month_number (const std::string &month, T &value) |
| Alias for try_get_month_number (output parameter). | |
| template<class T = Month> | |
| bool | time_shield::month_of_year (const std::string &month, T &value) |
| Alias for try_get_month_number (output parameter). | |
| template<class T = Month> | |
| T | time_shield::get_month_number (std::string_view month) |
| Get the month number by name (throwing), string_view overload. | |
| template<class T = Month> | |
| T | time_shield::month_of_year (std::string_view month) |
| Alias for get_month_number (throwing), string_view overload. | |
| template<class T = Month> | |
| bool | time_shield::try_get_month_number (std::string_view month, T &value) |
| Try get the month number by name, string_view overload. | |
| template<class T = Month> | |
| bool | time_shield::get_month_number (std::string_view month, T &value) |
| Alias for try_get_month_number, string_view overload. | |
| template<class T = Month> | |
| bool | time_shield::month_of_year (std::string_view month, T &value) |
| Alias for try_get_month_number, string_view overload. | |
| template<class T = Month> | |
| T | time_shield::get_month_number (const char *month) |
| Get the month number by name (throwing), const char* overload. | |
| template<class T = Month> | |
| bool | time_shield::try_get_month_number (const char *month, T &value) |
| Try get the month number by name, const char* overload. | |
| template<class T = Month> | |
| T | time_shield::month_of_year (const char *month) |
| Alias for get_month_number (throwing), const char* overload. | |
| template<class T = Month> | |
| bool | time_shield::get_month_number (const char *month, T &value) |
| Alias for try_get_month_number (output parameter), const char* overload. | |
| template<class T = Month> | |
| bool | time_shield::month_of_year (const char *month, T &value) |
| Alias for try_get_month_number (output parameter), const char* overload. | |
| bool | time_shield::parse_time_zone (const char *data, std::size_t length, TimeZoneStruct &tz) noexcept |
| Parse timezone character buffer into TimeZoneStruct. | |
| bool | time_shield::parse_time_zone (const std::string &tz_str, TimeZoneStruct &tz) noexcept |
| Parse timezone string into TimeZoneStruct. | |
| bool | time_shield::parse_tz (const std::string &tz_str, TimeZoneStruct &tz) noexcept |
| Alias for parse_time_zone. | |
| bool | time_shield::parse_tz (const char *data, std::size_t length, TimeZoneStruct &tz) noexcept |
| Alias for parse_time_zone (buffer overload). | |
| bool | time_shield::parse_time_zone_name (const char *data, std::size_t length, TimeZone &zone) noexcept |
| Parse named time zone character buffer into TimeZone enum. | |
| bool | time_shield::parse_time_zone_name (const std::string &value, TimeZone &zone) noexcept |
| Parse named time zone string into TimeZone enum. | |
| bool | time_shield::parse_time_zone_name (std::string_view value, TimeZone &zone) noexcept |
| Parse named time zone string_view into TimeZone enum. | |
| bool | time_shield::parse_time_zone_name (const char *value, TimeZone &zone) noexcept |
| Parse named time zone C-string into TimeZone enum. | |
| bool | time_shield::parse_tz_name (const char *data, std::size_t length, TimeZone &zone) noexcept |
| Alias for parse_time_zone_name. | |
| bool | time_shield::parse_tz_name (const std::string &value, TimeZone &zone) noexcept |
| Alias for parse_time_zone_name. | |
| bool | time_shield::parse_tz_name (std::string_view value, TimeZone &zone) noexcept |
| Alias for parse_time_zone_name. | |
| bool | time_shield::parse_tz_name (const char *value, TimeZone &zone) noexcept |
| Alias for parse_time_zone_name. | |
| bool | time_shield::parse_iso8601 (const char *input, std::size_t length, DateTimeStruct &dt, TimeZoneStruct &tz) noexcept |
| Parse ISO8601 character buffer into DateTimeStruct and TimeZoneStruct. | |
| bool | time_shield::parse_iso8601 (const std::string &input, DateTimeStruct &dt, TimeZoneStruct &tz) noexcept |
| Parse ISO8601 string into DateTimeStruct and TimeZoneStruct. | |
| bool | time_shield::parse_iso8601 (const char *input, DateTimeStruct &dt, TimeZoneStruct &tz) noexcept |
| Parse ISO8601 C-string into DateTimeStruct and TimeZoneStruct. | |
| bool | time_shield::parse_iso8601 (std::string_view input, DateTimeStruct &dt, TimeZoneStruct &tz) noexcept |
| Parse ISO8601 view into DateTimeStruct and TimeZoneStruct. | |
| bool | time_shield::str_to_ts (const std::string &str, ts_t &ts) |
| Convert an ISO8601 string to a timestamp (ts_t). | |
| bool | time_shield::str_to_ts (const char *data, std::size_t length, ts_t &ts) |
| Parse ISO8601 character buffer and convert to timestamp (seconds). | |
| bool | time_shield::str_to_ts_ms (const std::string &str, ts_ms_t &ts) |
| Convert an ISO8601 string to a millisecond timestamp (ts_ms_t). | |
| bool | time_shield::str_to_ts_ms (const char *data, std::size_t length, ts_ms_t &ts) |
| Convert ISO8601 character buffer to millisecond timestamp (ts_ms_t). | |
| bool | time_shield::str_to_fts (const std::string &str, fts_t &ts) |
| Convert an ISO8601 string to a floating-point timestamp (fts_t). | |
| bool | time_shield::str_to_fts (const char *data, std::size_t length, fts_t &ts) |
| Convert ISO8601 character buffer to floating-point timestamp (fts_t). | |
| bool | time_shield::is_workday (const std::string &str) |
| Parse ISO8601 string and check if it falls on a workday (seconds precision). | |
| bool | time_shield::is_workday_ms (const std::string &str) |
| Parse ISO8601 string and check if it falls on a workday (milliseconds precision). | |
| bool | time_shield::workday (const std::string &str) |
| Alias for is_workday(const std::string&). | |
| bool | time_shield::workday_ms (const std::string &str) |
| Alias for is_workday_ms(const std::string&). | |
| bool | time_shield::is_first_workday_of_month (const std::string &str) |
| Parse ISO8601 string and check if it is the first workday of its month (seconds). | |
| bool | time_shield::is_first_workday_of_month_ms (const std::string &str) |
| Parse an ISO8601 string and check if it is the first workday of its month (millisecond precision). | |
| bool | time_shield::is_last_workday_of_month (const std::string &str) |
| Parse an ISO8601 string and check if it is the last workday of its month (seconds). | |
| bool | time_shield::is_last_workday_of_month_ms (const std::string &str) |
| Parse an ISO8601 string and check if it is the last workday of its month (millisecond). | |
| bool | time_shield::is_within_first_workdays_of_month (const std::string &str, int count) |
| Parse an ISO8601 string and check if it falls within the first N workdays of its month. | |
| bool | time_shield::is_within_first_workdays_of_month_ms (const std::string &str, int count) |
| Parse an ISO8601 string and check if it falls within the first N workdays of its month (millisecond precision). | |
| bool | time_shield::is_within_last_workdays_of_month (const std::string &str, int count) |
| Parse ISO8601 string and check if it is within last N workdays of its month (seconds). | |
| bool | time_shield::is_within_last_workdays_of_month_ms (const std::string &str, int count) |
| Parse ISO8601 string and check if it is within last N workdays of its month (milliseconds). | |
| ts_t | time_shield::ts (const char *str) |
| Convert ISO8601 C-string to timestamp (seconds). | |
| ts_t | time_shield::ts (const char *data, std::size_t length) |
| Convert ISO8601 character buffer to timestamp (seconds). | |
| ts_ms_t | time_shield::ts_ms (const char *str) |
| Convert ISO8601 C-string to timestamp (milliseconds). | |
| ts_ms_t | time_shield::ts_ms (const char *data, std::size_t length) |
| Convert ISO8601 character buffer to timestamp (milliseconds). | |
| fts_t | time_shield::fts (const char *str) |
| Convert ISO8601 C-string to floating timestamp (seconds). | |
| fts_t | time_shield::fts (const char *data, std::size_t length) |
| Convert ISO8601 character buffer to floating timestamp (seconds). | |
| ts_t | time_shield::ts (const std::string &str) |
| Convert an ISO8601 string to a timestamp (ts_t). | |
| ts_ms_t | time_shield::ts_ms (const std::string &str) |
| Convert an ISO8601 string to a millisecond timestamp (ts_ms_t). | |
| fts_t | time_shield::fts (const std::string &str) |
| Convert an ISO8601 string to a floating-point timestamp (fts_t). | |
| bool | time_shield::str_to_timeframe_sec (const std::string &str, ts_t &seconds) noexcept |
| Parse timeframe string into fixed seconds. | |
| bool | time_shield::str_to_timeframe_sec (const char *str, ts_t &seconds) noexcept |
| Parse timeframe C-string into fixed seconds. | |
| bool | time_shield::str_to_timeframe_sec (std::string_view str, ts_t &seconds) noexcept |
| Parse timeframe view into fixed seconds. | |
| bool | time_shield::str_to_timeframe_ms (const std::string &str, ts_ms_t &milliseconds) noexcept |
| Parse timeframe string into fixed milliseconds. | |
| bool | time_shield::str_to_timeframe_ms (const char *str, ts_ms_t &milliseconds) noexcept |
| Parse timeframe C-string into fixed milliseconds. | |
| bool | time_shield::str_to_timeframe_ms (std::string_view str, ts_ms_t &milliseconds) noexcept |
| Parse timeframe view into fixed milliseconds. | |
| ts_t | time_shield::timeframe_sec (const std::string &str) noexcept |
| Convert timeframe string to fixed seconds. | |
| ts_t | time_shield::timeframe_sec (const char *str) noexcept |
| Convert timeframe C-string to fixed seconds. | |
| ts_t | time_shield::timeframe_sec (std::string_view str) noexcept |
| Convert timeframe view to fixed seconds. | |
| ts_ms_t | time_shield::timeframe_ms (const std::string &str) noexcept |
| Convert timeframe string to fixed milliseconds. | |
| ts_ms_t | time_shield::timeframe_ms (const char *str) noexcept |
| Convert timeframe C-string to fixed milliseconds. | |
| ts_ms_t | time_shield::timeframe_ms (std::string_view str) noexcept |
| Convert timeframe view to fixed milliseconds. | |
| template<class T = int> | |
| bool | time_shield::sec_of_day (const std::string &str, T &sec) |
| Parse time of day string to seconds of day. | |
| template<class T = int> | |
| T | time_shield::sec_of_day (const std::string &str) |
| Convert time of day string to seconds of day. | |
| int | time_shield::get_month_number (string month) |
| Get the month number by name. | |
| int | time_shield::month_of_year (string month) |
| Alias for get_month_number function. | |
| bool | time_shield::try_get_month_number (string month, int &value) |
| Get the month number by name, with output parameter. | |
| bool | time_shield::get_month_number (string month, int &value) |
| Alias for try_get_month_number function. | |
| bool | time_shield::month_of_year (string month, int &value) |
| Alias for try_get_month_number function. | |
| bool | time_shield::timeframe_is_ascii_space (const int ch) |
| bool | time_shield::timeframe_is_ascii_digit (const int ch) |
| bool | time_shield::timeframe_is_ascii_alpha (const int ch) |
| int | time_shield::timeframe_ascii_to_lower (const int ch) |
| string | time_shield::timeframe_trim_ascii (string value) |
| bool | time_shield::timeframe_ascii_iequals (string value, string literal) |
| bool | time_shield::timeframe_try_parse_positive_long (string value, long &out) |
| bool | time_shield::timeframe_try_multiply_positive_long (long lhs, long rhs, long &out) |
| bool | time_shield::timeframe_try_get_unit_seconds_compact (string unit, long &unit_seconds) |
| bool | time_shield::timeframe_try_get_unit_seconds_word (string unit, long &unit_seconds) |
| bool | time_shield::timeframe_try_parse_seconds (string str, long &seconds) |
| bool | time_shield::parse_time_zone (string tz_str, TimeZoneStruct &tz) |
| Parse a time zone string into a TimeZoneStruct. | |
| bool | time_shield::parse_tz (string tz_str, TimeZoneStruct &tz) |
| Alias for parse_time_zone function. | |
| bool | time_shield::parse_iso8601 (string input_str, DateTimeStruct &dt, TimeZoneStruct &tz) |
| Parse a date and time string in ISO8601 format. | |
| bool | time_shield::str_to_ts (string str, long &ts) |
| Convert an ISO8601 string to a timestamp (ts_t). | |
| bool | time_shield::str_to_ts_ms (string str, long &ts) |
| Convert an ISO8601 string to a millisecond timestamp (ts_ms_t). | |
| bool | time_shield::is_workday (string str) |
| Parse ISO8601 string and check for workday using second precision. | |
| bool | time_shield::workday (string str) |
| Alias for is_workday. | |
| bool | time_shield::is_workday_ms (string str) |
| Parse ISO8601 string and check for workday using millisecond precision. | |
| bool | time_shield::workday_ms (string str) |
| Alias for is_workday_ms. | |
| bool | time_shield::is_first_workday_of_month (string str) |
| Parse ISO8601 string and check for the first workday of the month using second precision. | |
| bool | time_shield::is_first_workday_of_month_ms (string str) |
| Parse ISO8601 string and check for the first workday of the month using millisecond precision. | |
| bool | time_shield::is_within_first_workdays_of_month (string str, int count) |
| Parse ISO8601 string and check if it falls within the first N workdays of the month using second precision. | |
| bool | time_shield::is_within_first_workdays_of_month_ms (string str, int count) |
| Parse ISO8601 string and check if it falls within the first N workdays of the month using millisecond precision. | |
| bool | time_shield::is_last_workday_of_month (string str) |
| Parse ISO8601 string and check for the last workday of the month using second precision. | |
| bool | time_shield::is_last_workday_of_month_ms (string str) |
| Parse ISO8601 string and check for the last workday of the month using millisecond precision. | |
| bool | time_shield::is_within_last_workdays_of_month (string str, int count) |
| Parse ISO8601 string and check if it falls within the last N workdays of the month using second precision. | |
| bool | time_shield::is_within_last_workdays_of_month_ms (string str, int count) |
| Parse ISO8601 string and check if it falls within the last N workdays of the month using millisecond precision. | |
| long | time_shield::start_of_first_workday_month (string str) |
| Parse ISO8601 string and return start of the first workday of that month in seconds. | |
| long | time_shield::start_of_first_workday_month_ms (string str) |
| Parse ISO8601 string and return start of the first workday of that month in milliseconds. | |
| long | time_shield::end_of_first_workday_month (string str) |
| Parse ISO8601 string and return end of the first workday of that month in seconds. | |
| long | time_shield::end_of_first_workday_month_ms (string str) |
| Parse ISO8601 string and return end of the first workday of that month in milliseconds. | |
| long | time_shield::start_of_last_workday_month (string str) |
| Parse ISO8601 string and return start of the last workday of that month in seconds. | |
| long | time_shield::start_of_last_workday_month_ms (string str) |
| Parse ISO8601 string and return start of the last workday of that month in milliseconds. | |
| long | time_shield::end_of_last_workday_month (string str) |
| Parse ISO8601 string and return end of the last workday of that month in seconds. | |
| long | time_shield::end_of_last_workday_month_ms (string str) |
| Parse ISO8601 string and return end of the last workday of that month in milliseconds. | |
| bool | time_shield::str_to_fts (string str, double &ts) |
| Convert an ISO8601 string to a floating-point timestamp (fts_t). | |
| long | time_shield::ts (string str) |
| Convert an ISO8601 string to a timestamp (ts_t). | |
| long | time_shield::ts_ms (string str) |
| Convert an ISO8601 string to a millisecond timestamp (ts_ms_t). | |
| double | time_shield::fts (string str) |
| Convert an ISO8601 string to a floating-point timestamp (fts_t). | |
| bool | time_shield::str_to_timeframe_sec (string str, long &seconds) |
| Parse timeframe string into fixed seconds. | |
| bool | time_shield::str_to_timeframe_ms (string str, long &milliseconds) |
| Parse timeframe string into fixed milliseconds. | |
| long | time_shield::timeframe_sec (string str) |
| Convert timeframe string to fixed seconds. | |
| long | time_shield::timeframe_ms (string str) |
| Convert timeframe string to fixed milliseconds. | |
| int | time_shield::sec_of_day (string str) |
| Convert string with time of day to second of day. | |
A comprehensive set of functions for parsing and converting date and time strings.
This module provides utilities for parsing date and time strings in ISO8601 format, extracting date components, and converting them into various timestamp formats.
| long time_shield::end_of_first_workday_month | ( | string | str | ) |
Parse ISO8601 string and return end of the first workday of that month in seconds.
| str | ISO8601 formatted string. |
Definition at line 515 of file time_parser.mqh.
| long time_shield::end_of_first_workday_month_ms | ( | string | str | ) |
Parse ISO8601 string and return end of the first workday of that month in milliseconds.
| str | ISO8601 formatted string. |
Definition at line 525 of file time_parser.mqh.
| long time_shield::end_of_last_workday_month | ( | string | str | ) |
Parse ISO8601 string and return end of the last workday of that month in seconds.
| str | ISO8601 formatted string. |
Definition at line 555 of file time_parser.mqh.
| long time_shield::end_of_last_workday_month_ms | ( | string | str | ) |
Parse ISO8601 string and return end of the last workday of that month in milliseconds.
| str | ISO8601 formatted string. |
Definition at line 565 of file time_parser.mqh.
|
inline |
Convert ISO8601 character buffer to floating timestamp (seconds).
Does not require null terminator. Returns 0 on failure.
| data | Pointer to character buffer. |
| length | Number of characters in buffer. |
Definition at line 1482 of file time_parser.hpp.
|
inline |
Convert ISO8601 C-string to floating timestamp (seconds).
Returns 0 on failure.
| str | C-style string with ISO8601 timestamp, may be nullptr. |
Definition at line 1471 of file time_parser.hpp.
|
inline |
Convert an ISO8601 string to a floating-point timestamp (fts_t).
This function parses a string in ISO8601 format and converts it to a floating-point timestamp. If the parsing fails, it returns 0.
| str | The ISO8601 string. |
Definition at line 1519 of file time_parser.hpp.
| double time_shield::fts | ( | string | str | ) |
Convert an ISO8601 string to a floating-point timestamp (fts_t).
Returns 0.0 if parsing fails.
| str | The ISO8601 string. |
Definition at line 607 of file time_parser.mqh.
|
inline |
Parse month name token into month index [1..12].
| month | Month token. |
| std::invalid_argument | if token is invalid. |
Definition at line 694 of file time_parser.hpp.
|
inline |
Parse month name token into month index [1..12], string_view overload.
Definition at line 713 of file time_parser.hpp.
|
inline |
Parse month name token into Month enum.
| month | Month token. |
| std::invalid_argument | if token is invalid. |
Definition at line 702 of file time_parser.hpp.
|
inline |
Parse month name token into Month enum, string_view overload.
Definition at line 718 of file time_parser.hpp.
|
inline |
Get the month number by name (throwing), const char* overload.
| T | Return type, default is Month enum. |
| month | Month token C-string. |
| std::invalid_argument | if token is invalid. |
Definition at line 803 of file time_parser.hpp.
|
inline |
Alias for try_get_month_number (output parameter), const char* overload.
Definition at line 833 of file time_parser.hpp.
|
inline |
Get the month number by name (throwing).
| T | Return type, default is Month enum. |
| month | Month token. |
| std::invalid_argument | if token is invalid. |
Definition at line 731 of file time_parser.hpp.
|
inline |
Alias for try_get_month_number (output parameter).
Definition at line 753 of file time_parser.hpp.
|
inline |
Get the month number by name (throwing), string_view overload.
Definition at line 766 of file time_parser.hpp.
|
inline |
Alias for try_get_month_number, string_view overload.
Definition at line 784 of file time_parser.hpp.
| int time_shield::get_month_number | ( | string | month | ) |
Get the month number by name.
| month | The name of the month as a string. |
Definition at line 39 of file time_parser.mqh.
| bool time_shield::get_month_number | ( | string | month, |
| int & | value ) |
Alias for try_get_month_number function.
Try get the month number by name, with output parameter.
| T | Output type, default is Month enum. |
| month | Month token. |
| value | Output month number (1..12) converted to T. |
Definition at line 80 of file time_parser.mqh.
|
inline |
Parse ISO8601 string and check if it is the first workday of its month (seconds).
| str | ISO8601 formatted string. |
Definition at line 1343 of file time_parser.hpp.
| bool time_shield::is_first_workday_of_month | ( | string | str | ) |
Parse ISO8601 string and check for the first workday of the month using second precision.
| str | ISO8601 formatted string. |
Definition at line 411 of file time_parser.mqh.
|
inline |
Parse an ISO8601 string and check if it is the first workday of its month (millisecond precision).
| str | ISO8601 formatted string. |
Definition at line 1352 of file time_parser.hpp.
| bool time_shield::is_first_workday_of_month_ms | ( | string | str | ) |
Parse ISO8601 string and check for the first workday of the month using millisecond precision.
| str | ISO8601 formatted string. |
Definition at line 421 of file time_parser.mqh.
|
inline |
Parse an ISO8601 string and check if it is the last workday of its month (seconds).
| str | ISO8601 formatted string. |
Definition at line 1361 of file time_parser.hpp.
| bool time_shield::is_last_workday_of_month | ( | string | str | ) |
Parse ISO8601 string and check for the last workday of the month using second precision.
| str | ISO8601 formatted string. |
Definition at line 453 of file time_parser.mqh.
|
inline |
Parse an ISO8601 string and check if it is the last workday of its month (millisecond).
| str | ISO8601 formatted string. |
Definition at line 1370 of file time_parser.hpp.
| bool time_shield::is_last_workday_of_month_ms | ( | string | str | ) |
Parse ISO8601 string and check for the last workday of the month using millisecond precision.
| str | ISO8601 formatted string. |
Definition at line 463 of file time_parser.mqh.
|
inline |
Parse an ISO8601 string and check if it falls within the first N workdays of its month.
| str | ISO8601 formatted string. |
| count | Number of leading workdays to test against. |
Definition at line 1380 of file time_parser.hpp.
| bool time_shield::is_within_first_workdays_of_month | ( | string | str, |
| int | count ) |
Parse ISO8601 string and check if it falls within the first N workdays of the month using second precision.
| str | ISO8601 formatted string. |
| count | Number of leading workdays to test. |
Definition at line 432 of file time_parser.mqh.
|
inline |
Parse an ISO8601 string and check if it falls within the first N workdays of its month (millisecond precision).
| str | ISO8601 formatted string. |
| count | Number of leading workdays to test against. |
Definition at line 1390 of file time_parser.hpp.
| bool time_shield::is_within_first_workdays_of_month_ms | ( | string | str, |
| int | count ) |
Parse ISO8601 string and check if it falls within the first N workdays of the month using millisecond precision.
| str | ISO8601 formatted string. |
| count | Number of leading workdays to test. |
Definition at line 443 of file time_parser.mqh.
|
inline |
Parse ISO8601 string and check if it is within last N workdays of its month (seconds).
| str | ISO8601 formatted string. |
| count | Number of trailing workdays to test against. |
Definition at line 1400 of file time_parser.hpp.
| bool time_shield::is_within_last_workdays_of_month | ( | string | str, |
| int | count ) |
Parse ISO8601 string and check if it falls within the last N workdays of the month using second precision.
| str | ISO8601 formatted string. |
| count | Number of trailing workdays to test. |
Definition at line 474 of file time_parser.mqh.
|
inline |
Parse ISO8601 string and check if it is within last N workdays of its month (milliseconds).
| str | ISO8601 formatted string. |
| count | Number of trailing workdays to test against. |
Definition at line 1410 of file time_parser.hpp.
| bool time_shield::is_within_last_workdays_of_month_ms | ( | string | str, |
| int | count ) |
Parse ISO8601 string and check if it falls within the last N workdays of the month using millisecond precision.
| str | ISO8601 formatted string. |
| count | Number of trailing workdays to test. |
Definition at line 485 of file time_parser.mqh.
|
inline |
Parse ISO8601 string and check if it falls on a workday (seconds precision).
Definition at line 1315 of file time_parser.hpp.
| bool time_shield::is_workday | ( | string | str | ) |
Parse ISO8601 string and check for workday using second precision.
| str | ISO8601 formatted string. |
Definition at line 383 of file time_parser.mqh.
|
inline |
Parse ISO8601 string and check if it falls on a workday (milliseconds precision).
Definition at line 1322 of file time_parser.hpp.
| bool time_shield::is_workday_ms | ( | string | str | ) |
Parse ISO8601 string and check for workday using millisecond precision.
| str | ISO8601 formatted string. |
Definition at line 397 of file time_parser.mqh.
|
inline |
Alias for get_month_number (throwing), const char* overload.
Definition at line 827 of file time_parser.hpp.
|
inline |
Alias for try_get_month_number (output parameter), const char* overload.
Definition at line 839 of file time_parser.hpp.
|
inline |
Alias for get_month_number (throwing).
Definition at line 737 of file time_parser.hpp.
|
inline |
Alias for try_get_month_number (output parameter).
Definition at line 759 of file time_parser.hpp.
|
inline |
Alias for get_month_number (throwing), string_view overload.
Definition at line 772 of file time_parser.hpp.
|
inline |
Alias for try_get_month_number, string_view overload.
Definition at line 790 of file time_parser.hpp.
| int time_shield::month_of_year | ( | string | month | ) |
Alias for get_month_number function.
Get the month number by name (throwing).
| T | Return type, default is Month enum. |
| month | Month token. |
| std::invalid_argument | if token is invalid. |
Definition at line 62 of file time_parser.mqh.
| bool time_shield::month_of_year | ( | string | month, |
| int & | value ) |
Alias for try_get_month_number function.
Try get the month number by name, with output parameter.
| T | Output type, default is Month enum. |
| month | Month token. |
| value | Output month number (1..12) converted to T. |
Definition at line 84 of file time_parser.mqh.
|
inlinenoexcept |
Parse ISO8601 C-string into DateTimeStruct and TimeZoneStruct.
Wrapper over parse_iso8601(const char*, std::size_t, DateTimeStruct&, TimeZoneStruct&).
Definition at line 1186 of file time_parser.hpp.
|
inlinenoexcept |
Parse ISO8601 character buffer into DateTimeStruct and TimeZoneStruct.
Supported inputs:
Date separators supported: '-', '/', '.' (as in original regex). ISO week-date forms are also accepted through parse_iso_week_date(), including canonical and compatible mixed separator variants with optional weekday and uppercase or lowercase W.
| input | Pointer to buffer (may be not null-terminated). |
| length | Buffer length. |
| dt | Output DateTimeStruct (filled). On success, dt is always initialized. |
| tz | Output TimeZoneStruct (filled). If timezone is not present, UTC is used. |
Definition at line 1011 of file time_parser.hpp.
|
inlinenoexcept |
Parse ISO8601 string into DateTimeStruct and TimeZoneStruct.
Wrapper over parse_iso8601(const char*, std::size_t, DateTimeStruct&, TimeZoneStruct&).
Definition at line 1180 of file time_parser.hpp.
|
inlinenoexcept |
Parse ISO8601 view into DateTimeStruct and TimeZoneStruct.
Wrapper over parse_iso8601(const char*, std::size_t, DateTimeStruct&, TimeZoneStruct&).
Definition at line 1196 of file time_parser.hpp.
| bool time_shield::parse_iso8601 | ( | string | input_str, |
| DateTimeStruct & | dt, | ||
| TimeZoneStruct & | tz ) |
Parse a date and time string in ISO8601 format.
| input_str | The input string in ISO8601 format. |
| dt | The DateTimeStruct to be filled with parsed values. |
| tz | The TimeZoneStruct to be filled with parsed time zone. |
Definition at line 297 of file time_parser.mqh.
|
inline |
Parse month name token into month index [1..12].
| month | Month token. |
| std::invalid_argument | if token is invalid. |
Definition at line 608 of file time_parser.hpp.
|
inline |
Parse month name token into month index [1..12], string_view overload.
| month | Month token view. |
| std::invalid_argument | if token is invalid. |
Definition at line 625 of file time_parser.hpp.
|
inline |
Parse month name token into Month enum (throwing).
| T | Return type, default is Month enum. |
| month | Month token. |
| std::invalid_argument | if token is invalid. |
Definition at line 638 of file time_parser.hpp.
|
inline |
Parse month name token into Month enum (throwing), string_view overload.
| T | Return type, default is Month enum. |
| month | Month token view. |
| std::invalid_argument | if token is invalid. |
Definition at line 662 of file time_parser.hpp.
|
inlinenoexcept |
Parse timezone character buffer into TimeZoneStruct.
Supported formats:
Parsing is syntax-oriented and accepts offsets up to 23:59. Semantic support checks for reusable library features use is_valid_tz_offset(...) and the supported UTC-offset range [-12:00, +14:00].
| data | Pointer to timezone buffer (may be not null-terminated). |
| length | Number of characters in buffer. |
| tz | Output time zone struct. |
Definition at line 861 of file time_parser.hpp.
|
inlinenoexcept |
Parse timezone string into TimeZoneStruct.
Wrapper over parse_time_zone(const char*, std::size_t, TimeZoneStruct&).
Definition at line 905 of file time_parser.hpp.
| bool time_shield::parse_time_zone | ( | string | tz_str, |
| TimeZoneStruct & | tz ) |
Parse a time zone string into a TimeZoneStruct.
Parses a time zone string in the format "+hh:mm", "-hh:mm" or "Z". If the string is empty or "Z", UTC is assumed.
| tz_str | The time zone string. |
| tz | The TimeZoneStruct to be filled. |
Definition at line 273 of file time_parser.mqh.
|
inlinenoexcept |
Parse named time zone character buffer into TimeZone enum.
Supported tokens are exact uppercase repo-native abbreviations with ASCII trimming.
| data | Pointer to time zone name buffer. |
| length | Number of characters in buffer. |
| zone | Output named time zone. |
Definition at line 925 of file time_parser.hpp.
|
inlinenoexcept |
Parse named time zone C-string into TimeZone enum.
Wrapper over parse_time_zone_name(const char*, std::size_t, TimeZone&).
Definition at line 958 of file time_parser.hpp.
|
inlinenoexcept |
Parse named time zone string into TimeZone enum.
Wrapper over parse_time_zone_name(const char*, std::size_t, TimeZone&).
Definition at line 944 of file time_parser.hpp.
|
inlinenoexcept |
Parse named time zone string_view into TimeZone enum.
Wrapper over parse_time_zone_name(const char*, std::size_t, TimeZone&).
Definition at line 951 of file time_parser.hpp.
|
inlinenoexcept |
Alias for parse_time_zone (buffer overload).
Definition at line 915 of file time_parser.hpp.
|
inlinenoexcept |
Alias for parse_time_zone.
Definition at line 910 of file time_parser.hpp.
| bool time_shield::parse_tz | ( | string | tz_str, |
| TimeZoneStruct & | tz ) |
Alias for parse_time_zone function.
| tz_str | Time zone offset in ±HH:MM format. |
| tz | Receives the parsed time zone. |
Definition at line 288 of file time_parser.mqh.
|
inlinenoexcept |
Alias for parse_time_zone_name.
Definition at line 967 of file time_parser.hpp.
|
inlinenoexcept |
Alias for parse_time_zone_name.
Definition at line 984 of file time_parser.hpp.
|
inlinenoexcept |
Alias for parse_time_zone_name.
Definition at line 972 of file time_parser.hpp.
|
inlinenoexcept |
Alias for parse_time_zone_name.
Definition at line 978 of file time_parser.hpp.
|
inline |
Convert time of day string to seconds of day.
Supported formats:
| T | Return type (default int). |
| str | Time of day as string. |
Definition at line 1754 of file time_parser.hpp.
|
inline |
Parse time of day string to seconds of day.
Supported formats:
| T | Return type (default int). |
| str | Time of day as string. |
| sec | Parsed seconds of day on success. |
Definition at line 1705 of file time_parser.hpp.
| int time_shield::sec_of_day | ( | string | str | ) |
Convert string with time of day to second of day.
Supports formats:
| str | Time in string format |
Definition at line 672 of file time_parser.mqh.
| long time_shield::start_of_first_workday_month | ( | string | str | ) |
Parse ISO8601 string and return start of the first workday of that month in seconds.
| str | ISO8601 formatted string. |
Definition at line 495 of file time_parser.mqh.
| long time_shield::start_of_first_workday_month_ms | ( | string | str | ) |
Parse ISO8601 string and return start of the first workday of that month in milliseconds.
| str | ISO8601 formatted string. |
Definition at line 505 of file time_parser.mqh.
| long time_shield::start_of_last_workday_month | ( | string | str | ) |
Parse ISO8601 string and return start of the last workday of that month in seconds.
| str | ISO8601 formatted string. |
Definition at line 535 of file time_parser.mqh.
| long time_shield::start_of_last_workday_month_ms | ( | string | str | ) |
Parse ISO8601 string and return start of the last workday of that month in milliseconds.
| str | ISO8601 formatted string. |
Definition at line 545 of file time_parser.mqh.
|
inline |
Convert ISO8601 character buffer to floating-point timestamp (fts_t).
| data | Pointer to character buffer. |
| length | Number of characters in buffer. |
| ts | Output timestamp in floating-point seconds. |
Definition at line 1295 of file time_parser.hpp.
|
inline |
Convert an ISO8601 string to a floating-point timestamp (fts_t).
| str | ISO8601 string. |
| ts | Output timestamp (floating-point seconds). |
Definition at line 1279 of file time_parser.hpp.
| bool time_shield::str_to_fts | ( | string | str, |
| double & | ts ) |
Convert an ISO8601 string to a floating-point timestamp (fts_t).
| str | The ISO8601 string. |
| ts | The floating-point timestamp to be filled. |
Definition at line 576 of file time_parser.mqh.
|
inlinenoexcept |
Parse timeframe C-string into fixed milliseconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| milliseconds | Output duration in milliseconds. |
Definition at line 1582 of file time_parser.hpp.
|
inlinenoexcept |
Parse timeframe string into fixed milliseconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| milliseconds | Output duration in milliseconds. |
Definition at line 1561 of file time_parser.hpp.
|
inlinenoexcept |
Parse timeframe view into fixed milliseconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| milliseconds | Output duration in milliseconds. |
Definition at line 1609 of file time_parser.hpp.
| bool time_shield::str_to_timeframe_ms | ( | string | str, |
| long & | milliseconds ) |
Parse timeframe string into fixed milliseconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| milliseconds | Parsed duration in milliseconds. |
Definition at line 627 of file time_parser.mqh.
|
inlinenoexcept |
Parse timeframe C-string into fixed seconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| seconds | Output duration in seconds. |
Definition at line 1539 of file time_parser.hpp.
|
inlinenoexcept |
Parse timeframe string into fixed seconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| seconds | Output duration in seconds. |
Definition at line 1531 of file time_parser.hpp.
|
inlinenoexcept |
Parse timeframe view into fixed seconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| seconds | Output duration in seconds. |
Definition at line 1552 of file time_parser.hpp.
| bool time_shield::str_to_timeframe_sec | ( | string | str, |
| long & | seconds ) |
Parse timeframe string into fixed seconds.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
| seconds | Parsed duration in seconds. |
Definition at line 619 of file time_parser.mqh.
|
inline |
Parse ISO8601 character buffer and convert to timestamp (seconds).
| data | Pointer to character buffer. |
| length | Buffer length in bytes. |
| ts | Output timestamp in seconds. |
Definition at line 1225 of file time_parser.hpp.
|
inline |
Convert an ISO8601 string to a timestamp (ts_t).
| str | ISO8601 string. |
| ts | Output timestamp (seconds). |
Definition at line 1209 of file time_parser.hpp.
| bool time_shield::str_to_ts | ( | string | str, |
| long & | ts ) |
Convert an ISO8601 string to a timestamp (ts_t).
| str | The ISO8601 string. |
| ts | The timestamp to be filled. |
Definition at line 362 of file time_parser.mqh.
|
inline |
Convert ISO8601 character buffer to millisecond timestamp (ts_ms_t).
| data | Pointer to character buffer. |
| length | Number of characters in buffer. |
| ts | Output timestamp in milliseconds. |
Definition at line 1260 of file time_parser.hpp.
|
inline |
Convert an ISO8601 string to a millisecond timestamp (ts_ms_t).
| str | ISO8601 string. |
| ts | Output timestamp (milliseconds). |
Definition at line 1244 of file time_parser.hpp.
| bool time_shield::str_to_ts_ms | ( | string | str, |
| long & | ts ) |
Convert an ISO8601 string to a millisecond timestamp (ts_ms_t).
| str | The ISO8601 string. |
| ts | The millisecond timestamp to be filled. |
Definition at line 373 of file time_parser.mqh.
| bool time_shield::timeframe_ascii_iequals | ( | string | value, |
| string | literal ) |
Definition at line 116 of file time_parser.mqh.
| int time_shield::timeframe_ascii_to_lower | ( | const int | ch | ) |
Definition at line 100 of file time_parser.mqh.
| bool time_shield::timeframe_is_ascii_alpha | ( | const int | ch | ) |
Definition at line 96 of file time_parser.mqh.
| bool time_shield::timeframe_is_ascii_digit | ( | const int | ch | ) |
Definition at line 92 of file time_parser.mqh.
| bool time_shield::timeframe_is_ascii_space | ( | const int | ch | ) |
Definition at line 88 of file time_parser.mqh.
|
inlinenoexcept |
Convert timeframe C-string to fixed milliseconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 1673 of file time_parser.hpp.
|
inlinenoexcept |
Convert timeframe string to fixed milliseconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 1663 of file time_parser.hpp.
|
inlinenoexcept |
Convert timeframe view to fixed milliseconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 1684 of file time_parser.hpp.
| long time_shield::timeframe_ms | ( | string | str | ) |
Convert timeframe string to fixed milliseconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 656 of file time_parser.mqh.
|
inlinenoexcept |
Convert timeframe C-string to fixed seconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 1641 of file time_parser.hpp.
|
inlinenoexcept |
Convert timeframe string to fixed seconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 1631 of file time_parser.hpp.
|
inlinenoexcept |
Convert timeframe view to fixed seconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 1652 of file time_parser.hpp.
| long time_shield::timeframe_sec | ( | string | str | ) |
Convert timeframe string to fixed seconds.
Returns 0 if parsing fails.
| str | Timeframe string such as "M15", "hour", or "2 weeks". |
Definition at line 646 of file time_parser.mqh.
| string time_shield::timeframe_trim_ascii | ( | string | value | ) |
Definition at line 106 of file time_parser.mqh.
| bool time_shield::timeframe_try_get_unit_seconds_compact | ( | string | unit, |
| long & | unit_seconds ) |
Definition at line 165 of file time_parser.mqh.
| bool time_shield::timeframe_try_get_unit_seconds_word | ( | string | unit, |
| long & | unit_seconds ) |
Definition at line 179 of file time_parser.mqh.
| bool time_shield::timeframe_try_multiply_positive_long | ( | long | lhs, |
| long | rhs, | ||
| long & | out ) |
Definition at line 154 of file time_parser.mqh.
| bool time_shield::timeframe_try_parse_positive_long | ( | string | value, |
| long & | out ) |
Definition at line 130 of file time_parser.mqh.
| bool time_shield::timeframe_try_parse_seconds | ( | string | str, |
| long & | seconds ) |
Definition at line 193 of file time_parser.mqh.
|
inline |
Try parse month name token into month index [1..12].
| month | Month token (e.g. "Jan", "January"), case-insensitive. |
| value | Output month index [1..12]. |
Definition at line 686 of file time_parser.hpp.
|
inline |
Try parse month name token into month index [1..12], string_view overload.
Definition at line 708 of file time_parser.hpp.
|
inline |
Try get the month number by name, const char* overload.
| T | Output type, default is Month enum. |
| month | Month token C-string. |
| value | Output month number (1..12) converted to T. |
Definition at line 817 of file time_parser.hpp.
|
inline |
Try get the month number by name, with output parameter.
| T | Output type, default is Month enum. |
| month | Month token. |
| value | Output month number (1..12) converted to T. |
Definition at line 747 of file time_parser.hpp.
|
inline |
Try get the month number by name, string_view overload.
Definition at line 778 of file time_parser.hpp.
| bool time_shield::try_get_month_number | ( | string | month, |
| int & | value ) |
Get the month number by name, with output parameter.
| month | The name of the month as a string. |
| value | Reference to store the month number if found. |
Definition at line 70 of file time_parser.mqh.
|
inlinenoexcept |
Parse null-terminated strings using formatter-compatible custom pattern.
Definition at line 1071 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse input using formatter-compatible custom pattern.
ISO week-based tokens G, g, V, and u follow the same grammar as formatter output. Formats using ISO week-based year/week tokens do not mix with Gregorian Y / m / d date tokens.
Definition at line 1003 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse std::string using formatter-compatible custom pattern.
Definition at line 1061 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse std::string_view using formatter-compatible custom pattern.
Definition at line 1129 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse null-terminated strings using custom format and convert to UTC seconds.
Definition at line 1093 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse input using formatter-compatible custom pattern and convert to UTC seconds.
Definition at line 1015 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse std::string using formatter-compatible custom pattern and convert to UTC seconds.
Definition at line 1084 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse std::string_view using formatter-compatible custom pattern and convert to UTC seconds.
Definition at line 1139 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse null-terminated strings using custom format and convert to UTC milliseconds.
Definition at line 1115 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse input using formatter-compatible custom pattern and convert to UTC milliseconds.
Definition at line 1038 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse std::string using formatter-compatible custom pattern and convert to UTC milliseconds.
Definition at line 1106 of file time_format_parser.hpp.
|
inlinenoexcept |
Parse std::string_view using formatter-compatible custom pattern and convert to UTC milliseconds.
Definition at line 1148 of file time_format_parser.hpp.
|
inline |
Try parse month name token into month index [1..12].
| month | Month token (e.g. "Jan", "January"), case-insensitive. |
| value | Output month index [1..12]. |
Definition at line 600 of file time_parser.hpp.
|
inline |
Try parse month name token into month index [1..12], string_view overload.
| month | Month token view (e.g. "Jan", "January"), case-insensitive. |
| value | Output month index [1..12]. |
Definition at line 617 of file time_parser.hpp.
|
inline |
Try parse month name token into Month enum (or any T).
| T | Output type, default is Month enum. |
| month | Month token. |
| value | Output month number (1..12) converted to T. |
Definition at line 648 of file time_parser.hpp.
|
inline |
Try parse month name token into Month enum (or any T), string_view overload.
| T | Output type, default is Month enum. |
| month | Month token view. |
| value | Output month number (1..12) converted to T. |
Definition at line 672 of file time_parser.hpp.
|
inline |
Convert ISO8601 character buffer to timestamp (seconds).
Does not require null terminator. Returns 0 on failure (ambiguous if epoch is a valid value for your usage).
| data | Pointer to character buffer. |
| length | Number of characters in buffer. |
Definition at line 1436 of file time_parser.hpp.
|
inline |
Convert ISO8601 C-string to timestamp (seconds).
Returns 0 on failure (ambiguous if epoch is a valid value for your usage).
| str | C-style string with ISO8601 timestamp, may be nullptr. |
Definition at line 1424 of file time_parser.hpp.
|
inline |
Convert an ISO8601 string to a timestamp (ts_t).
This function parses a string in ISO8601 format and converts it to a timestamp. If parsing fails, it returns 0.
| str | The ISO8601 string. |
Definition at line 1497 of file time_parser.hpp.
| long time_shield::ts | ( | string | str | ) |
Convert an ISO8601 string to a timestamp (ts_t).
Returns 0 if parsing fails.
| str | The ISO8601 string. |
Definition at line 587 of file time_parser.mqh.
|
inline |
Convert ISO8601 character buffer to timestamp (milliseconds).
Does not require null terminator. Returns 0 on failure.
| data | Pointer to character buffer. |
| length | Number of characters in buffer. |
Definition at line 1459 of file time_parser.hpp.
|
inline |
Convert ISO8601 C-string to timestamp (milliseconds).
Returns 0 on failure (ambiguous if epoch is a valid value for your usage).
| str | C-style string with ISO8601 timestamp, may be nullptr. |
Definition at line 1448 of file time_parser.hpp.
|
inline |
Convert an ISO8601 string to a millisecond timestamp (ts_ms_t).
This function parses a string in ISO8601 format and converts it to a millisecond timestamp. If parsing fails, it returns 0.
| str | The ISO8601 string. |
Definition at line 1508 of file time_parser.hpp.
| long time_shield::ts_ms | ( | string | str | ) |
Convert an ISO8601 string to a millisecond timestamp (ts_ms_t).
Returns 0 if parsing fails.
| str | The ISO8601 string. |
Definition at line 597 of file time_parser.mqh.
|
inline |
Alias for is_workday(const std::string&).
Parse ISO8601 string and check if it falls on a workday (seconds precision).
Definition at line 1330 of file time_parser.hpp.
| bool time_shield::workday | ( | string | str | ) |
Alias for is_workday.
Parse ISO8601 string and check for workday using second precision.
| str | ISO8601 formatted string. |
Definition at line 392 of file time_parser.mqh.
|
inline |
Alias for is_workday_ms(const std::string&).
Parse ISO8601 string and check if it falls on a workday (milliseconds precision).
Definition at line 1336 of file time_parser.hpp.
| bool time_shield::workday_ms | ( | string | str | ) |
Alias for is_workday_ms.
Parse ISO8601 string and check for workday using millisecond precision.
| str | ISO8601 formatted string. |
Definition at line 406 of file time_parser.mqh.