From Jason Turner

[time.cal.ym.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp__y0_b67/{from.md → to.md} +33 -0
tmp/tmp__y0_b67/{from.md → to.md} RENAMED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Overview <a id="time.cal.ym.overview">[[time.cal.ym.overview]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ class year_month {
6
+ chrono::year y_; // exposition only
7
+ chrono::month m_; // exposition only
8
+
9
+ public:
10
+ year_month() = default;
11
+ constexpr year_month(const chrono::year& y, const chrono::month& m) noexcept;
12
+
13
+ constexpr chrono::year year() const noexcept;
14
+ constexpr chrono::month month() const noexcept;
15
+
16
+ constexpr year_month& operator+=(const months& dm) noexcept;
17
+ constexpr year_month& operator-=(const months& dm) noexcept;
18
+ constexpr year_month& operator+=(const years& dy) noexcept;
19
+ constexpr year_month& operator-=(const years& dy) noexcept;
20
+
21
+ constexpr bool ok() const noexcept;
22
+ };
23
+ }
24
+ ```
25
+
26
+ `year_month` represents a specific month of a specific year, but with an
27
+ unspecified day. `year_month` is a field-based time point with a
28
+ resolution of `months`. `year_month` meets the *Cpp17EqualityComparable*
29
+ ([[cpp17.equalitycomparable]]) and *Cpp17LessThanComparable* (
30
+ [[cpp17.lessthancomparable]]) requirements.
31
+
32
+ `year_month` is a trivially copyable and standard-layout class type.
33
+