From Jason Turner

[time.cal.ymdlast.overview]

Diff to HTML by rtfpessoa

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