29 Time library [time]

29.10 12/24 hours functions [time.12]

These functions aid in translating between a 12h format time of day and a 24h format time of day.
constexpr bool is_am(const hours& h) noexcept;
Returns: 0h <= h && h <= 11h.
constexpr bool is_pm(const hours& h) noexcept;
Returns: 12h <= h && h <= 23h.
constexpr hours make12(const hours& h) noexcept;
Returns: The 12-hour equivalent of h in the range [1h, 12h].
If h is not in the range [0h, 23h], the value returned is unspecified.
constexpr hours make24(const hours& h, bool is_pm) noexcept;
Returns: If is_pm is false, returns the 24-hour equivalent of h in the range [0h, 11h], assuming h represents an ante meridiem hour.
Otherwise, returns the 24-hour equivalent of h in the range [12h, 23h], assuming h represents a post meridiem hour.
If h is not in the range [1h, 12h], the value returned is unspecified.