tmp/tmplpmjn2iy/{from.md → to.md}
RENAMED
|
@@ -378,11 +378,11 @@ template<class charT, class traits>
|
|
| 378 |
|
| 379 |
*Effects:* Equivalent to:
|
| 380 |
|
| 381 |
``` cpp
|
| 382 |
return os << (m.ok() ?
|
| 383 |
-
format(os.getloc(), STATICALLY-WIDEN<charT>("{:%b}"), m) :
|
| 384 |
format(os.getloc(), STATICALLY-WIDEN<charT>("{} is not a valid month"),
|
| 385 |
static_cast<unsigned>(m)));
|
| 386 |
```
|
| 387 |
|
| 388 |
``` cpp
|
|
@@ -513,11 +513,11 @@ constexpr year operator+() const noexcept;
|
|
| 513 |
```
|
| 514 |
|
| 515 |
*Returns:* `*this`.
|
| 516 |
|
| 517 |
``` cpp
|
| 518 |
-
constexpr year
|
| 519 |
```
|
| 520 |
|
| 521 |
*Returns:* `year{-y_}`.
|
| 522 |
|
| 523 |
``` cpp
|
|
@@ -566,11 +566,11 @@ constexpr strong_ordering operator<=>(const year& x, const year& y) noexcept;
|
|
| 566 |
|
| 567 |
``` cpp
|
| 568 |
constexpr year operator+(const year& x, const years& y) noexcept;
|
| 569 |
```
|
| 570 |
|
| 571 |
-
*Returns:* `year{int{x} + y.count()}`.
|
| 572 |
|
| 573 |
``` cpp
|
| 574 |
constexpr year operator+(const years& x, const year& y) noexcept;
|
| 575 |
```
|
| 576 |
|
|
@@ -842,11 +842,11 @@ template<class charT, class traits>
|
|
| 842 |
|
| 843 |
*Effects:* Equivalent to:
|
| 844 |
|
| 845 |
``` cpp
|
| 846 |
return os << (wd.ok() ?
|
| 847 |
-
format(os.getloc(), STATICALLY-WIDEN<charT>("{:%a}"), wd) :
|
| 848 |
format(os.getloc(), STATICALLY-WIDEN<charT>("{} is not a valid weekday"),
|
| 849 |
static_cast<unsigned>(wd.wd_)));
|
| 850 |
```
|
| 851 |
|
| 852 |
``` cpp
|
|
@@ -954,12 +954,12 @@ template<class charT, class traits>
|
|
| 954 |
*Effects:* Equivalent to:
|
| 955 |
|
| 956 |
``` cpp
|
| 957 |
auto i = wdi.index();
|
| 958 |
return os << (i >= 1 && i <= 5 ?
|
| 959 |
-
format(os.getloc(), STATICALLY-WIDEN<charT>("{}[{}]"), wdi.weekday(), i) :
|
| 960 |
-
format(os.getloc(), STATICALLY-WIDEN<charT>("{}[{} is not a valid index]"),
|
| 961 |
wdi.weekday(), i));
|
| 962 |
```
|
| 963 |
|
| 964 |
### Class `weekday_last` <a id="time.cal.wdlast">[[time.cal.wdlast]]</a>
|
| 965 |
|
|
@@ -1030,11 +1030,11 @@ template<class charT, class traits>
|
|
| 1030 |
```
|
| 1031 |
|
| 1032 |
*Effects:* Equivalent to:
|
| 1033 |
|
| 1034 |
``` cpp
|
| 1035 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}[last]"), wdl.weekday());
|
| 1036 |
```
|
| 1037 |
|
| 1038 |
### Class `month_day` <a id="time.cal.md">[[time.cal.md]]</a>
|
| 1039 |
|
| 1040 |
#### Overview <a id="time.cal.md.overview">[[time.cal.md.overview]]</a>
|
|
@@ -1118,11 +1118,11 @@ template<class charT, class traits>
|
|
| 1118 |
```
|
| 1119 |
|
| 1120 |
*Effects:* Equivalent to:
|
| 1121 |
|
| 1122 |
``` cpp
|
| 1123 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{}"),
|
| 1124 |
md.month(), md.day());
|
| 1125 |
```
|
| 1126 |
|
| 1127 |
``` cpp
|
| 1128 |
template<class charT, class traits, class Alloc = allocator<charT>>
|
|
@@ -1213,11 +1213,11 @@ template<class charT, class traits>
|
|
| 1213 |
```
|
| 1214 |
|
| 1215 |
*Effects:* Equivalent to:
|
| 1216 |
|
| 1217 |
``` cpp
|
| 1218 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/last"), mdl.month());
|
| 1219 |
```
|
| 1220 |
|
| 1221 |
### Class `month_weekday` <a id="time.cal.mwd">[[time.cal.mwd]]</a>
|
| 1222 |
|
| 1223 |
#### Overview <a id="time.cal.mwd.overview">[[time.cal.mwd.overview]]</a>
|
|
@@ -1296,11 +1296,11 @@ template<class charT, class traits>
|
|
| 1296 |
```
|
| 1297 |
|
| 1298 |
*Effects:* Equivalent to:
|
| 1299 |
|
| 1300 |
``` cpp
|
| 1301 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{}"),
|
| 1302 |
mwd.month(), mwd.weekday_indexed());
|
| 1303 |
```
|
| 1304 |
|
| 1305 |
### Class `month_weekday_last` <a id="time.cal.mwdlast">[[time.cal.mwdlast]]</a>
|
| 1306 |
|
|
@@ -1383,11 +1383,11 @@ template<class charT, class traits>
|
|
| 1383 |
```
|
| 1384 |
|
| 1385 |
*Effects:* Equivalent to:
|
| 1386 |
|
| 1387 |
``` cpp
|
| 1388 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{}"),
|
| 1389 |
mwdl.month(), mwdl.weekday_last());
|
| 1390 |
```
|
| 1391 |
|
| 1392 |
### Class `year_month` <a id="time.cal.ym">[[time.cal.ym]]</a>
|
| 1393 |
|
|
@@ -1583,11 +1583,11 @@ template<class charT, class traits>
|
|
| 1583 |
```
|
| 1584 |
|
| 1585 |
*Effects:* Equivalent to:
|
| 1586 |
|
| 1587 |
``` cpp
|
| 1588 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{}"),
|
| 1589 |
ym.year(), ym.month());
|
| 1590 |
```
|
| 1591 |
|
| 1592 |
``` cpp
|
| 1593 |
template<class charT, class traits, class Alloc = allocator<charT>>
|
|
@@ -1673,11 +1673,11 @@ constexpr year_month_day(const year_month_day_last& ymdl) noexcept;
|
|
| 1673 |
|
| 1674 |
*Effects:* Initializes `y_` with `ymdl.year()`, `m_` with
|
| 1675 |
`ymdl.month()`, and `d_` with `ymdl.day()`.
|
| 1676 |
|
| 1677 |
[*Note 1*: This conversion from `year_month_day_last` to
|
| 1678 |
-
`year_month_day`
|
| 1679 |
`year_month_day_last` to a `sys_days`, and then converting that
|
| 1680 |
`sys_days` to a `year_month_day`. — *end note*]
|
| 1681 |
|
| 1682 |
``` cpp
|
| 1683 |
constexpr year_month_day(const sys_days& dp) noexcept;
|
|
@@ -1857,11 +1857,11 @@ constexpr year_month_day operator+(const year_month_day& ymd, const years& dy) n
|
|
| 1857 |
```
|
| 1858 |
|
| 1859 |
*Returns:* `(ymd.year() + dy) / ymd.month() / ymd.day()`.
|
| 1860 |
|
| 1861 |
[*Note 2*: If `ymd.month()` is February and `ymd.day()` is not in the
|
| 1862 |
-
range \[`1d`, `28d`\], `ok()`
|
| 1863 |
`year_month_day`. — *end note*]
|
| 1864 |
|
| 1865 |
``` cpp
|
| 1866 |
constexpr year_month_day operator+(const years& dy, const year_month_day& ymd) noexcept;
|
| 1867 |
```
|
|
@@ -2030,11 +2030,11 @@ constexpr chrono::day day() const noexcept;
|
|
| 2030 |
|
| 2031 |
*Returns:* If `ok()` is `true`, returns a `day` representing the last
|
| 2032 |
day of the (`year`, `month`) pair represented by `*this`. Otherwise, the
|
| 2033 |
returned value is unspecified.
|
| 2034 |
|
| 2035 |
-
[*Note 1*: This value
|
| 2036 |
|
| 2037 |
``` cpp
|
| 2038 |
constexpr operator sys_days() const noexcept;
|
| 2039 |
```
|
| 2040 |
|
|
@@ -2137,11 +2137,11 @@ template<class charT, class traits>
|
|
| 2137 |
```
|
| 2138 |
|
| 2139 |
*Effects:* Equivalent to:
|
| 2140 |
|
| 2141 |
``` cpp
|
| 2142 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{}"),
|
| 2143 |
ymdl.year(), ymdl.month_day_last());
|
| 2144 |
```
|
| 2145 |
|
| 2146 |
### Class `year_month_weekday` <a id="time.cal.ymwd">[[time.cal.ymwd]]</a>
|
| 2147 |
|
|
@@ -2209,12 +2209,12 @@ constexpr year_month_weekday(const sys_days& dp) noexcept;
|
|
| 2209 |
```
|
| 2210 |
|
| 2211 |
*Effects:* Constructs an object of type `year_month_weekday` which
|
| 2212 |
corresponds to the date represented by `dp`.
|
| 2213 |
|
| 2214 |
-
*Remarks:* For any value `
|
| 2215 |
-
`
|
| 2216 |
`true`.
|
| 2217 |
|
| 2218 |
``` cpp
|
| 2219 |
constexpr explicit year_month_weekday(const local_days& dp) noexcept;
|
| 2220 |
```
|
|
@@ -2388,11 +2388,11 @@ template<class charT, class traits>
|
|
| 2388 |
```
|
| 2389 |
|
| 2390 |
*Effects:* Equivalent to:
|
| 2391 |
|
| 2392 |
``` cpp
|
| 2393 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{}/{}"),
|
| 2394 |
ymwd.year(), ymwd.month(), ymwd.weekday_indexed());
|
| 2395 |
```
|
| 2396 |
|
| 2397 |
### Class `year_month_weekday_last` <a id="time.cal.ymwdlast">[[time.cal.ymwdlast]]</a>
|
| 2398 |
|
|
@@ -2615,11 +2615,11 @@ template<class charT, class traits>
|
|
| 2615 |
```
|
| 2616 |
|
| 2617 |
*Effects:* Equivalent to:
|
| 2618 |
|
| 2619 |
``` cpp
|
| 2620 |
-
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{}/{}"),
|
| 2621 |
ymwdl.year(), ymwdl.month(), ymwdl.weekday_last());
|
| 2622 |
```
|
| 2623 |
|
| 2624 |
### Conventional syntax operators <a id="time.cal.operators">[[time.cal.operators]]</a>
|
| 2625 |
|
|
|
|
| 378 |
|
| 379 |
*Effects:* Equivalent to:
|
| 380 |
|
| 381 |
``` cpp
|
| 382 |
return os << (m.ok() ?
|
| 383 |
+
format(os.getloc(), STATICALLY-WIDEN<charT>("{:L%b}"), m) :
|
| 384 |
format(os.getloc(), STATICALLY-WIDEN<charT>("{} is not a valid month"),
|
| 385 |
static_cast<unsigned>(m)));
|
| 386 |
```
|
| 387 |
|
| 388 |
``` cpp
|
|
|
|
| 513 |
```
|
| 514 |
|
| 515 |
*Returns:* `*this`.
|
| 516 |
|
| 517 |
``` cpp
|
| 518 |
+
constexpr year operator-() const noexcept;
|
| 519 |
```
|
| 520 |
|
| 521 |
*Returns:* `year{-y_}`.
|
| 522 |
|
| 523 |
``` cpp
|
|
|
|
| 566 |
|
| 567 |
``` cpp
|
| 568 |
constexpr year operator+(const year& x, const years& y) noexcept;
|
| 569 |
```
|
| 570 |
|
| 571 |
+
*Returns:* `year{int{x} + static_cast<int>(y.count())}`.
|
| 572 |
|
| 573 |
``` cpp
|
| 574 |
constexpr year operator+(const years& x, const year& y) noexcept;
|
| 575 |
```
|
| 576 |
|
|
|
|
| 842 |
|
| 843 |
*Effects:* Equivalent to:
|
| 844 |
|
| 845 |
``` cpp
|
| 846 |
return os << (wd.ok() ?
|
| 847 |
+
format(os.getloc(), STATICALLY-WIDEN<charT>("{:L%a}"), wd) :
|
| 848 |
format(os.getloc(), STATICALLY-WIDEN<charT>("{} is not a valid weekday"),
|
| 849 |
static_cast<unsigned>(wd.wd_)));
|
| 850 |
```
|
| 851 |
|
| 852 |
``` cpp
|
|
|
|
| 954 |
*Effects:* Equivalent to:
|
| 955 |
|
| 956 |
``` cpp
|
| 957 |
auto i = wdi.index();
|
| 958 |
return os << (i >= 1 && i <= 5 ?
|
| 959 |
+
format(os.getloc(), STATICALLY-WIDEN<charT>("{:L}[{}]"), wdi.weekday(), i) :
|
| 960 |
+
format(os.getloc(), STATICALLY-WIDEN<charT>("{:L}[{} is not a valid index]"),
|
| 961 |
wdi.weekday(), i));
|
| 962 |
```
|
| 963 |
|
| 964 |
### Class `weekday_last` <a id="time.cal.wdlast">[[time.cal.wdlast]]</a>
|
| 965 |
|
|
|
|
| 1030 |
```
|
| 1031 |
|
| 1032 |
*Effects:* Equivalent to:
|
| 1033 |
|
| 1034 |
``` cpp
|
| 1035 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{:L}[last]"), wdl.weekday());
|
| 1036 |
```
|
| 1037 |
|
| 1038 |
### Class `month_day` <a id="time.cal.md">[[time.cal.md]]</a>
|
| 1039 |
|
| 1040 |
#### Overview <a id="time.cal.md.overview">[[time.cal.md.overview]]</a>
|
|
|
|
| 1118 |
```
|
| 1119 |
|
| 1120 |
*Effects:* Equivalent to:
|
| 1121 |
|
| 1122 |
``` cpp
|
| 1123 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{:L}/{}"),
|
| 1124 |
md.month(), md.day());
|
| 1125 |
```
|
| 1126 |
|
| 1127 |
``` cpp
|
| 1128 |
template<class charT, class traits, class Alloc = allocator<charT>>
|
|
|
|
| 1213 |
```
|
| 1214 |
|
| 1215 |
*Effects:* Equivalent to:
|
| 1216 |
|
| 1217 |
``` cpp
|
| 1218 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{:L}/last"), mdl.month());
|
| 1219 |
```
|
| 1220 |
|
| 1221 |
### Class `month_weekday` <a id="time.cal.mwd">[[time.cal.mwd]]</a>
|
| 1222 |
|
| 1223 |
#### Overview <a id="time.cal.mwd.overview">[[time.cal.mwd.overview]]</a>
|
|
|
|
| 1296 |
```
|
| 1297 |
|
| 1298 |
*Effects:* Equivalent to:
|
| 1299 |
|
| 1300 |
``` cpp
|
| 1301 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{:L}/{:L}"),
|
| 1302 |
mwd.month(), mwd.weekday_indexed());
|
| 1303 |
```
|
| 1304 |
|
| 1305 |
### Class `month_weekday_last` <a id="time.cal.mwdlast">[[time.cal.mwdlast]]</a>
|
| 1306 |
|
|
|
|
| 1383 |
```
|
| 1384 |
|
| 1385 |
*Effects:* Equivalent to:
|
| 1386 |
|
| 1387 |
``` cpp
|
| 1388 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{:L}/{:L}"),
|
| 1389 |
mwdl.month(), mwdl.weekday_last());
|
| 1390 |
```
|
| 1391 |
|
| 1392 |
### Class `year_month` <a id="time.cal.ym">[[time.cal.ym]]</a>
|
| 1393 |
|
|
|
|
| 1583 |
```
|
| 1584 |
|
| 1585 |
*Effects:* Equivalent to:
|
| 1586 |
|
| 1587 |
``` cpp
|
| 1588 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{:L}"),
|
| 1589 |
ym.year(), ym.month());
|
| 1590 |
```
|
| 1591 |
|
| 1592 |
``` cpp
|
| 1593 |
template<class charT, class traits, class Alloc = allocator<charT>>
|
|
|
|
| 1673 |
|
| 1674 |
*Effects:* Initializes `y_` with `ymdl.year()`, `m_` with
|
| 1675 |
`ymdl.month()`, and `d_` with `ymdl.day()`.
|
| 1676 |
|
| 1677 |
[*Note 1*: This conversion from `year_month_day_last` to
|
| 1678 |
+
`year_month_day` can be more efficient than converting a
|
| 1679 |
`year_month_day_last` to a `sys_days`, and then converting that
|
| 1680 |
`sys_days` to a `year_month_day`. — *end note*]
|
| 1681 |
|
| 1682 |
``` cpp
|
| 1683 |
constexpr year_month_day(const sys_days& dp) noexcept;
|
|
|
|
| 1857 |
```
|
| 1858 |
|
| 1859 |
*Returns:* `(ymd.year() + dy) / ymd.month() / ymd.day()`.
|
| 1860 |
|
| 1861 |
[*Note 2*: If `ymd.month()` is February and `ymd.day()` is not in the
|
| 1862 |
+
range \[`1d`, `28d`\], `ok()` can return `false` for the resultant
|
| 1863 |
`year_month_day`. — *end note*]
|
| 1864 |
|
| 1865 |
``` cpp
|
| 1866 |
constexpr year_month_day operator+(const years& dy, const year_month_day& ymd) noexcept;
|
| 1867 |
```
|
|
|
|
| 2030 |
|
| 2031 |
*Returns:* If `ok()` is `true`, returns a `day` representing the last
|
| 2032 |
day of the (`year`, `month`) pair represented by `*this`. Otherwise, the
|
| 2033 |
returned value is unspecified.
|
| 2034 |
|
| 2035 |
+
[*Note 1*: This value might be computed on demand. — *end note*]
|
| 2036 |
|
| 2037 |
``` cpp
|
| 2038 |
constexpr operator sys_days() const noexcept;
|
| 2039 |
```
|
| 2040 |
|
|
|
|
| 2137 |
```
|
| 2138 |
|
| 2139 |
*Effects:* Equivalent to:
|
| 2140 |
|
| 2141 |
``` cpp
|
| 2142 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{:L}"),
|
| 2143 |
ymdl.year(), ymdl.month_day_last());
|
| 2144 |
```
|
| 2145 |
|
| 2146 |
### Class `year_month_weekday` <a id="time.cal.ymwd">[[time.cal.ymwd]]</a>
|
| 2147 |
|
|
|
|
| 2209 |
```
|
| 2210 |
|
| 2211 |
*Effects:* Constructs an object of type `year_month_weekday` which
|
| 2212 |
corresponds to the date represented by `dp`.
|
| 2213 |
|
| 2214 |
+
*Remarks:* For any value `ymwd` of type `year_month_weekday` for which
|
| 2215 |
+
`ymwd.ok()` is `true`, `ymwd == year_month_weekday{sys_days{ymwd}}` is
|
| 2216 |
`true`.
|
| 2217 |
|
| 2218 |
``` cpp
|
| 2219 |
constexpr explicit year_month_weekday(const local_days& dp) noexcept;
|
| 2220 |
```
|
|
|
|
| 2388 |
```
|
| 2389 |
|
| 2390 |
*Effects:* Equivalent to:
|
| 2391 |
|
| 2392 |
``` cpp
|
| 2393 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{:L}/{:L}"),
|
| 2394 |
ymwd.year(), ymwd.month(), ymwd.weekday_indexed());
|
| 2395 |
```
|
| 2396 |
|
| 2397 |
### Class `year_month_weekday_last` <a id="time.cal.ymwdlast">[[time.cal.ymwdlast]]</a>
|
| 2398 |
|
|
|
|
| 2615 |
```
|
| 2616 |
|
| 2617 |
*Effects:* Equivalent to:
|
| 2618 |
|
| 2619 |
``` cpp
|
| 2620 |
+
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{}/{:L}/{:L}"),
|
| 2621 |
ymwdl.year(), ymwdl.month(), ymwdl.weekday_last());
|
| 2622 |
```
|
| 2623 |
|
| 2624 |
### Conventional syntax operators <a id="time.cal.operators">[[time.cal.operators]]</a>
|
| 2625 |
|