tmp/tmp9l7nl0bv/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Member functions <a id="time.cal.ymwd.members">[[time.cal.ymwd.members]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
constexpr year_month_weekday(const chrono::year& y, const chrono::month& m,
|
| 5 |
+
const chrono::weekday_indexed& wdi) noexcept;
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Effects:* Initializes `y_` with `y`, `m_` with `m`, and `wdi_` with
|
| 9 |
+
`wdi`.
|
| 10 |
+
|
| 11 |
+
``` cpp
|
| 12 |
+
constexpr year_month_weekday(const sys_days& dp) noexcept;
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
*Effects:* Constructs an object of type `year_month_weekday` which
|
| 16 |
+
corresponds to the date represented by `dp`.
|
| 17 |
+
|
| 18 |
+
*Remarks:* For any value `ymdl` of type `year_month_weekday` for which
|
| 19 |
+
`ymdl.ok()` is `true`, `ymdl == year_month_weekday{sys_days{ymdl}}` is
|
| 20 |
+
`true`.
|
| 21 |
+
|
| 22 |
+
``` cpp
|
| 23 |
+
constexpr explicit year_month_weekday(const local_days& dp) noexcept;
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
*Effects:* Equivalent to constructing with
|
| 27 |
+
`sys_days{dp.time_since_epoch()}`.
|
| 28 |
+
|
| 29 |
+
``` cpp
|
| 30 |
+
constexpr year_month_weekday& operator+=(const months& m) noexcept;
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
*Constraints:* If the argument supplied by the caller for the `months`
|
| 34 |
+
parameter is convertible to `years`, its implicit conversion sequence to
|
| 35 |
+
`years` is worse than its implicit conversion sequence to `months`
|
| 36 |
+
[[over.ics.rank]].
|
| 37 |
+
|
| 38 |
+
*Effects:* `*this = *this + m`.
|
| 39 |
+
|
| 40 |
+
*Returns:* `*this`.
|
| 41 |
+
|
| 42 |
+
``` cpp
|
| 43 |
+
constexpr year_month_weekday& operator-=(const months& m) noexcept;
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
*Constraints:* If the argument supplied by the caller for the `months`
|
| 47 |
+
parameter is convertible to `years`, its implicit conversion sequence to
|
| 48 |
+
`years` is worse than its implicit conversion sequence to `months`
|
| 49 |
+
[[over.ics.rank]].
|
| 50 |
+
|
| 51 |
+
*Effects:* `*this = *this - m`.
|
| 52 |
+
|
| 53 |
+
*Returns:* `*this`.
|
| 54 |
+
|
| 55 |
+
``` cpp
|
| 56 |
+
constexpr year_month_weekday& operator+=(const years& y) noexcept;
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
*Effects:* `*this = *this + y`.
|
| 60 |
+
|
| 61 |
+
*Returns:* `*this`.
|
| 62 |
+
|
| 63 |
+
``` cpp
|
| 64 |
+
constexpr year_month_weekday& operator-=(const years& y) noexcept;
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
*Effects:* `*this = *this - y`.
|
| 68 |
+
|
| 69 |
+
*Returns:* `*this`.
|
| 70 |
+
|
| 71 |
+
``` cpp
|
| 72 |
+
constexpr chrono::year year() const noexcept;
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
*Returns:* `y_`.
|
| 76 |
+
|
| 77 |
+
``` cpp
|
| 78 |
+
constexpr chrono::month month() const noexcept;
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
*Returns:* `m_`.
|
| 82 |
+
|
| 83 |
+
``` cpp
|
| 84 |
+
constexpr chrono::weekday weekday() const noexcept;
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
*Returns:* `wdi_.weekday()`.
|
| 88 |
+
|
| 89 |
+
``` cpp
|
| 90 |
+
constexpr unsigned index() const noexcept;
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
*Returns:* `wdi_.index()`.
|
| 94 |
+
|
| 95 |
+
``` cpp
|
| 96 |
+
constexpr chrono::weekday_indexed weekday_indexed() const noexcept;
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
*Returns:* `wdi_`.
|
| 100 |
+
|
| 101 |
+
``` cpp
|
| 102 |
+
constexpr operator sys_days() const noexcept;
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
*Returns:* If `y_.ok() && m_.ok() && wdi_.weekday().ok()`, returns a
|
| 106 |
+
`sys_days` that represents the date `(index() - 1) * 7` days after the
|
| 107 |
+
first `weekday()` of `year()/month()`. If `index()` is 0 the returned
|
| 108 |
+
`sys_days` represents the date 7 days prior to the first `weekday()` of
|
| 109 |
+
`year()/month()`. Otherwise the returned value is unspecified.
|
| 110 |
+
|
| 111 |
+
``` cpp
|
| 112 |
+
constexpr explicit operator local_days() const noexcept;
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
*Returns:* `local_days{sys_days{*this}.time_since_epoch()}`.
|
| 116 |
+
|
| 117 |
+
``` cpp
|
| 118 |
+
constexpr bool ok() const noexcept;
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
*Returns:* If any of `y_.ok()`, `m_.ok()`, or `wdi_.ok()` is `false`,
|
| 122 |
+
returns `false`. Otherwise, if `*this` represents a valid date, returns
|
| 123 |
+
`true`. Otherwise, returns `false`.
|
| 124 |
+
|