Time Shield Library
C++ library for working with time
|
Header file with time-related validation functions. 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_HPP_INCLUDED |
Functions | |
template<class T = year_t> | |
constexpr const bool | time_shield::is_leap_year_date (const T &year) noexcept |
Checks if the given year is a leap year. | |
template<class T = year_t> | |
constexpr const bool | time_shield::check_leap_year (const T &year) noexcept |
Alias for is_leap_year_date function. | |
template<class T = year_t> | |
constexpr const bool | time_shield::leap_year (const T &year) noexcept |
Alias for is_leap_year_date function. | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_leap_year_ts (const ts_t &ts) |
Checks if the given year is a leap year. | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::leap_year_ts (const ts_t &ts) |
Alias for is_leap_year_ts function. | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::check_leap_year_ts (const ts_t &ts) |
Alias for is_leap_year_ts function. | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_leap_year (const ts_t &ts) |
Alias for is_leap_year_ts function. | |
template<class T = int> | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_time_zone (const T &hour, const T &min) noexcept |
Check if the time zone is valid. | |
template<class T = int> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_valid_tz (const T &hour, const T &min) |
Alias for is_valid_time_zone function. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_time_zone_offset (const T &time_zone) noexcept |
Check if the time zone is valid. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_time_zone (const T &time_zone) |
Alias for is_valid_time_zone_offset function. | |
template<class T = TimeZoneStruct> | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_tz (const T &time_zone) |
Alias for is_valid_time_zone_offset function. | |
template<class T1 = int, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_time (const T1 &hour, const T1 &min, const T1 &sec, const T2 &ms=0) noexcept |
Checks the correctness of the specified time. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_time (const T &time) noexcept |
Checks the correctness of the specified time. | |
template<class T1 = year_t, class T2 = int> | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_date (const T1 &year, const T2 &month, const T2 &day) noexcept |
Checks the correctness of the specified date. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_date (const T &date) noexcept |
Checks the correctness of the specified date. | |
template<class T1 = year_t, class T2 = int, class T3 = int> | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_date_time (const T1 &year, const T2 &month, const T2 &day, const T2 &hour=0, const T2 &min=0, const T2 &sec=0, const T3 &ms=0) noexcept |
Checks the correctness of a date and time. | |
template<class T > | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_valid_date_time (const T &date_time) noexcept |
Checks the correctness of a date and time. | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_day_off (const ts_t &ts) noexcept |
Check if a given timestamp corresponds to a weekend day (Saturday or Sunday). | |
TIME_SHIELD_CONSTEXPR const bool | time_shield::is_weekend (const ts_t &ts) noexcept |
Alias for is_day_off function. | |
template<class T = uday_t> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_day_off_unix_day (const T &unix_day) noexcept |
Check if a given day (since Unix epoch) corresponds to a weekend day (Saturday or Sunday). This function checks if the given day (number of days since Unix epoch) falls on a weekend day, which is either Saturday or Sunday. | |
template<class T = uday_t> | |
TIME_SHIELD_CONSTEXPR bool | time_shield::is_weekend_unix_day (const T &unix_day) noexcept |
Alias for is_day_off_unix_day function. | |
Header file with time-related validation functions.
This file contains functions for validating dates, times, and timestamps.
Definition in file validation.hpp.
#define _TIME_SHIELD_VALIDATION_HPP_INCLUDED |
Definition at line 7 of file validation.hpp.