From Jason Turner

[time.cal.ymwdlast.overview]

Diff to HTML by rtfpessoa

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