Subclause | Header | ||
Cpp17Clock requirements | |||
Time-related traits | <chrono> | ||
Class template duration | |||
Class template time_point | |||
Clocks | |||
Civil calendar | |||
Class template hh_mm_ss | |||
12/24 hour functions | |||
Time zones | |||
Formatting | |||
Parsing | |||
C library time utilities | <ctime> |
Expression | Return type | Operational semantics | |
C1::rep | An arithmetic type or a class emulating an arithmetic type | The representation type of C1::duration. | |
C1::period | a specialization of ratio | The tick period of the clock in seconds. | |
C1::duration | chrono::duration<C1::rep, C1::period> | The duration type of the clock. | |
C1::time_point | chrono::time_point<C1> or chrono::time_point<C2, C1::duration> | ||
C1::is_steady | const bool | ||
C1::now() | C1::time_point | Returns a time_point object representing the current point in time. |
template<class Rep> struct treat_as_floating_point : is_floating_point<Rep> { };
template<class Rep>
struct duration_values {
public:
static constexpr Rep zero() noexcept;
static constexpr Rep min() noexcept;
static constexpr Rep max() noexcept;
};
static constexpr Rep zero() noexcept;
static constexpr Rep min() noexcept;
static constexpr Rep max() noexcept;
template<class Rep1, class Period1, class Rep2, class Period2>
struct common_type<chrono::duration<Rep1, Period1>, chrono::duration<Rep2, Period2>> {
using type = chrono::duration<common_type_t<Rep1, Rep2>, see below>;
};
template<class Clock, class Duration1, class Duration2>
struct common_type<chrono::time_point<Clock, Duration1>, chrono::time_point<Clock, Duration2>> {
using type = chrono::time_point<Clock, common_type_t<Duration1, Duration2>>;
};
template<class T> struct is_clock;
template<class Rep2>
constexpr explicit duration(const Rep2& r);
template<class Rep2, class Period2>
constexpr duration(const duration<Rep2, Period2>& d);
constexpr common_type_t<duration> operator+() const;
constexpr common_type_t<duration> operator-() const;
constexpr duration& operator++();
constexpr duration operator++(int);
constexpr duration& operator--();
constexpr duration operator--(int);
constexpr duration& operator+=(const duration& d);
constexpr duration& operator-=(const duration& d);
constexpr duration& operator*=(const rep& rhs);
constexpr duration& operator/=(const rep& rhs);
constexpr duration& operator%=(const rep& rhs);
constexpr duration& operator%=(const duration& rhs);
static constexpr duration zero() noexcept;
static constexpr duration min() noexcept;
static constexpr duration max() noexcept;
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period, class Rep2>
constexpr duration<common_type_t<Rep1, Rep2>, Period>
operator*(const duration<Rep1, Period>& d, const Rep2& s);
template<class Rep1, class Rep2, class Period>
constexpr duration<common_type_t<Rep1, Rep2>, Period>
operator*(const Rep1& s, const duration<Rep2, Period>& d);
template<class Rep1, class Period, class Rep2>
constexpr duration<common_type_t<Rep1, Rep2>, Period>
operator/(const duration<Rep1, Period>& d, const Rep2& s);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr common_type_t<Rep1, Rep2>
operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period, class Rep2>
constexpr duration<common_type_t<Rep1, Rep2>, Period>
operator%(const duration<Rep1, Period>& d, const Rep2& s);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr common_type_t<duration<Rep1, Period1>, duration<Rep2, Period2>>
operator%(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr bool operator==(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr bool operator<(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr bool operator>(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr bool operator<=(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2>
constexpr bool operator>=(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Rep2, class Period2>
requires three_way_comparable<typename CT::rep>
constexpr auto operator<=>(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs);
template<class ToDuration, class Rep, class Period>
constexpr ToDuration duration_cast(const duration<Rep, Period>& d);
template<class ToDuration, class Rep, class Period>
constexpr ToDuration floor(const duration<Rep, Period>& d);
template<class ToDuration, class Rep, class Period>
constexpr ToDuration ceil(const duration<Rep, Period>& d);
template<class ToDuration, class Rep, class Period>
constexpr ToDuration round(const duration<Rep, Period>& d);
constexpr chrono::hours operator""h(unsigned long long hours);
constexpr chrono::duration<unspecified, ratio<3600, 1>> operator""h(long double hours);
constexpr chrono::minutes operator""min(unsigned long long minutes);
constexpr chrono::duration<unspecified, ratio<60, 1>> operator""min(long double minutes);
constexpr chrono::seconds operator""s(unsigned long long sec);
constexpr chrono::duration<unspecified> operator""s(long double sec);
constexpr chrono::milliseconds operator""ms(unsigned long long msec);
constexpr chrono::duration<unspecified, milli> operator""ms(long double msec);
constexpr chrono::microseconds operator""us(unsigned long long usec);
constexpr chrono::duration<unspecified, micro> operator""us(long double usec);
constexpr chrono::nanoseconds operator""ns(unsigned long long nsec);
constexpr chrono::duration<unspecified, nano> operator""ns(long double nsec);
template<class Rep, class Period>
constexpr duration<Rep, Period> abs(duration<Rep, Period> d);
template<class charT, class traits, class Rep, class Period>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const duration<Rep, Period>& d);
template<class charT, class traits, class Rep, class Period, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
duration<Rep, Period>& d,
basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr time_point();
constexpr explicit time_point(const duration& d);
template<class Duration2>
constexpr time_point(const time_point<clock, Duration2>& t);
constexpr duration time_since_epoch() const;
constexpr time_point& operator++();
constexpr time_point operator++(int);
constexpr time_point& operator--();
constexpr time_point operator--(int);
constexpr time_point& operator+=(const duration& d);
constexpr time_point& operator-=(const duration& d);
static constexpr time_point min() noexcept;
static constexpr time_point max() noexcept;
template<class Clock, class Duration1, class Rep2, class Period2>
constexpr time_point<Clock, common_type_t<Duration1, duration<Rep2, Period2>>>
operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
template<class Rep1, class Period1, class Clock, class Duration2>
constexpr time_point<Clock, common_type_t<duration<Rep1, Period1>, Duration2>>
operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs);
template<class Clock, class Duration1, class Rep2, class Period2>
constexpr time_point<Clock, common_type_t<Duration1, duration<Rep2, Period2>>>
operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
template<class Clock, class Duration1, class Duration2>
constexpr common_type_t<Duration1, Duration2>
operator-(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs);
template<class Clock, class Duration1, class Duration2>
constexpr bool operator==(const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
template<class Clock, class Duration1, class Duration2>
constexpr bool operator<(const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
template<class Clock, class Duration1, class Duration2>
constexpr bool operator>(const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
template<class Clock, class Duration1, class Duration2>
constexpr bool operator<=(const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
template<class Clock, class Duration1, class Duration2>
constexpr bool operator>=(const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
template<class Clock, class Duration1,
three_way_comparable_with<Duration1> Duration2>
constexpr auto operator<=>(const time_point<Clock, Duration1>& lhs,
const time_point<Clock, Duration2>& rhs);
template<class ToDuration, class Clock, class Duration>
constexpr time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
template<class ToDuration, class Clock, class Duration>
constexpr time_point<Clock, ToDuration> floor(const time_point<Clock, Duration>& tp);
template<class ToDuration, class Clock, class Duration>
constexpr time_point<Clock, ToDuration> ceil(const time_point<Clock, Duration>& tp);
template<class ToDuration, class Clock, class Duration>
constexpr time_point<Clock, ToDuration> round(const time_point<Clock, Duration>& tp);
using system_clock::rep = unspecified;
static time_t to_time_t(const time_point& t) noexcept;
static time_point from_time_t(time_t t) noexcept;
template<class charT, class traits, class Duration>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const sys_time<Duration>& tp);
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const sys_days& dp);
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
sys_time<Duration>& tp, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
static time_point now();
template<class Duration>
static sys_time<common_type_t<Duration, seconds>>
to_sys(const utc_time<Duration>& u);
template<class Duration>
static utc_time<common_type_t<Duration, seconds>>
from_sys(const sys_time<Duration>& t);
template<class charT, class traits, class Duration>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const utc_time<Duration>& t);
2015-06-30 23:59:59.500 UTC 2015-06-30 23:59:59.750 UTC 2015-06-30 23:59:60.000 UTC 2015-06-30 23:59:60.250 UTC 2015-06-30 23:59:60.500 UTC 2015-06-30 23:59:60.750 UTC 2015-07-01 00:00:00.000 UTC 2015-07-01 00:00:00.250 UTC
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
utc_time<Duration>& tp, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
struct leap_second_info {
bool is_leap_second;
seconds elapsed;
};
template<class Duration>
leap_second_info get_leap_second_info(const utc_time<Duration>& ut);
static time_point now();
template<class Duration>
static utc_time<common_type_t<Duration, seconds>>
to_utc(const tai_time<Duration>& t) noexcept;
template<class Duration>
static tai_time<common_type_t<Duration, seconds>>
from_utc(const utc_time<Duration>& t) noexcept;
template<class charT, class traits, class Duration>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const tai_time<Duration>& t);
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
tai_time<Duration>& tp, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
static time_point now();
template<class Duration>
static utc_time<common_type_t<Duration, seconds>>
to_utc(const gps_time<Duration>& t) noexcept;
template<class Duration>
static gps_time<common_type_t<Duration, seconds>>
from_utc(const utc_time<Duration>& t) noexcept;
template<class charT, class traits, class Duration>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const gps_time<Duration>& t);
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
gps_time<Duration>& tp, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
template<class charT, class traits, class Duration>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const file_time<Duration>& t);
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
file_time<Duration>& tp, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
template<class charT, class traits, class Duration>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const local_time<Duration>& lt);
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
local_time<Duration>& tp, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
template<class Duration>
time_point<Clock, Duration>
operator()(const time_point<Clock, Duration>& t) const;
template<class Duration>
sys_time<Duration>
operator()(const sys_time<Duration>& t) const;
template<class Duration>
utc_time<Duration>
operator()(const utc_time<Duration>& t) const;
template<class Duration>
utc_time<common_type_t<Duration, seconds>>
operator()(const sys_time<Duration>& t) const;
template<class Duration>
sys_time<common_type_t<Duration, seconds>>
operator()(const utc_time<Duration>& t) const;
template<class Duration>
auto operator()(const time_point<SourceClock, Duration>& t) const
-> decltype(SourceClock::to_sys(t));
template<class Duration>
auto operator()(const sys_time<Duration>& t) const
-> decltype(DestClock::from_sys(t));
template<class Duration>
auto operator()(const time_point<SourceClock, Duration>& t) const
-> decltype(SourceClock::to_utc(t));
template<class Duration>
auto operator()(const utc_time<Duration>& t) const
-> decltype(DestClock::from_utc(t));
template<class DestClock, class SourceClock, class Duration>
auto clock_cast(const time_point<SourceClock, Duration>& t);
constexpr explicit day(unsigned d) noexcept;
constexpr day& operator++() noexcept;
constexpr day operator++(int) noexcept;
constexpr day& operator--() noexcept;
constexpr day operator--(int) noexcept;
constexpr day& operator+=(const days& d) noexcept;
constexpr day& operator-=(const days& d) noexcept;
constexpr explicit operator unsigned() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const day& x, const day& y) noexcept;
constexpr strong_ordering operator<=>(const day& x, const day& y) noexcept;
constexpr day operator+(const day& x, const days& y) noexcept;
constexpr day operator+(const days& x, const day& y) noexcept;
constexpr day operator-(const day& x, const days& y) noexcept;
constexpr days operator-(const day& x, const day& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const day& d);
template<class charT, class traits, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
day& d, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr chrono::day operator""d(unsigned long long d) noexcept;
constexpr explicit month(unsigned m) noexcept;
constexpr month& operator++() noexcept;
constexpr month operator++(int) noexcept;
constexpr month& operator--() noexcept;
constexpr month operator--(int) noexcept;
constexpr month& operator+=(const months& m) noexcept;
constexpr month& operator-=(const months& m) noexcept;
constexpr explicit operator unsigned() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const month& x, const month& y) noexcept;
constexpr strong_ordering operator<=>(const month& x, const month& y) noexcept;
constexpr month operator+(const month& x, const months& y) noexcept;
constexpr month operator+(const months& x, const month& y) noexcept;
constexpr month operator-(const month& x, const months& y) noexcept;
constexpr months operator-(const month& x, const month& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const month& m);
template<class charT, class traits, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
month& m, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr explicit year(int y) noexcept;
constexpr year& operator++() noexcept;
constexpr year operator++(int) noexcept;
constexpr year& operator--() noexcept;
constexpr year operator--(int) noexcept;
constexpr year& operator+=(const years& y) noexcept;
constexpr year& operator-=(const years& y) noexcept;
constexpr year operator+() const noexcept;
constexpr year operator-() const noexcept;
constexpr bool is_leap() const noexcept;
constexpr explicit operator int() const noexcept;
constexpr bool ok() const noexcept;
static constexpr year min() noexcept;
static constexpr year max() noexcept;
constexpr bool operator==(const year& x, const year& y) noexcept;
constexpr strong_ordering operator<=>(const year& x, const year& y) noexcept;
constexpr year operator+(const year& x, const years& y) noexcept;
constexpr year operator+(const years& x, const year& y) noexcept;
constexpr year operator-(const year& x, const years& y) noexcept;
constexpr years operator-(const year& x, const year& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const year& y);
template<class charT, class traits, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
year& y, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr chrono::year operator""y(unsigned long long y) noexcept;
constexpr explicit weekday(unsigned wd) noexcept;
constexpr weekday(const sys_days& dp) noexcept;
constexpr explicit weekday(const local_days& dp) noexcept;
constexpr weekday& operator++() noexcept;
constexpr weekday operator++(int) noexcept;
constexpr weekday& operator--() noexcept;
constexpr weekday operator--(int) noexcept;
constexpr weekday& operator+=(const days& d) noexcept;
constexpr weekday& operator-=(const days& d) noexcept;
constexpr unsigned c_encoding() const noexcept;
constexpr unsigned iso_encoding() const noexcept;
constexpr bool ok() const noexcept;
constexpr weekday_indexed operator[](unsigned index) const noexcept;
constexpr weekday_last operator[](last_spec) const noexcept;
constexpr bool operator==(const weekday& x, const weekday& y) noexcept;
constexpr weekday operator+(const weekday& x, const days& y) noexcept;
constexpr weekday operator+(const days& x, const weekday& y) noexcept;
constexpr weekday operator-(const weekday& x, const days& y) noexcept;
constexpr days operator-(const weekday& x, const weekday& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const weekday& wd);
template<class charT, class traits, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
weekday& wd, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr weekday_indexed(const chrono::weekday& wd, unsigned index) noexcept;
constexpr chrono::weekday weekday() const noexcept;
constexpr unsigned index() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const weekday_indexed& x, const weekday_indexed& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const weekday_indexed& wdi);
constexpr explicit weekday_last(const chrono::weekday& wd) noexcept;
constexpr chrono::weekday weekday() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const weekday_last& x, const weekday_last& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const weekday_last& wdl);
constexpr month_day(const chrono::month& m, const chrono::day& d) noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::day day() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const month_day& x, const month_day& y) noexcept;
constexpr strong_ordering operator<=>(const month_day& x, const month_day& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const month_day& md);
template<class charT, class traits, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
month_day& md, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr explicit month_day_last(const chrono::month& m) noexcept;
constexpr month month() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const month_day_last& x, const month_day_last& y) noexcept;
constexpr strong_ordering operator<=>(const month_day_last& x, const month_day_last& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const month_day_last& mdl);
constexpr month_weekday(const chrono::month& m, const chrono::weekday_indexed& wdi) noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::weekday_indexed weekday_indexed() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const month_weekday& x, const month_weekday& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const month_weekday& mwd);
constexpr month_weekday_last(const chrono::month& m,
const chrono::weekday_last& wdl) noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::weekday_last weekday_last() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const month_weekday_last& x, const month_weekday_last& y) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const month_weekday_last& mwdl);
constexpr year_month(const chrono::year& y, const chrono::month& m) noexcept;
constexpr chrono::year year() const noexcept;
constexpr chrono::month month() const noexcept;
constexpr year_month& operator+=(const months& dm) noexcept;
constexpr year_month& operator-=(const months& dm) noexcept;
constexpr year_month& operator+=(const years& dy) noexcept;
constexpr year_month& operator-=(const years& dy) noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const year_month& x, const year_month& y) noexcept;
constexpr strong_ordering operator<=>(const year_month& x, const year_month& y) noexcept;
constexpr year_month operator+(const year_month& ym, const months& dm) noexcept;
constexpr year_month operator+(const months& dm, const year_month& ym) noexcept;
constexpr year_month operator-(const year_month& ym, const months& dm) noexcept;
constexpr months operator-(const year_month& x, const year_month& y) noexcept;
constexpr year_month operator+(const year_month& ym, const years& dy) noexcept;
constexpr year_month operator+(const years& dy, const year_month& ym) noexcept;
constexpr year_month operator-(const year_month& ym, const years& dy) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const year_month& ym);
template<class charT, class traits, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
year_month& ym, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr year_month_day(const chrono::year& y, const chrono::month& m,
const chrono::day& d) noexcept;
constexpr year_month_day(const year_month_day_last& ymdl) noexcept;
constexpr year_month_day(const sys_days& dp) noexcept;
constexpr explicit year_month_day(const local_days& dp) noexcept;
constexpr year_month_day& operator+=(const months& m) noexcept;
constexpr year_month_day& operator-=(const months& m) noexcept;
constexpr year_month_day& year_month_day::operator+=(const years& y) noexcept;
constexpr year_month_day& year_month_day::operator-=(const years& y) noexcept;
constexpr chrono::year year() const noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::day day() const noexcept;
constexpr operator sys_days() const noexcept;
constexpr explicit operator local_days() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const year_month_day& x, const year_month_day& y) noexcept;
constexpr strong_ordering operator<=>(const year_month_day& x, const year_month_day& y) noexcept;
constexpr year_month_day operator+(const year_month_day& ymd, const months& dm) noexcept;
constexpr year_month_day operator+(const months& dm, const year_month_day& ymd) noexcept;
constexpr year_month_day operator-(const year_month_day& ymd, const months& dm) noexcept;
constexpr year_month_day operator+(const year_month_day& ymd, const years& dy) noexcept;
constexpr year_month_day operator+(const years& dy, const year_month_day& ymd) noexcept;
constexpr year_month_day operator-(const year_month_day& ymd, const years& dy) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const year_month_day& ymd);
template<class charT, class traits, class Alloc = allocator<charT>>
basic_istream<charT, traits>&
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
year_month_day& ymd, basic_string<charT, traits, Alloc>* abbrev = nullptr,
minutes* offset = nullptr);
constexpr year_month_day_last(const chrono::year& y,
const chrono::month_day_last& mdl) noexcept;
constexpr year_month_day_last& operator+=(const months& m) noexcept;
constexpr year_month_day_last& operator-=(const months& m) noexcept;
constexpr year_month_day_last& operator+=(const years& y) noexcept;
constexpr year_month_day_last& operator-=(const years& y) noexcept;
constexpr chrono::year year() const noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::month_day_last month_day_last() const noexcept;
constexpr chrono::day day() const noexcept;
constexpr operator sys_days() const noexcept;
constexpr explicit operator local_days() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const year_month_day_last& x, const year_month_day_last& y) noexcept;
constexpr strong_ordering operator<=>(const year_month_day_last& x,
const year_month_day_last& y) noexcept;
constexpr year_month_day_last
operator+(const year_month_day_last& ymdl, const months& dm) noexcept;
constexpr year_month_day_last
operator+(const months& dm, const year_month_day_last& ymdl) noexcept;
constexpr year_month_day_last
operator-(const year_month_day_last& ymdl, const months& dm) noexcept;
constexpr year_month_day_last
operator+(const year_month_day_last& ymdl, const years& dy) noexcept;
constexpr year_month_day_last
operator+(const years& dy, const year_month_day_last& ymdl) noexcept;
constexpr year_month_day_last
operator-(const year_month_day_last& ymdl, const years& dy) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const year_month_day_last& ymdl);
constexpr year_month_weekday(const chrono::year& y, const chrono::month& m,
const chrono::weekday_indexed& wdi) noexcept;
constexpr year_month_weekday(const sys_days& dp) noexcept;
constexpr explicit year_month_weekday(const local_days& dp) noexcept;
constexpr year_month_weekday& operator+=(const months& m) noexcept;
constexpr year_month_weekday& operator-=(const months& m) noexcept;
constexpr year_month_weekday& operator+=(const years& y) noexcept;
constexpr year_month_weekday& operator-=(const years& y) noexcept;
constexpr chrono::year year() const noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::weekday weekday() const noexcept;
constexpr unsigned index() const noexcept;
constexpr chrono::weekday_indexed weekday_indexed() const noexcept;
constexpr operator sys_days() const noexcept;
constexpr explicit operator local_days() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const year_month_weekday& x, const year_month_weekday& y) noexcept;
constexpr year_month_weekday operator+(const year_month_weekday& ymwd, const months& dm) noexcept;
constexpr year_month_weekday operator+(const months& dm, const year_month_weekday& ymwd) noexcept;
constexpr year_month_weekday operator-(const year_month_weekday& ymwd, const months& dm) noexcept;
constexpr year_month_weekday operator+(const year_month_weekday& ymwd, const years& dy) noexcept;
constexpr year_month_weekday operator+(const years& dy, const year_month_weekday& ymwd) noexcept;
constexpr year_month_weekday operator-(const year_month_weekday& ymwd, const years& dy) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const year_month_weekday& ymwd);
constexpr year_month_weekday_last(const chrono::year& y, const chrono::month& m,
const chrono::weekday_last& wdl) noexcept;
constexpr year_month_weekday_last& operator+=(const months& m) noexcept;
constexpr year_month_weekday_last& operator-=(const months& m) noexcept;
constexpr year_month_weekday_last& operator+=(const years& y) noexcept;
constexpr year_month_weekday_last& operator-=(const years& y) noexcept;
constexpr chrono::year year() const noexcept;
constexpr chrono::month month() const noexcept;
constexpr chrono::weekday weekday() const noexcept;
constexpr chrono::weekday_last weekday_last() const noexcept;
constexpr operator sys_days() const noexcept;
constexpr explicit operator local_days() const noexcept;
constexpr bool ok() const noexcept;
constexpr bool operator==(const year_month_weekday_last& x,
const year_month_weekday_last& y) noexcept;
constexpr year_month_weekday_last
operator+(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
constexpr year_month_weekday_last
operator+(const months& dm, const year_month_weekday_last& ymwdl) noexcept;
constexpr year_month_weekday_last
operator-(const year_month_weekday_last& ymwdl, const months& dm) noexcept;
constexpr year_month_weekday_last
operator+(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
constexpr year_month_weekday_last
operator+(const years& dy, const year_month_weekday_last& ymwdl) noexcept;
constexpr year_month_weekday_last
operator-(const year_month_weekday_last& ymwdl, const years& dy) noexcept;
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const year_month_weekday_last& ymwdl);
constexpr year_month
operator/(const year& y, const month& m) noexcept;
constexpr year_month
operator/(const year& y, int m) noexcept;
constexpr month_day
operator/(const month& m, const day& d) noexcept;
constexpr month_day
operator/(const month& m, int d) noexcept;
constexpr month_day
operator/(int m, const day& d) noexcept;
constexpr month_day
operator/(const day& d, const month& m) noexcept;
constexpr month_day
operator/(const day& d, int m) noexcept;
constexpr month_day_last
operator/(const month& m, last_spec) noexcept;
constexpr month_day_last
operator/(int m, last_spec) noexcept;
constexpr month_day_last
operator/(last_spec, const month& m) noexcept;
constexpr month_day_last
operator/(last_spec, int m) noexcept;
constexpr month_weekday
operator/(const month& m, const weekday_indexed& wdi) noexcept;
constexpr month_weekday
operator/(int m, const weekday_indexed& wdi) noexcept;
constexpr month_weekday
operator/(const weekday_indexed& wdi, const month& m) noexcept;
constexpr month_weekday
operator/(const weekday_indexed& wdi, int m) noexcept;
constexpr month_weekday_last
operator/(const month& m, const weekday_last& wdl) noexcept;
constexpr month_weekday_last
operator/(int m, const weekday_last& wdl) noexcept;
constexpr month_weekday_last
operator/(const weekday_last& wdl, const month& m) noexcept;
constexpr month_weekday_last
operator/(const weekday_last& wdl, int m) noexcept;
constexpr year_month_day
operator/(const year_month& ym, const day& d) noexcept;
constexpr year_month_day
operator/(const year_month& ym, int d) noexcept;
constexpr year_month_day
operator/(const year& y, const month_day& md) noexcept;
constexpr year_month_day
operator/(int y, const month_day& md) noexcept;
constexpr year_month_day
operator/(const month_day& md, const year& y) noexcept;
constexpr year_month_day
operator/(const month_day& md, int y) noexcept;
constexpr year_month_day_last
operator/(const year_month& ym, last_spec) noexcept;
constexpr year_month_day_last
operator/(const year& y, const month_day_last& mdl) noexcept;
constexpr year_month_day_last
operator/(int y, const month_day_last& mdl) noexcept;
constexpr year_month_day_last
operator/(const month_day_last& mdl, const year& y) noexcept;
constexpr year_month_day_last
operator/(const month_day_last& mdl, int y) noexcept;
constexpr year_month_weekday
operator/(const year_month& ym, const weekday_indexed& wdi) noexcept;
constexpr year_month_weekday
operator/(const year& y, const month_weekday& mwd) noexcept;
constexpr year_month_weekday
operator/(int y, const month_weekday& mwd) noexcept;
constexpr year_month_weekday
operator/(const month_weekday& mwd, const year& y) noexcept;
constexpr year_month_weekday
operator/(const month_weekday& mwd, int y) noexcept;
constexpr year_month_weekday_last
operator/(const year_month& ym, const weekday_last& wdl) noexcept;
constexpr year_month_weekday_last
operator/(const year& y, const month_weekday_last& mwdl) noexcept;
constexpr year_month_weekday_last
operator/(int y, const month_weekday_last& mwdl) noexcept;
constexpr year_month_weekday_last
operator/(const month_weekday_last& mwdl, const year& y) noexcept;
constexpr year_month_weekday_last
operator/(const month_weekday_last& mwdl, int y) noexcept;
static constexpr unsigned fractional_width = see below;
Duration | fractional_width | Formatted fractional second output | |
hours, minutes, and seconds | 0 | ||
milliseconds | 3 | 0.001 | |
microseconds | 6 | 0.000001 | |
nanoseconds | 9 | 0.000000001 | |
duration<int, ratio<1, 2>> | 1 | 0.5 | |
duration<int, ratio<1, 3>> | 6 | 0.333333 | |
duration<int, ratio<1, 4>> | 2 | 0.25 | |
duration<int, ratio<1, 5>> | 1 | 0.2 | |
duration<int, ratio<1, 6>> | 6 | 0.166666 | |
duration<int, ratio<1, 7>> | 6 | 0.142857 | |
duration<int, ratio<1, 8>> | 3 | 0.125 | |
duration<int, ratio<1, 9>> | 6 | 0.111111 | |
duration<int, ratio<1, 10>> | 1 | 0.1 | |
duration<int, ratio<756, 625>> | 4 | 0.2096 |
using precision = see below;
constexpr explicit hh_mm_ss(Duration d);
constexpr bool is_negative() const noexcept;
constexpr chrono::hours hours() const noexcept;
constexpr chrono::minutes minutes() const noexcept;
constexpr chrono::seconds seconds() const noexcept;
constexpr precision subseconds() const noexcept;
constexpr precision to_duration() const noexcept;
constexpr explicit operator precision() const noexcept;
template<class charT, class traits, class Duration>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const hh_mm_ss<Duration>& hms);
constexpr bool is_am(const hours& h) noexcept;
constexpr bool is_pm(const hours& h) noexcept;
constexpr hours make12(const hours& h) noexcept;
constexpr hours make24(const hours& h, bool is_pm) noexcept;
const time_zone* locate_zone(string_view tz_name) const;
const time_zone* current_zone() const;
const tzdb& front() const noexcept;
const_iterator erase_after(const_iterator p);
const_iterator begin() const noexcept;
const_iterator end() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
tzdb_list& get_tzdb_list();
const tzdb& get_tzdb();
const time_zone* locate_zone(string_view tz_name);
const time_zone* current_zone();
const tzdb& reload_tzdb();
string remote_version();
template<class Duration>
nonexistent_local_time(const local_time<Duration>& tp, const local_info& i);
2016-03-13 02:30:00 is in a gap between 2016-03-13 02:00:00 EST and 2016-03-13 03:00:00 EDT which are both equivalent to 2016-03-13 07:00:00 UTC
template<class Duration>
ambiguous_local_time(const local_time<Duration>& tp, const local_info& i);
2016-11-06 01:30:00 is ambiguous. It could be 2016-11-06 01:30:00 EDT == 2016-11-06 05:30:00 UTC or 2016-11-06 01:30:00 EST == 2016-11-06 06:30:00 UTC
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const sys_info& r);
template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const local_info& r);
string_view name() const noexcept;
template<class Duration>
sys_info get_info(const sys_time<Duration>& st) const;
template<class Duration>
local_info get_info(const local_time<Duration>& tp) const;
template<class Duration>
sys_time<common_type_t<Duration, seconds>>
to_sys(const local_time<Duration>& tp) const;
template<class Duration>
sys_time<common_type_t<Duration, seconds>>
to_sys(const local_time<Duration>& tp, choose z) const;
template<class Duration>
local_time<common_type_t<Duration, seconds>>
to_local(const sys_time<Duration>& tp) const;
static const time_zone* default_zone();
static const time_zone* locate_zone(string_view name);
zoned_time();
zoned_time(const sys_time<Duration>& st);
explicit zoned_time(TimeZonePtr z);
explicit zoned_time(string_view name);
template<class Duration2>
zoned_time(const zoned_time<Duration2, TimeZonePtr>& y);
zoned_time(TimeZonePtr z, const sys_time<Duration>& st);
zoned_time(string_view name, const sys_time<Duration>& st);
zoned_time(TimeZonePtr z, const local_time<Duration>& tp);
zoned_time(string_view name, const local_time<Duration>& tp);
zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c);
zoned_time(string_view name, const local_time<Duration>& tp, choose c);
template<class Duration2, class TimeZonePtr2>
zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y);
template<class Duration2, class TimeZonePtr2>
zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y, choose);
template<class Duration2, class TimeZonePtr2>
zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& y);
template<class Duration2, class TimeZonePtr2>
zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& y, choose c);
zoned_time& operator=(const sys_time<Duration>& st);
zoned_time& operator=(const local_time<Duration>& lt);
operator sys_time<duration>() const;
explicit operator local_time<duration>() const;
TimeZonePtr get_time_zone() const;
local_time<duration> get_local_time() const;
sys_time<duration> get_sys_time() const;
sys_info get_info() const;
template<class Duration1, class Duration2, class TimeZonePtr>
bool operator==(const zoned_time<Duration1, TimeZonePtr>& x,
const zoned_time<Duration2, TimeZonePtr>& y);
template<class charT, class traits, class Duration, class TimeZonePtr>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os,
const zoned_time<Duration, TimeZonePtr>& t);
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
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;
template<class Duration>
requires three_way_comparable_with<sys_seconds, sys_time<Duration>>
constexpr auto operator<=>(const leap_second& x, const sys_time<Duration>& y) noexcept;
string_view name() const noexcept;
string_view target() const noexcept;
Specifier | Replacement | |
%a | ||
%A | ||
%b | ||
%B | ||
%c | ||
%C | ||
%d | ||
%D | Equivalent to %m/%d/%y. | |
%e | ||
%F | Equivalent to %Y-%m-%d. | |
%g | ||
%G | ||
%h | Equivalent to %b. | |
%H | ||
%I | ||
%j | ||
%m | ||
%M | ||
%n | A new-line character. | |
%p | The locale's equivalent of the AM/PM designations associated with a 12-hour clock. | |
%q | The duration's unit suffix as specified in [time.duration.io]. | |
%Q | The duration's numeric value (as if extracted via .count()). | |
%r | The locale's 12-hour clock time. | |
%R | Equivalent to %H:%M. | |
%S | Seconds as a decimal number. If the precision of the input cannot be exactly represented with seconds,
then the format is a decimal floating-point number with a fixed format
and a precision matching that of the precision of the input
(or to a microseconds precision if the conversion to floating-point decimal seconds
cannot be made within 18 fractional digits). The character for the decimal point is localized according to the locale. The modified command %OS produces
the locale's alternative representation. | |
%t | A horizontal-tab character. | |
%T | Equivalent to %H:%M:%S. | |
%u | ||
%U | ||
%V | ||
%w | ||
%W | ||
%x | ||
%X | ||
%y | ||
%Y | ||
%z | ||
%Z | ||
%% | A % character. |
template<class Duration, class charT>
struct formatter<chrono::sys_time<Duration>, charT>;
template<class Duration, class charT>
struct formatter<chrono::utc_time<Duration>, charT>;
template<class Duration, class charT>
struct formatter<chrono::tai_time<Duration>, charT>;
template<class Duration, class charT>
struct formatter<chrono::gps_time<Duration>, charT>;
template<class Duration, class charT>
struct formatter<chrono::file_time<Duration>, charT>;
template<class Duration, class charT>
struct formatter<chrono::local_time<Duration>, charT>;
template<class Duration>
local-time-format-t<Duration>
local_time_format(local_time<Duration> time, const string* abbrev = nullptr,
const seconds* offset_sec = nullptr);
template<class Duration, class charT>
struct formatter<chrono::local-time-format-t<Duration>, charT>;
template<class FormatContext>
typename FormatContext::iterator
format(const chrono::zoned_time<Duration, TimeZonePtr>& tp, FormatContext& ctx) const;
template<class charT, class Parsable>
unspecified
parse(const charT* fmt, Parsable& tp);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const charT* fmt, Parsable& tp,
basic_string<charT, traits, Alloc>& abbrev);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
basic_string<charT, traits, Alloc>& abbrev);
template<class charT, class Parsable>
unspecified
parse(const charT* fmt, Parsable& tp, minutes& offset);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
minutes& offset);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const charT* fmt, Parsable& tp,
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
Flag | Parsed value | |
%a | The locale's full or abbreviated case-insensitive weekday name. | |
%A | Equivalent to %a. | |
%b | The locale's full or abbreviated case-insensitive month name. | |
%B | Equivalent to %b. | |
%c | ||
%C | ||
%d | The day of the month as a decimal number. The modified command %Nd specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %Od interprets
the locale's alternative representation of the day of the month. | |
%D | Equivalent to %m/%d/%y. | |
%e | ||
%F | ||
%g | ||
%G | ||
%h | Equivalent to %b. | |
%H | ||
%I | ||
%j | ||
%m | ||
%M | ||
%n | ||
%p | The locale's equivalent of the AM/PM designations associated with a 12-hour clock. | |
%r | The locale's 12-hour clock time. | |
%R | Equivalent to %H:%M. | |
%S | The seconds as a decimal number. The modified command %NS specifies
the maximum number of characters to read. If N is not specified,
the default is 2 if the input time has a precision convertible to seconds. Otherwise the default width is determined by
the decimal precision of the input
and the field is interpreted as a long double in a fixed format. If encountered, the locale determines the decimal point character. Leading zeroes are permitted but not required. The modified command %OS interprets
the locale's alternative representation. | |
%t | Matches zero or one whitespace characters. | |
%T | Equivalent to %H:%M:%S. | |
%u | ||
%U | The week number of the year as a decimal number. The first Sunday of the year is the first day of week 01. Days of the same year prior to that are in week 00. The modified command %NU specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %OU interprets
the locale's alternative representation. | |
%V | ||
%w | ||
%W | The week number of the year as a decimal number. The first Monday of the year is the first day of week 01. Days of the same year prior to that are in week 00. The modified command %NW specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %OW interprets
the locale's alternative representation. | |
%x | ||
%X | ||
%y | The last two decimal digits of the year. If the century is not otherwise specified
(e.g., with %C),
values in the range [69, 99]
are presumed to refer to the years 1969 to 1999,
and values in the range [00, 68]
are presumed to refer to the years 2000 to 2068. The modified command %Ny specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. | |
%Y | ||
%z | ||
%Z | The time zone abbreviation or name. A single word is parsed. This word can only contain characters
from the basic character set ([lex.charset])
that are alphanumeric, or one of
'_', '/', '-', or '+'. | |
%% | A % character is extracted. |