27 Time library [time]

27.9 Class template time_­of_­day [time.tod]

27.9.3 Minutes precision [time.tod.minutes]

namespace std::chrono {
  template<>
  class time_of_day<minutes> {
  public:
    using precision = chrono::minutes;

    time_of_day() = default;
    constexpr explicit time_of_day(chrono::minutes since_midnight) noexcept;

    constexpr chrono::hours    hours()   const noexcept;
    constexpr chrono::minutes  minutes() const noexcept;

    constexpr explicit operator precision()    const noexcept;
    constexpr          precision to_duration() const noexcept;

    constexpr void make24() noexcept;
    constexpr void make12() noexcept;
  };
}
[Note
:
This specialization handles hours and minutes since midnight.
end note
]
constexpr explicit time_of_day(minutes since_midnight) noexcept;
Effects: Constructs an object of type time_­of_­day in 24-hour format corresponding to since_­midnight minutes after 00:00:00.
Ensures: hours() returns the integral number of hours since_­midnight is after 00:00:00.
minutes() returns the integral number of minutes since_­midnight is after (00:00:00 + hours()).
constexpr chrono::hours hours() const noexcept;
Returns: The stored hour of *this.
constexpr chrono::minutes minutes() const noexcept;
Returns: The stored minute of *this.
constexpr explicit operator precision() const noexcept;
Returns: The number of minutes since midnight.
constexpr precision to_duration() const noexcept;
Returns: precision{*this}.
constexpr void make24() noexcept;
Effects: If *this is a 12-hour time, converts to a 24-hour time.
Otherwise, no effects.
constexpr void make12() noexcept;
Effects: If *this is a 24-hour time, converts to a 12-hour time.
Otherwise, no effects.