From Jason Turner

[time.cal.wd.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpec5s7a5x/{from.md → to.md} +45 -0
tmp/tmpec5s7a5x/{from.md → to.md} RENAMED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Overview <a id="time.cal.wd.overview">[[time.cal.wd.overview]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ class weekday {
6
+ unsigned char wd_; // exposition only
7
+ public:
8
+ weekday() = default;
9
+ constexpr explicit weekday(unsigned wd) noexcept;
10
+ constexpr weekday(const sys_days& dp) noexcept;
11
+ constexpr explicit weekday(const local_days& dp) noexcept;
12
+
13
+ constexpr weekday& operator++() noexcept;
14
+ constexpr weekday operator++(int) noexcept;
15
+ constexpr weekday& operator--() noexcept;
16
+ constexpr weekday operator--(int) noexcept;
17
+
18
+ constexpr weekday& operator+=(const days& d) noexcept;
19
+ constexpr weekday& operator-=(const days& d) noexcept;
20
+
21
+ constexpr unsigned c_encoding() const noexcept;
22
+ constexpr unsigned iso_encoding() const noexcept;
23
+ constexpr bool ok() const noexcept;
24
+
25
+ constexpr weekday_indexed operator[](unsigned index) const noexcept;
26
+ constexpr weekday_last operator[](last_spec) const noexcept;
27
+ };
28
+ }
29
+ ```
30
+
31
+ `weekday` represents a day of the week in the civil calendar. It
32
+ normally holds values in the range `0` to `6`, corresponding to Sunday
33
+ through Saturday, but it may hold non-negative values outside this
34
+ range. It can be constructed with any `unsigned` value, which will be
35
+ subsequently truncated to fit into `weekday`’s unspecified internal
36
+ storage. `weekday` meets the *Cpp17EqualityComparable* (
37
+ [[cpp17.equalitycomparable]]) requirements.
38
+
39
+ [*Note 1*: `weekday` is not *Cpp17LessThanComparable* because there is
40
+ no universal consensus on which day is the first day of the week.
41
+ `weekday`’s arithmetic operations treat the days of the week as a
42
+ circular range, with no beginning and no end. — *end note*]
43
+
44
+ `weekday` is a trivially copyable and standard-layout class type.
45
+