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

Conversions related to calendar dates and DateStruct helpers. 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>
TIME_SHIELD_CONSTEXPR T time_shield::year_of (ts_t ts=time_shield::ts())
 Get the year from the timestamp.
 
template<class T = year_t>
TIME_SHIELD_CONSTEXPR T time_shield::year_of_ms (ts_ms_t ts_ms=time_shield::ts_ms())
 Get the year from the timestamp in milliseconds.
 
template<class T1 = int, class T2 = year_t>
TIME_SHIELD_CONSTEXPR T1 time_shield::num_days_in_year (T2 year) noexcept
 Get the number of days in a year.
 
template<class T = int>
TIME_SHIELD_CONSTEXPR T time_shield::num_days_in_year_ts (ts_t ts=time_shield::ts())
 Get the number of days in the current year.
 
template<class T1 = Weekday, class T2 = year_t, class T3 = int, class T4 = int>
TIME_SHIELD_CONSTEXPR T1 time_shield::day_of_week_date (T2 year, T3 month, T4 day)
 Get the day of the week.
 
template<class T1 = Weekday, class T2>
TIME_SHIELD_CONSTEXPR T1 time_shield::weekday_of_date (const T2 &date)
 Get the day of the week from a date structure.
 
template<class T1 = Weekday, class T2>
TIME_SHIELD_CONSTEXPR T1 time_shield::weekday_from_date (const T2 &date)
 Alias for weekday_of_date.
 

Detailed Description

Conversions related to calendar dates and DateStruct helpers.

Definition in file date_conversions.hpp.