From Jason Turner

[time.cal.ymwd.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp18g6foj0/{from.md → to.md} +49 -0
tmp/tmp18g6foj0/{from.md → to.md} RENAMED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Overview <a id="time.cal.ymwd.overview">[[time.cal.ymwd.overview]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ class year_month_weekday {
6
+ chrono::year y_; // exposition only
7
+ chrono::month m_; // exposition only
8
+ chrono::weekday_indexed wdi_; // exposition only
9
+
10
+ public:
11
+ year_month_weekday() = default;
12
+ constexpr year_month_weekday(const chrono::year& y, const chrono::month& m,
13
+ const chrono::weekday_indexed& wdi) noexcept;
14
+ constexpr year_month_weekday(const sys_days& dp) noexcept;
15
+ constexpr explicit year_month_weekday(const local_days& dp) noexcept;
16
+
17
+ constexpr year_month_weekday& operator+=(const months& m) noexcept;
18
+ constexpr year_month_weekday& operator-=(const months& m) noexcept;
19
+ constexpr year_month_weekday& operator+=(const years& y) noexcept;
20
+ constexpr year_month_weekday& operator-=(const years& y) noexcept;
21
+
22
+ constexpr chrono::year year() const noexcept;
23
+ constexpr chrono::month month() const noexcept;
24
+ constexpr chrono::weekday weekday() const noexcept;
25
+ constexpr unsigned index() const noexcept;
26
+ constexpr chrono::weekday_indexed weekday_indexed() const noexcept;
27
+
28
+ constexpr operator sys_days() const noexcept;
29
+ constexpr explicit operator local_days() const noexcept;
30
+ constexpr bool ok() const noexcept;
31
+ };
32
+ }
33
+ ```
34
+
35
+ `year_month_weekday` represents a specific year, month, and nᵗʰ weekday
36
+ of the month. `year_month_weekday` is a field-based time point with a
37
+ resolution of `days`.
38
+
39
+ [*Note 1*: `year_month_weekday` supports `years`- and `months`-oriented
40
+ arithmetic, but not `days`-oriented arithmetic. For the latter, there is
41
+ a conversion to `sys_days`, which efficiently supports `days`-oriented
42
+ arithmetic. — *end note*]
43
+
44
+ `year_month_weekday` meets the *Cpp17EqualityComparable* (
45
+ [[cpp17.equalitycomparable]]) requirements.
46
+
47
+ `year_month_weekday` is a trivially copyable and standard-layout class
48
+ type.
49
+