|
Time Shield Library
C++ library for working with time
|
Conversions related to UNIX-based time units and epochs. More...
Go to the source code of this file.
Namespaces | |
| namespace | time_shield |
| Main namespace for the Time Shield library. | |
Functions | |
| template<class T = year_t> | |
| constexpr T | time_shield::years_since_epoch (ts_t ts) noexcept |
| Converts a UNIX timestamp to a year. | |
| template<class Year, class Month, class Day> | |
| TIME_SHIELD_CONSTEXPR uday_t | time_shield::date_to_unix_day (Year year, Month month, Day day) noexcept |
| Convert a calendar date to UNIX day count. | |
| template<class T = uday_t> | |
| constexpr T | time_shield::days_since_epoch (ts_t ts=time_shield::ts()) noexcept |
| Get UNIX day. | |
| template<class T = uday_t> | |
| constexpr T | time_shield::days_since_epoch_ms (ts_ms_t t_ms=time_shield::ts_ms()) noexcept |
| Get UNIX day from milliseconds timestamp. | |
| template<class T = int> | |
| constexpr T | time_shield::days_between (ts_t start, ts_t stop) noexcept |
| Get the number of days between two timestamps. | |
| template<class T = ts_t> | |
| constexpr T | time_shield::unix_day_to_ts (uday_t unix_day) noexcept |
| Converts a UNIX day to a timestamp in seconds. | |
| template<class T = ts_t> | |
| constexpr T | time_shield::unix_day_to_ts_ms (uday_t unix_day) noexcept |
| Converts a UNIX day to a timestamp in milliseconds. | |
| template<class T = ts_t> | |
| constexpr T | time_shield::end_of_day_from_unix_day (uday_t unix_day) noexcept |
| Converts a UNIX day to a timestamp representing the end of the day in seconds. | |
| template<class T = ts_ms_t> | |
| constexpr T | time_shield::end_of_day_from_unix_day_ms (uday_t unix_day) noexcept |
| Converts a UNIX day to a timestamp representing the end of the day in milliseconds. | |
| template<class T = ts_ms_t> | |
| constexpr T | time_shield::start_of_next_day_from_unix_day (uday_t unix_day) noexcept |
| Converts a UNIX day to a timestamp representing the start of the next day in seconds. | |
| template<class T = ts_ms_t> | |
| constexpr T | time_shield::start_of_next_day_from_unix_day_ms (uday_t unix_day) noexcept |
| Converts a UNIX day to a timestamp representing the start of the next day in milliseconds. | |
| template<class T = int64_t> | |
| constexpr T | time_shield::min_since_epoch (ts_t ts=time_shield::ts()) |
| Get UNIX minute. | |
| template<class T = int> | |
| constexpr T | time_shield::sec_of_day (ts_t ts=time_shield::ts()) noexcept |
| Get the second of the day. | |
| template<class T = int> | |
| constexpr T | time_shield::sec_of_day_ms (ts_ms_t ts_ms) noexcept |
| Get the second of the day from milliseconds timestamp. | |
| template<class T1 = int, class T2 = int> | |
| constexpr T1 | time_shield::sec_of_day (T2 hour, T2 min, T2 sec) noexcept |
| Get the second of the day. | |
| template<class T = int> | |
| constexpr T | time_shield::sec_of_min (ts_t ts=time_shield::ts()) |
| Get the second of the minute. | |
| template<class T = int> | |
| constexpr T | time_shield::sec_of_hour (ts_t ts=time_shield::ts()) |
| Get the second of the hour. | |
Conversions related to UNIX-based time units and epochs.
Definition in file unix_time_conversions.hpp.