#include <userver/utils/datetime/date.hpp>
Date in format YYYY-MM-DD, std::chrono::year_month_day like type.
Convertible to std::sys_days and could be constructed from year, month and day integers.
Public Types | |
using | Days = std::chrono::duration<long long, std::ratio<86400>> |
using | SysDays = std::chrono::time_point<std::chrono::system_clock, Days> |
Public Member Functions | |
Date (const Date &) noexcept=default | |
Date & | operator= (const Date &) noexcept=default |
Date (int year, int month, int day) | |
Constructs Date without validation of input arguments. | |
constexpr | Date (SysDays tp) noexcept |
constructor from system clock time point in days. | |
constexpr SysDays | GetSysDays () const |
Returns a time point corresponding to the date. | |
constexpr | operator SysDays () const |
Returns a time point corresponding to the date. | |
constexpr bool | operator== (Date other) const |
constexpr bool | operator!= (Date other) const |
using utils::datetime::Date::SysDays = std::chrono::time_point<std::chrono::system_clock, Days> |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlineexplicitconstexpr |