Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
Time Enumerations

Enumerations for time-related concepts. More...

enum  time_shield::FormatType {
  time_shield::UPPERCASE_NAME = 0 , time_shield::SHORT_NAME , time_shield::FULL_NAME , time_shield::UPPERCASE_NAME = 0 ,
  time_shield::SHORT_NAME , time_shield::FULL_NAME
}
 Enumeration of the format options for representing a weekday or month. More...
 
enum  time_shield::Weekday {
  time_shield::SUN = 0 , time_shield::MON , time_shield::TUE , time_shield::WED ,
  time_shield::THU , time_shield::FRI , time_shield::SAT , time_shield::SUN = 0 ,
  time_shield::MON , time_shield::TUE , time_shield::WED , time_shield::THU ,
  time_shield::FRI , time_shield::SAT
}
 Enumeration of the days of the week. More...
 
enum  time_shield::Month {
  time_shield::JAN = 1 , time_shield::FEB , time_shield::MAR , time_shield::APR ,
  time_shield::MAY , time_shield::JUN , time_shield::JUL , time_shield::AUG ,
  time_shield::SEP , time_shield::OCT , time_shield::NOV , time_shield::DEC ,
  time_shield::JAN = 1 , time_shield::FEB , time_shield::MAR , time_shield::APR ,
  time_shield::MAY , time_shield::JUN , time_shield::JUL , time_shield::AUG ,
  time_shield::SEP , time_shield::OCT , time_shield::NOV , time_shield::DEC
}
 Enumeration of the months of the year. More...
 
enum  time_shield::TimeZone {
  time_shield::GMT , time_shield::UTC , time_shield::EET , time_shield::CET ,
  time_shield::WET , time_shield::EEST , time_shield::CEST , time_shield::WEST ,
  time_shield::UNKNOWN , time_shield::GMT , time_shield::UTC , time_shield::EET ,
  time_shield::CET , time_shield::WET , time_shield::EEST , time_shield::CEST ,
  time_shield::WEST , time_shield::UNKNOWN
}
 Enumeration of the time zones. More...
 
enum  time_shield::MoonPhase {
  time_shield::WAXING_CRESCENT , time_shield::FIRST_QUARTER , time_shield::WAXING_GIBBOUS , time_shield::FULL_MOON ,
  time_shield::WANING_GIBBOUS , time_shield::LAST_QUARTER , time_shield::WANING_CRESCENT , time_shield::NEW_MOON ,
  time_shield::WAXING_CRESCENT , time_shield::FIRST_QUARTER , time_shield::WAXING_GIBBOUS , time_shield::FULL_MOON ,
  time_shield::WANING_GIBBOUS , time_shield::LAST_QUARTER , time_shield::WANING_CRESCENT , time_shield::NEW_MOON
}
 Enumeration of the moon phases. More...
 
enum  time_shield::TimeFormatType {
  time_shield::ISO8601_WITH_TZ , time_shield::ISO8601_NO_TZ , time_shield::MQL5_FULL , time_shield::MQL5_DATE_ONLY ,
  time_shield::MQL5_TIME_ONLY , time_shield::AMERICAN_MONTH_DAY , time_shield::EUROPEAN_MONTH_DAY , time_shield::AMERICAN_TIME ,
  time_shield::EUROPEAN_TIME , time_shield::ISO8601_WITH_TZ , time_shield::ISO8601_NO_TZ , time_shield::MQL5_FULL ,
  time_shield::MQL5_DATE_ONLY , time_shield::MQL5_TIME_ONLY , time_shield::AMERICAN_MONTH_DAY , time_shield::EUROPEAN_MONTH_DAY ,
  time_shield::AMERICAN_TIME , time_shield::EUROPEAN_TIME
}
 Enumeration of time format types. More...
 
string time_shield::to_weekday_str (Weekday value, FormatType format=UPPERCASE_NAME)
 Converts a Weekday enum value to a string.
 
string time_shield::to_month_str (Month value, FormatType format=UPPERCASE_NAME)
 Converts a Month enum value to a string.
 
string time_shield::to_timezone_str (TimeZone value, FormatType format=UPPERCASE_NAME)
 Converts a TimeZone enum value to a string.
 

Detailed Description

Enumerations for time-related concepts.

This group contains various enums that represent time-related concepts such as weekdays, months, time zones, and formatting options.

Key Features:

Example Usage:

Print(time_shield::to_str(weekday, time_shield::FULL_NAME)); // "Monday"
@ FULL_NAME
Full name.
Definition enums.hpp:21
const std::string & to_str(Weekday value, FormatType format=UPPERCASE_NAME)
Converts a Weekday enum value to a string.
Definition enums.hpp:69
@ MON
Monday.
Definition enums.hpp:28

Enumeration Type Documentation

◆ FormatType

Enumeration of the format options for representing a weekday or month.

Enumerator
UPPERCASE_NAME 

Uppercase short name.

SHORT_NAME 

Short name.

FULL_NAME 

Full name.

UPPERCASE_NAME 

Uppercase short name.

SHORT_NAME 

Short name.

FULL_NAME 

Full name.

Definition at line 26 of file enums.mqh.

◆ Month

Enumeration of the months of the year.

Enumerator
JAN 

January.

FEB 

February.

MAR 

March.

APR 

April.

MAY 

May.

JUN 

June.

JUL 

July.

AUG 

August.

SEP 

September.

OCT 

October.

NOV 

November.

DEC 

December.

JAN 

January.

FEB 

February.

MAR 

March.

APR 

April.

MAY 

May.

JUN 

June.

JUL 

July.

AUG 

August.

SEP 

September.

OCT 

October.

NOV 

November.

DEC 

December.

Definition at line 71 of file enums.mqh.

◆ MoonPhase

Enumeration of the moon phases.

Enumerator
WAXING_CRESCENT 

Waxing Crescent Moon.

FIRST_QUARTER 

First Quarter Moon.

WAXING_GIBBOUS 

Waxing Gibbous Moon.

FULL_MOON 

Full Moon.

WANING_GIBBOUS 

Waning Gibbous Moon.

LAST_QUARTER 

Last Quarter Moon.

WANING_CRESCENT 

Waning Crescent Moon.

NEW_MOON 

New Moon.

WAXING_CRESCENT 

Waxing Crescent Moon.

FIRST_QUARTER 

First Quarter Moon.

WAXING_GIBBOUS 

Waxing Gibbous Moon.

FULL_MOON 

Full Moon.

WANING_GIBBOUS 

Waning Gibbous Moon.

LAST_QUARTER 

Last Quarter Moon.

WANING_CRESCENT 

Waning Crescent Moon.

NEW_MOON 

New Moon.

Definition at line 162 of file enums.mqh.

◆ TimeFormatType

Enumeration of time format types.

Enumerator
ISO8601_WITH_TZ 

ISO8601 format with time zone (e.g., "2024-06-06T12:30:45+03:00")

ISO8601_NO_TZ 

ISO8601 format without time zone (e.g., "2024-06-06T12:30:45")

MQL5_FULL 

MQL5 time format (e.g., "2024.06.06 12:30:45")

MQL5_DATE_ONLY 

MQL5 date format (e.g., "2024.06.06")

MQL5_TIME_ONLY 

MQL5 time format (e.g., "12:30:45")

AMERICAN_MONTH_DAY 

American date format (e.g., "06/06/2024")

EUROPEAN_MONTH_DAY 

European date format (e.g., "06.06.2024")

AMERICAN_TIME 

American time format (e.g., "12:30 PM")

EUROPEAN_TIME 

European time format (e.g., "12:30")

ISO8601_WITH_TZ 

ISO8601 format with time zone (e.g., "2024-06-06T12:30:45+03:00")

ISO8601_NO_TZ 

ISO8601 format without time zone (e.g., "2024-06-06T12:30:45")

MQL5_FULL 

MQL5 time format (e.g., "2024.06.06 12:30:45")

MQL5_DATE_ONLY 

MQL5 date format (e.g., "2024.06.06")

MQL5_TIME_ONLY 

MQL5 time format (e.g., "12:30:45")

AMERICAN_MONTH_DAY 

American date format (e.g., "06/06/2024")

EUROPEAN_MONTH_DAY 

European date format (e.g., "06.06.2024")

AMERICAN_TIME 

American time format (e.g., "12:30 PM")

EUROPEAN_TIME 

European time format (e.g., "12:30")

Definition at line 174 of file enums.mqh.

◆ TimeZone

Enumeration of the time zones.

Enumerator
GMT 

Greenwich Mean Time.

UTC 

Coordinated Universal Time.

EET 

Eastern European Time.

CET 

Central European Time.

WET 

Western European Time.

EEST 

Eastern European Summer Time.

CEST 

Central European Summer Time.

WEST 

Western European Summer Time.

UNKNOWN 

Unknown Time Zone.

GMT 

Greenwich Mean Time.

UTC 

Coordinated Universal Time.

EET 

Eastern European Time.

CET 

Central European Time.

WET 

Western European Time.

EEST 

Eastern European Summer Time.

CEST 

Central European Summer Time.

WEST 

Western European Summer Time.

UNKNOWN 

Unknown Time Zone.

Definition at line 120 of file enums.mqh.

◆ Weekday

Enumeration of the days of the week.

Enumerator
SUN 

Sunday.

MON 

Monday.

TUE 

Tuesday.

WED 

Wednesday.

THU 

Thursday.

FRI 

Friday.

SAT 

Saturday.

SUN 

Sunday.

MON 

Monday.

TUE 

Tuesday.

WED 

Wednesday.

THU 

Thursday.

FRI 

Friday.

SAT 

Saturday.

Definition at line 33 of file enums.mqh.

Function Documentation

◆ to_month_str()

string time_shield::to_month_str ( Month value,
FormatType format = UPPERCASE_NAME )

Converts a Month enum value to a string.

Parameters
valueThe Month enum value to convert.
formatThe format to use for the string representation (default is UPPERCASE_NAME).
Returns
A string with the representation of the month.

Definition at line 91 of file enums.mqh.

◆ to_timezone_str()

string time_shield::to_timezone_str ( TimeZone value,
FormatType format = UPPERCASE_NAME )

Converts a TimeZone enum value to a string.

Parameters
valueThe TimeZone enum value to convert.
formatThe format to use for the string representation (default is UPPERCASE_NAME).
Returns
A string with the representation of the time zone.

Definition at line 137 of file enums.mqh.

◆ to_weekday_str()

string time_shield::to_weekday_str ( Weekday value,
FormatType format = UPPERCASE_NAME )

Converts a Weekday enum value to a string.

Parameters
valueThe Weekday enum value to convert.
formatThe format to use for the string representation (default is UPPERCASE_NAME).
Returns
A string with the representation of the day.

Definition at line 48 of file enums.mqh.