[time.cal.wd.overview]

# 30 Time library [[time]](./#time)

## 30.8 The civil calendar [[time.cal]](time.cal#wd.overview)

### 30.8.6 Class weekday [[time.cal.wd]](time.cal.wd#overview)

#### 30.8.6.1 Overview [time.cal.wd.overview]

namespace std::chrono {class weekday {unsigned char wd_; // *exposition only*public: weekday() = default; 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; };}

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L4925)

weekday represents a day of the week in the civil calendar[.](#1.sentence-1)

It normally holds values in the range 0 to 6,
corresponding to Sunday through Saturday, but
it may hold non-negative values outside this range[.](#1.sentence-2)

It can be constructed with any unsigned value,
which will be subsequently truncated to fit into weekday's unspecified internal storage[.](#1.sentence-3)

weekday meets the [*Cpp17EqualityComparable*](utility.arg.requirements#:Cpp17EqualityComparable "16.4.4.2 Template argument requirements [utility.arg.requirements]") (Table [28](utility.arg.requirements#tab:cpp17.equalitycomparable "Table 28: Cpp17EqualityComparable requirements")) requirements[.](#1.sentence-4)

[*Note [1](#note-1)*:

weekday is not[*Cpp17LessThanComparable*](utility.arg.requirements#:Cpp17LessThanComparable "16.4.4.2 Template argument requirements [utility.arg.requirements]") because there is no universal consensus on which day is the first day of the week[.](#1.sentence-5)

weekday's arithmetic operations treat the days of the week as a circular range,
with no beginning and no end[.](#1.sentence-6)

â *end note*]

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L4941)

weekday is a trivially copyable and standard-layout class type[.](#2.sentence-1)
