You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/standard-library/chrono-functions.md
+9-13Lines changed: 9 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -341,17 +341,13 @@ The input stream, *`is`*
341
341
#include <chrono>
342
342
#include <iostream>
343
343
344
-
using namespace std;
345
-
using namespace std::chrono;
346
-
347
-
int Main()
344
+
int main()
348
345
{
349
346
std::istringstream str{ "22" };
350
-
std::basic_istream<char> stream{ str.rdbuf() };
351
-
std::chrono::day d;
352
-
std::chrono::from_stream(stream, "%d", d);
353
-
std::cout << d << "\n";
354
-
347
+
std::basic_istream<char> stream{ str.rdbuf() };
348
+
std::chrono::day d;
349
+
std::chrono::from_stream(stream, "%d", d);
350
+
std::cout << d << "\n";
355
351
return 0;
356
352
}
357
353
```
@@ -398,8 +394,8 @@ The format may be one of these strings:
398
394
| Specifier | Description |
399
395
|--|--|
400
396
|`%j`| If the type being formatted is a specialization of duration, the decimal number of days without padding. Otherwise, the day of the year as a decimal number. `Jan 1` is `001`. If the result is fewer than three digits, it's left-padded with `0` (zero) to three digits. |
401
-
|`%U`<br>`%0U`| The week number of the year as a decimal number. The first Sunday of the year is the first day of week `01`. Days of the same year before that week are in week `00`. If the result is a single digit, it's prefixed with `0` (zero).<br>`%OU` (letter `O`, not zero) produces the locale’s alternative representation. |
402
-
|`%W`<br>`%OW`|The week number of the year as a decimal number. The first Monday of the year is the first day of week `01`. Days of the same year before that week are in week `00`.<br>If the result is a single digit, it's prefixed with `0` (zero).<br>``%OW` (letter `O`, not zero) produces the locale’s alternative representation. |
397
+
|`%U`<br>`%0U`| The week number of the year as a decimal number. The first Sunday of the year is the first day of week `01`. Days of the same year before that week are in week `00`. If the result is a single digit, it's prefixed with `0` (zero).<br>`%OU` (letter `O`, not zero) produces the locale's alternative representation. |
398
+
|`%W`<br>`%OW`|The week number of the year as a decimal number. The first Monday of the year is the first day of week `01`. Days of the same year before that week are in week `00`.<br>If the result is a single digit, it's prefixed with `0` (zero).<br>`%OW` (letter `O`, not zero) produces the locale's alternative representation. |
403
399
404
400
### Time of day
405
401
@@ -461,7 +457,7 @@ If *`abbrev`* isn't `nullptr`, and the format specifier `%Z` is specified, and t
461
457
*`offset`*\
462
458
If *`offset`* isn't `nullptr`, and the format specifier `%z` or modified variant such as `%Ez` or `%0z` is specified, and the parse is successful, then *`offset`* points to the parsed value.
463
459
464
-
### Which flags can be use which types
460
+
### Flags by type
465
461
466
462
| Class | Specifier/Flag |
467
463
|--|--|
@@ -846,4 +842,4 @@ Returns a `string` that contains the latest remote database version.
0 commit comments