Type to represent google.type.TimeOfDay in proto structs.
This type is organized in the same way as its protobuf counterpart and allows for the same range of values described here https://github.com/googleapis/googleapis/blob/master/google/type/timeofday.proto : from 00:00:00.0 to 24:00:00.0 inclusive, with leap seconds support (represented as value 60 for seconds).
Definition at line 42 of file time_of_day.hpp.
|
|
constexpr | TimeOfDay ()=default |
| | Creates 00:00:00.0 time of the day.
|
| |
| constexpr | TimeOfDay (const std::chrono::hours &hours, const std::chrono::minutes &minutes, const std::chrono::seconds &seconds, const std::chrono::nanoseconds &nanos=std::chrono::nanoseconds{0}) |
| | Creates time of the day from components.
|
| |
| template<typename TRep , typename TPeriod > |
| constexpr | TimeOfDay (const std::chrono::hh_mm_ss< std::chrono::duration< TRep, TPeriod > > &hms) |
| | Creates time of the day.
|
| |
| template<typename TRep , typename TPeriod > |
| constexpr | TimeOfDay (const utils::datetime::TimeOfDay< std::chrono::duration< TRep, TPeriod > > &time_of_day) noexcept |
| | Creates time of the day.
|
| |
| template<typename TRep , typename TPeriod > |
| constexpr | TimeOfDay (std::chrono::duration< TRep, TPeriod > duration) |
| | Creates time of the day from the duration.
|
| |
| constexpr | TimeOfDay (const std::chrono::system_clock::time_point &time_point) noexcept |
| | Creates time of the day evaluating it since the midnight before time_point.
|
| |
|
| TimeOfDay (utils::impl::InternalTag, std::int32_t hours, std::int32_t minutes, std::int32_t seconds, std::int32_t nanos) |
| |
| constexpr const std::chrono::hours & | Hours () const noexcept |
| | Returns hours (from 0 to 24).
|
| |
| constexpr const std::chrono::minutes & | Minutes () const noexcept |
| | Returns minutes (from 0 to 59).
|
| |
| constexpr const std::chrono::seconds & | Seconds () const noexcept |
| | Returns seconds (from 0 to 59 in most cases, however 60 is also valid to support APIs with leap-seconds support).
|
| |
| constexpr const std::chrono::nanoseconds & | Nanos () const noexcept |
| | Returns nanoseconds (from 0 to 999'999'999).
|
| |
| template<typename TDuration = std::chrono::nanoseconds> |
| requires ::meta::kIsInstantiationOf< std::chrono::duration, TDuration > constexpr std::chrono::hh_mm_ss< TDuration > | ToChronoTimeOfDay () const noexcept |
| | Converts time of the day to std::chrono::hh_mm_ss.
|
| |
| template<typename TDuration = std::chrono::nanoseconds> |
| requires ::meta::kIsInstantiationOf< std::chrono::duration, TDuration > constexpr TDuration | ToChronoDuration () const noexcept |
| | Converts time of the day to std::chrono::duration.
|
| |
| template<typename TDuration = std::chrono::nanoseconds> |
| requires ::meta::kIsInstantiationOf< std::chrono::duration, TDuration > constexpr utils::datetime::TimeOfDay< TDuration > | ToUserverTimeOfDay () const noexcept |
| | Converts time of the day to userver::utils::datetime::TimeOfDay.
|
| |
| constexpr Duration | ToUserverDuration () const noexcept |
| | Converts time of the day to userver::proto_structs::Duration.
|
| |
| template<typename TTimeOfDay > |
| requires ::meta::kIsInstantiationOf< std::chrono::hh_mm_ss, TTimeOfDay > constexpr | operator TTimeOfDay () const noexcept |
| | Explicit conversion to std::chrono::hh_mm_ss.
|
| |
| template<typename TDuration = std::chrono::nanoseconds> |
| requires ::meta::kIsInstantiationOf< std::chrono::duration, TDuration > constexpr | operator TDuration () const noexcept |
| | Explicit conversion to std::chrono::duration.
|
| |
| template<typename TTimeOfDay > |
| requires ::meta::kIsInstantiationOf< utils::datetime::TimeOfDay, TTimeOfDay > constexpr | operator TTimeOfDay () const noexcept |
| | Explicit conversion to userver::utils::datetime::TimeOfDay.
|
| |
| constexpr | operator Duration () const noexcept |
| | Explicit conversion to userver::proto_structs::Duration.
|
| |
|
auto | operator<=> (const TimeOfDay &) const =default |
| | Default three-way comparison operator.
|
| |