27 Time library [time]

27.8 The civil calendar [time.cal]

27.8.6 Class weekday [time.cal.wd]

27.8.6.2 Member functions [time.cal.wd.members]

constexpr explicit weekday(unsigned wd) noexcept;
Effects: Initializes wd_­ with wd == 7 ? 0 : wd.
The value held is unspecified if wd is not in the range [0, 255].
constexpr weekday(const sys_days& dp) noexcept;
Effects: Computes what day of the week corresponds to the sys_­days dp, and initializes that day of the week in wd_­.
[Example 1:
If dp represents 1970-01-01, the constructed weekday represents Thursday by storing 4 in wd_­.
— end example]
constexpr explicit weekday(const local_days& dp) noexcept;
Effects: Computes what day of the week corresponds to the local_­days dp, and initializes that day of the week in wd_­.
Postconditions: The value is identical to that constructed from sys_­days{dp.time_­since_­epoch()}.
constexpr weekday& operator++() noexcept;
Effects: *this += days{1}.
Returns: *this.
constexpr weekday operator++(int) noexcept;
Effects: ++(*this).
Returns: A copy of *this as it existed on entry to this member function.
constexpr weekday& operator--() noexcept;
Effects: *this -= days{1}.
Returns: *this.
constexpr weekday operator--(int) noexcept;
Effects: --(*this).
Returns: A copy of *this as it existed on entry to this member function.
constexpr weekday& operator+=(const days& d) noexcept;
Effects: *this = *this + d.
Returns: *this.
constexpr weekday& operator-=(const days& d) noexcept;
Effects: *this = *this - d.
Returns: *this.
constexpr unsigned c_encoding() const noexcept;
Returns: wd_­.
constexpr unsigned iso_encoding() const noexcept;
Returns: wd_­ == 0u ? 7u : wd_­.
constexpr bool ok() const noexcept;
Returns: wd_­ <= 6.
constexpr weekday_indexed operator[](unsigned index) const noexcept;
Returns: {*this, index}.
constexpr weekday_last operator[](last_spec) const noexcept;
Returns: weekday_­last{*this}.