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

Header file with time-related constants. More...

#include <cstdint>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  time_shield
 Main namespace for the Time Shield library.
 

Macros

#define _TIME_SHIELD_CONSTANTS_HPP_INCLUDED
 

Variables

constexpr int64_t time_shield::NS_PER_US = 1000
 Nanoseconds per microsecond.
 
constexpr int64_t time_shield::NS_PER_MS = 1000000
 Nanoseconds per millisecond.
 
constexpr int64_t time_shield::NS_PER_SEC = 1000000000
 Nanoseconds per second.
 
constexpr int64_t time_shield::US_PER_SEC = 1000000
 Microseconds per second.
 
constexpr int64_t time_shield::MS_PER_SEC = 1000
 Milliseconds per second.
 
constexpr int64_t time_shield::MS_PER_MIN = 60000
 Milliseconds per minute.
 
constexpr int64_t time_shield::MS_PER_HALF_HOUR = 1800000
 Milliseconds per half hour.
 
constexpr int64_t time_shield::MS_PER_HOUR = 3600000
 Milliseconds per hour.
 
constexpr int64_t time_shield::MS_PER_DAY = 86400000
 Milliseconds per day.
 
constexpr int64_t time_shield::SEC_PER_MIN = 60
 Seconds per minute.
 
constexpr int64_t time_shield::SEC_PER_HALF_HOUR = 1800
 Seconds per half hour.
 
constexpr int64_t time_shield::SEC_PER_HOUR = 3600
 Seconds per hour.
 
constexpr int64_t time_shield::SEC_PER_DAY = 86400
 Seconds per day.
 
constexpr int64_t time_shield::SEC_PER_YEAR = 31536000
 Seconds per year (365 days)
 
constexpr int64_t time_shield::AVG_SEC_PER_YEAR = 31557600
 Average seconds per year (365.25 days)
 
constexpr int64_t time_shield::SEC_PER_LEAP_YEAR = 31622400
 Seconds per leap year (366 days)
 
constexpr int64_t time_shield::SEC_PER_4_YEARS = 126230400
 Seconds per 4 years.
 
constexpr int64_t time_shield::SEC_PER_FIRST_100_YEARS = 3155760000
 Seconds per first 100 years.
 
constexpr int64_t time_shield::SEC_PER_100_YEARS = 3155673600
 Seconds per 100 years.
 
constexpr int64_t time_shield::SEC_PER_400_YEARS = 12622780800
 Seconds per 400 years.
 
constexpr int64_t time_shield::MAX_SEC_PER_DAY = 86399
 Maximum seconds per day.
 
constexpr int64_t time_shield::MIN_PER_HOUR = 60
 Minutes per hour.
 
constexpr int64_t time_shield::MIN_PER_DAY = 1440
 Minutes per day.
 
constexpr int64_t time_shield::MIN_PER_WEEK = 10080
 Minutes per week.
 
constexpr int64_t time_shield::MIN_PER_MONTH = 40320
 Minutes per month (28 days)
 
constexpr int64_t time_shield::MAX_MOON_MIN = 42523
 Maximum lunar minutes.
 
constexpr int64_t time_shield::HOURS_PER_DAY = 24
 Hours per day.
 
constexpr int64_t time_shield::DAYS_PER_WEEK = 7
 Days per week.
 
constexpr int64_t time_shield::DAYS_PER_LEAP_YEAR = 366
 Days per leap year.
 
constexpr int64_t time_shield::DAYS_PER_YEAR = 365
 Days per year.
 
constexpr int64_t time_shield::DAYS_PER_4_YEARS = 1461
 Days per 4 years.
 
const int64_t time_shield::MONTHS_PER_YEAR = 12
 Months per year.
 
const int64_t time_shield::MAX_DAYS_PER_MONTH = 31
 Maximum days per month.
 
const int64_t time_shield::LEAP_YEAR_PER_100_YEAR = 24
 Leap years per 100 years.
 
const int64_t time_shield::LEAP_YEAR_PER_400_YEAR = 97
 Leap years per 400 years.
 
constexpr int64_t time_shield::UNIX_EPOCH = 1970
 Start year of UNIX time.
 
constexpr int64_t time_shield::OLE_EPOCH = 25569
 OLE automation date since UNIX epoch.
 
constexpr int64_t time_shield::MAX_YEAR = 292277022000LL
 Maximum representable year.
 
constexpr int64_t time_shield::MIN_YEAR = -2967369602200LL
 Minimum representable year.
 
constexpr int64_t time_shield::ERROR_YEAR = 9223372036854770000LL
 Error year value.
 
constexpr int64_t time_shield::MAX_TIMESTAMP = 9223371890843040000LL
 Maximum timestamp value.
 
constexpr int64_t time_shield::ERROR_TIMESTAMP = 9223372036854770000LL
 Error timestamp value.
 
constexpr double time_shield::MAX_OADATE = std::numeric_limits<double>::max()
 Maximum OLE automation date.
 
constexpr double time_shield::AVG_DAYS_PER_YEAR = 365.25
 Average days per year.
 

Detailed Description

Header file with time-related constants.

This file contains various constants used for time calculations and conversions.

Definition in file constants.hpp.

Macro Definition Documentation

◆ _TIME_SHIELD_CONSTANTS_HPP_INCLUDED

#define _TIME_SHIELD_CONSTANTS_HPP_INCLUDED

Definition at line 7 of file constants.hpp.