25 Time library [time]

25.8 The civil calendar [time.cal]

25.8.6 Class weekday [time.cal.wd]

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

explicit constexpr weekday(unsigned wd) noexcept;
Effects: Constructs an object of type weekday by initializing wd_­ with wd.
The value held is unspecified if wd is not in the range [0, 255].
constexpr weekday(const sys_days& dp) noexcept;
Effects: Constructs an object of type weekday by computing what day of the week corresponds to the sys_­days dp, and representing that day of the week in wd_­.
[Example
:
If dp represents 1970-01-01, the constructed weekday represents Thursday by storing 4 in wd_­.
end example
]
explicit constexpr weekday(const local_days& dp) noexcept;
Effects: Constructs an object of type weekday by computing what day of the week corresponds to the local_­days dp, and representing that day of the week in wd_­.
Remarks: The value after construction 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.
explicit constexpr operator unsigned() const noexcept;
Returns: 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}.