tmp/tmpchau3lts/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## 12/24 hours functions <a id="time.12">[[time.12]]</a>
|
| 2 |
+
|
| 3 |
+
These functions aid in translating between a 12h format time of day and
|
| 4 |
+
a 24h format time of day.
|
| 5 |
+
|
| 6 |
+
``` cpp
|
| 7 |
+
constexpr bool is_am(const hours& h) noexcept;
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
*Returns:* `0h <= h && h <= 11h`.
|
| 11 |
+
|
| 12 |
+
``` cpp
|
| 13 |
+
constexpr bool is_pm(const hours& h) noexcept;
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
*Returns:* `12h <= h && h <= 23h`.
|
| 17 |
+
|
| 18 |
+
``` cpp
|
| 19 |
+
constexpr hours make12(const hours& h) noexcept;
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
*Returns:* The 12-hour equivalent of `h` in the range \[`1h`, `12h`\].
|
| 23 |
+
If `h` is not in the range \[`0h`, `23h`\], the value returned is
|
| 24 |
+
unspecified.
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
constexpr hours make24(const hours& h, bool is_pm) noexcept;
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
*Returns:* If `is_pm` is `false`, returns the 24-hour equivalent of `h`
|
| 31 |
+
in the range \[`0h`, `11h`\], assuming `h` represents an ante meridiem
|
| 32 |
+
hour. Otherwise, returns the 24-hour equivalent of `h` in the range
|
| 33 |
+
\[`12h`, `23h`\], assuming `h` represents a post meridiem hour. If `h`
|
| 34 |
+
is not in the range \[`1h`, `12h`\], the value returned is unspecified.
|
| 35 |
+
|