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.
 

Macros

#define __TIME_SHIELD_TIME_PARSER_MQH__
 

Functions

int time_shield::get_month_number (const string &month)
 Get the month number by name.
 
int time_shield::month_of_year (const string &month)
 Alias for get_month_number function.
 
bool time_shield::try_get_month_number (const string &month, int &value)
 Get the month number by name, with output parameter.
 
bool time_shield::get_month_number (const string &month, int &value)
 Alias for try_get_month_number function.
 
bool time_shield::month_of_year (const string &month, int &value)
 Alias for try_get_month_number function.
 
bool time_shield::parse_time_zone (const string &tz_str, TimeZoneStruct &tz)
 Parse a time zone string into a TimeZoneStruct.
 
bool time_shield::parse_tz (const string &tz_str, TimeZoneStruct &tz)
 Alias for parse_time_zone function.
 
bool time_shield::parse_iso8601 (const string &input, DateTimeStruct &dt, TimeZoneStruct &tz)
 Parse a date and time string in ISO8601 format.
 
bool time_shield::str_to_ts (const string &str, long &ts)
 Convert an ISO8601 string to a timestamp (ts_t).
 
bool time_shield::str_to_ts_ms (const string &str, long &ts)
 Convert an ISO8601 string to a millisecond timestamp (ts_ms_t).
 
bool time_shield::str_to_fts (const string &str, double &ts)
 Convert an ISO8601 string to a floating-point timestamp (fts_t).
 
long time_shield::ts (const string &str)
 Convert an ISO8601 string to a timestamp (ts_t).
 
long time_shield::ts_ms (const string &str)
 Convert an ISO8601 string to a millisecond timestamp (ts_ms_t).
 
double time_shield::fts (const string &str)
 Convert an ISO8601 string to a floating-point timestamp (fts_t).
 

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.

Macro Definition Documentation

◆ __TIME_SHIELD_TIME_PARSER_MQH__

#define __TIME_SHIELD_TIME_PARSER_MQH__

Definition at line 8 of file time_parser.mqh.