namespace std::chrono { class leap_second { public: leap_second(const leap_second&) = default; leap_second& operator=(const leap_second&) = default; // unspecified additional constructors constexpr sys_seconds date() const noexcept; constexpr seconds value() const noexcept; }; }
for (auto& l : get_tzdb().leap_seconds) if (l <= 2018y/March/17d) cout << l.date() << ": " << l.value() << '\n';
1972-07-01 00:00:00: 1s 1973-01-01 00:00:00: 1s 1974-01-01 00:00:00: 1s 1975-01-01 00:00:00: 1s 1976-01-01 00:00:00: 1s 1977-01-01 00:00:00: 1s 1978-01-01 00:00:00: 1s 1979-01-01 00:00:00: 1s 1980-01-01 00:00:00: 1s 1981-07-01 00:00:00: 1s 1982-07-01 00:00:00: 1s 1983-07-01 00:00:00: 1s 1985-07-01 00:00:00: 1s 1988-01-01 00:00:00: 1s 1990-01-01 00:00:00: 1s 1991-01-01 00:00:00: 1s 1992-07-01 00:00:00: 1s 1993-07-01 00:00:00: 1s 1994-07-01 00:00:00: 1s 1996-01-01 00:00:00: 1s 1997-07-01 00:00:00: 1s 1999-01-01 00:00:00: 1s 2006-01-01 00:00:00: 1s 2009-01-01 00:00:00: 1s 2012-07-01 00:00:00: 1s 2015-07-01 00:00:00: 1s 2017-01-01 00:00:00: 1s— end example
constexpr sys_seconds date() const noexcept;
constexpr seconds value() const noexcept;
constexpr bool operator==(const leap_second& x, const leap_second& y) noexcept;
constexpr strong_ordering operator<=>(const leap_second& x, const leap_second& y) noexcept;
template<class Duration>
constexpr bool operator==(const leap_second& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator<(const leap_second& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator<(const sys_time<Duration>& x, const leap_second& y) noexcept;
template<class Duration>
constexpr bool operator>(const leap_second& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator>(const sys_time<Duration>& x, const leap_second& y) noexcept;
template<class Duration>
constexpr bool operator<=(const leap_second& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator<=(const sys_time<Duration>& x, const leap_second& y) noexcept;
template<class Duration>
constexpr bool operator>=(const leap_second& x, const sys_time<Duration>& y) noexcept;
template<class Duration>
constexpr bool operator>=(const sys_time<Duration>& x, const leap_second& y) noexcept;