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

Header with validation functions for dates, times, and 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_VALIDATION_MQH__
 

Functions

bool time_shield::is_leap_year_date (const long year)
 Checks if the given year is a leap year.
 
bool time_shield::check_leap_year (const long year)
 Alias for is_leap_year_date.
 
bool time_shield::leap_year (const long year)
 Alias for is_leap_year_date.
 
bool time_shield::is_leap_year_ts (const long ts)
 Checks if the year of the given timestamp is a leap year.
 
bool time_shield::leap_year_ts (const long ts)
 Alias for is_leap_year_ts.
 
bool time_shield::check_leap_year_ts (const long ts)
 Alias for is_leap_year_ts.
 
bool time_shield::is_leap_year (const long ts)
 Alias for is_leap_year_ts.
 
bool time_shield::is_valid_time_zone (const int hour, const int min)
 Check if the time zone components are valid.
 
bool time_shield::is_valid_tz (const int hour, const int min)
 Alias for is_valid_time_zone.
 
bool time_shield::is_valid_time_zone_offset (const TimeZoneStruct &time_zone)
 Check if the time zone structure is valid.
 
bool time_shield::is_valid_time_zone (const TimeZoneStruct &time_zone)
 Alias for is_valid_time_zone_offset.
 
bool time_shield::is_valid_tz (const TimeZoneStruct &time_zone)
 Alias for is_valid_time_zone_offset.
 
bool time_shield::is_valid_time (const int hour, const int min, const int sec, const int ms=0)
 Checks the correctness of the specified time.
 
bool time_shield::is_valid_time (const TimeStruct &time)
 Checks the correctness of the specified time structure.
 
bool time_shield::is_valid_date (const long year, const int month, const int day)
 Checks the correctness of the specified date.
 
bool time_shield::is_valid_date (const DateStruct &date)
 Checks the correctness of the specified date structure.
 
bool time_shield::is_valid_date_time (const long year, const int month, const int day, const int hour=0, const int min=0, const int sec=0, const int ms=0)
 Checks the correctness of date and time components.
 
bool time_shield::is_valid_date_time (const DateTimeStruct &date_time)
 Checks the correctness of the date-time structure.
 
bool time_shield::is_day_off (const long ts)
 Check if a timestamp corresponds to a weekend day.
 
bool time_shield::is_weekend (const long ts)
 Alias for is_day_off.
 
bool time_shield::is_day_off_unix_day (const long unix_day)
 Check if a Unix day corresponds to a weekend day.
 
bool time_shield::is_weekend_unix_day (const long unix_day)
 Alias for is_day_off_unix_day.
 

Detailed Description

Header with validation functions for dates, times, and timestamps.

This file contains helper functions for validating dates, times, time zones and timestamps in MQL5.

Definition in file validation.mqh.

Macro Definition Documentation

◆ __TIME_SHIELD_VALIDATION_MQH__

#define __TIME_SHIELD_VALIDATION_MQH__

Definition at line 8 of file validation.mqh.