6#ifndef _TIME_SHIELD_ENUMS_HPP_INCLUDED
7#define _TIME_SHIELD_ENUMS_HPP_INCLUDED
38 static const char*
const uppercase_names[] = {
39 "SUN",
"MON",
"TUE",
"WED",
"THU",
"FRI",
"SAT"
41 static const char*
const short_names[] = {
42 "Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
44 static const char*
const full_names[] = {
45 "Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
50 return uppercase_names[
static_cast<size_t>(value)];
52 return short_names[
static_cast<size_t>(value)];
54 return full_names[
static_cast<size_t>(value)];
64 static const std::array<std::string, 7> uppercase_names = {
65 "SUN",
"MON",
"TUE",
"WED",
"THU",
"FRI",
"SAT"
67 static const std::array<std::string, 7> short_names = {
68 "Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
70 static const std::array<std::string, 7> full_names = {
71 "Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
76 return uppercase_names[
static_cast<size_t>(value)];
78 return short_names[
static_cast<size_t>(value)];
80 return full_names[
static_cast<size_t>(value)];
106 static const char*
const uppercase_names[] = {
108 "JAN",
"FEB",
"MAR",
"APR",
"MAY",
"JUN",
109 "JUL",
"AUG",
"SEP",
"OCT",
"NOV",
"DEC"
111 static const char*
const short_names[] = {
113 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
114 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
116 static const char*
const full_names[] = {
118 "January",
"February",
"March",
"April",
"May",
"June",
119 "July",
"August",
"September",
"October",
"November",
"December"
124 return uppercase_names[
static_cast<size_t>(value)];
126 return short_names[
static_cast<size_t>(value)];
128 return full_names[
static_cast<size_t>(value)];
138 static const std::array<std::string, 13> uppercase_names = {
140 "JAN",
"FEB",
"MAR",
"APR",
"MAY",
"JUN",
141 "JUL",
"AUG",
"SEP",
"OCT",
"NOV",
"DEC"
143 static const std::array<std::string, 13> short_names = {
145 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
146 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
148 static const std::array<std::string, 13> full_names = {
150 "January",
"February",
"March",
"April",
"May",
"June",
151 "July",
"August",
"September",
"October",
"November",
"December"
156 return uppercase_names[
static_cast<size_t>(value)];
158 return short_names[
static_cast<size_t>(value)];
160 return full_names[
static_cast<size_t>(value)];
183 static const char*
const uppercase_names[] = {
184 "GMT",
"UTC",
"EET",
"CET",
"WET",
"EEST",
"CEST",
"WEST",
"UNKNOWN"
186 static const char*
const short_names[] = {
187 "GMT",
"UTC",
"EET",
"CET",
"WET",
"EEST",
"CEST",
"WEST",
"Unknown"
189 static const char*
const full_names[] = {
190 "Greenwich Mean Time",
"Coordinated Universal Time",
"Eastern European Time",
191 "Central European Time",
"Western European Time",
"Eastern European Summer Time",
192 "Central European Summer Time",
"Western European Summer Time",
"Unknown Time Zone"
197 return uppercase_names[
static_cast<size_t>(value)];
199 return short_names[
static_cast<size_t>(value)];
201 return full_names[
static_cast<size_t>(value)];
211 static const std::array<std::string, 9> uppercase_names = {
212 "GMT",
"UTC",
"EET",
"CET",
"WET",
"EEST",
"CEST",
"WEST",
"UNKNOWN"
214 static const std::array<std::string, 9> short_names = {
215 "gmt",
"utc",
"eet",
"cet",
"wet",
"eest",
"cest",
"west",
"unknown"
217 static const std::array<std::string, 9> full_names = {
218 "Greenwich Mean Time",
"Coordinated Universal Time",
"Eastern European Time",
219 "Central European Time",
"Western European Time",
"Eastern European Summer Time",
220 "Central European Summer Time",
"Western European Summer Time",
"Unknown Time Zone"
225 return uppercase_names[
static_cast<size_t>(value)];
227 return short_names[
static_cast<size_t>(value)];
229 return full_names[
static_cast<size_t>(value)];
Main namespace for the Time Shield library.
const std::string & to_str(const Weekday &value, const FormatType &format=UPPERCASE_NAME)
Converts a Weekday enum value to a string.
MoonPhase
Enumeration of the moon phases.
@ LAST_QUARTER
Last Quarter Moon.
@ WAXING_CRESCENT
Waxing Crescent Moon.
@ FIRST_QUARTER
First Quarter Moon.
@ WANING_CRESCENT
Waning Crescent Moon.
@ WANING_GIBBOUS
Waning Gibbous Moon.
@ WAXING_GIBBOUS
Waxing Gibbous Moon.
const char * to_cstr(const Weekday &value, const FormatType &format=UPPERCASE_NAME)
Converts a Weekday enum value to a string.
TimeFormatType
Enumeration of time format types.
@ AMERICAN_MONTH_DAY
American date format (e.g., "06/06/2024")
@ EUROPEAN_TIME
European time format (e.g., "12:30")
@ MQL5_FULL
MQL5 time format (e.g., "2024.06.06 12:30:45")
@ ISO8601_NO_TZ
ISO8601 format without time zone (e.g., "2024-06-06T12:30:45")
@ MQL5_TIME_ONLY
MQL5 time format (e.g., "12:30:45")
@ MQL5_DATE_ONLY
MQL5 date format (e.g., "2024.06.06")
@ AMERICAN_TIME
American time format (e.g., "12:30 PM")
@ EUROPEAN_MONTH_DAY
European date format (e.g., "06.06.2024")
@ ISO8601_WITH_TZ
ISO8601 format with time zone (e.g., "2024-06-06T12:30:45+03:00")
FormatType
Enumeration of the format options for representing a weekday or month.
@ UPPERCASE_NAME
Uppercase short name.
Month
Enumeration of the months of the year.
TimeZone
Enumeration of the time zones.
@ UTC
Coordinated Universal Time.
@ GMT
Greenwich Mean Time.
@ CET
Central European Time.
@ EET
Eastern European Time.
@ CEST
Central European Summer Time.
@ WEST
Western European Summer Time.
@ WET
Western European Time.
@ UNKNOWN
Unknown Time Zone.
@ EEST
Eastern European Summer Time.
Weekday
Enumeration of the days of the week.