Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
time_parser.mqh File Reference

Header with functions for parsing ISO8601 strings and converting them to timestamps. More...

Go to the source code of this file.

Namespaces

namespace  time_shield
 Main namespace for the Time Shield library.
 

Functions

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::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::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).
 
int time_shield::sec_of_day (string str)
 Convert string with time of day to second of day.
 

Detailed Description

Header with functions for parsing ISO8601 strings and converting them to timestamps.

This file contains utilities to parse ISO8601 date and time strings, extract month numbers and convert parsed values into different timestamp representations.

Definition in file time_parser.mqh.