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
template<class charT, class traits, class Rep, class Period, class Alloc = allocator<charT>>
162
164
basic_istream<charT, traits>&
163
165
from_stream(
@@ -344,7 +346,7 @@ int Main()
344
346
345
347
## <aname="parse-format-strings"></a> Parse format strings
346
348
347
-
The format may be one of the following:
349
+
The format may be one of these strings:
348
350
349
351
### Date
350
352
@@ -358,32 +360,32 @@ The format may be one of the following:
358
360
359
361
| Specifier | Description |
360
362
|--|--|
361
-
|`%d`<br>`%0d`<br>`%`*N*`d`<br>`%e`<br>`%0e`<br>`%`*N*`e`| The day of the month as a decimal number.<br> `%`*N*`d` specifies the maximum number of characters to read, for example `%1d`. If `N`is not specified, the default is 2.<br> Leading zeroes are permitted but not required. <br>`%Od` (letter `O`, not zero) interprets the locale’s alternative representation of the day of the month.<br>`%e` is equivalent to `%d` and can be modified like `%d`|
363
+
|`%d`<br>`%0d`<br>`%`*N*`d`<br>`%e`<br>`%0e`<br>`%`*N*`e`| The day of the month as a decimal number.<br> `%`*N*`d` specifies the maximum number of characters to read, for example `%1d`. If `N`isn't specified, the default is 2.<br> Leading zeroes are permitted but not required. <br>`%Od` (letter `O`, not zero) interprets the locale’s alternative representation of the day of the month.<br>`%e` is equivalent to `%d` and can be modified like `%d`|
362
364
363
365
### Day of the week
364
366
365
367
| Specifier | Description |
366
368
|--|--|
367
369
|`%a`<br>`%A`| The locale’s full or abbreviated case-insensitive weekday name.<br>`%A` is equivalent to `%a`|
368
-
|`%u`<br>`%`*`N`*`u`| The ISO weekday as a decimal number (1-7), where Monday is 1. `%`*`N`*`u` specifies the maximum number of characters to read, for example `%2u`. If `N`is not specified, the default is 1. Leading zeros are permitted but not required. |
369
-
|`%w`<br>`%`*`N`*`w`<br>`%0w`| The weekday as a decimal number (0-6), where Sunday is 0.<br>`%`*`N`*`w` specifies the maximum number of characters to read, for example `%2w`. If `N`is not specified, the default is 1. Leading zeroes are permitted but not required.<br>`%Ow` (letter `O`, not zero) interprets the locale’s alternative representation. |
370
+
|`%u`<br>`%`*`N`*`u`| The ISO weekday as a decimal number (1-7), where Monday is 1. `%`*`N`*`u` specifies the maximum number of characters to read, for example `%2u`. If `N`isn't specified, the default is 1. Leading zeros are permitted but not required. |
371
+
|`%w`<br>`%`*`N`*`w`<br>`%0w`| The weekday as a decimal number (0-6), where Sunday is 0.<br>`%`*`N`*`w` specifies the maximum number of characters to read, for example `%2w`. If `N`isn't specified, the default is 1. Leading zeroes are permitted but not required.<br>`%Ow` (letter `O`, not zero) interprets the locale’s alternative representation. |
370
372
371
373
### Week/day of the year
372
374
373
375
| Specifier | Description |
374
376
|--|--|
375
-
|`%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 less than three digits, it is left-padded with 0 (zero) to three digits. |
376
-
|`%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 prior to that are in week 00. If the result is a single digit, it is prefixed with 0 (zero).<br>`%OU` (letter `O`, not zero) produces the locale’s alternative representation. |
377
-
|`%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 prior to that are in week 00.<br>If the result is a single digit, it is prefixed with 0 (zero).<br>``%OW` (letter `O`, not zero) produces the locale’s alternative representation. |
377
+
|`%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. |
378
+
|`%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. |
379
+
|`%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. |
378
380
379
381
### Time of day
380
382
381
383
| Specifier | Description |
382
384
|--|--|
383
-
|`%H`<br>`%`*N*`H`<br>`%OH`| The hour (24-hour clock) as a decimal number. If the result is a single digit, it is prefixed with a 0 (zero).<br>`%`*N*`H` specifies the maximum number of characters to read, for example, `%1H`. If `N`is not specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OH` (letter `O`, not zero) produces the locale’s alternative representation. |
384
-
|`%I`<br>`%`*N*`I`<br>`%OI`| The hour (12-hour clock) as a decimal number. If the result is a single digit, it is prefixed with 0 (zero).<br>`%`*N*`I` specifies the maximum number of characters to read, for example, `%1I`. If `N`is not specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OI` (letter `O`, not zero) produces the locale’s alternative representation. |
385
-
|`%M`<br>`%`*N*`M`<br>`%OM`| The minutes as a decimal number. If the result is a single digit, it is prefixed with 0 (zero).<br>`%`*N*`M` specifies the maximum number of characters to read, for example `%3M`. If `N`is not specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OM` (letter `O`, not zero) produces the locale’s alternative representation.|
386
-
|`%S`<br>`%`*N*`S`<br>`%OS`| Seconds as a decimal number. If the number of seconds is less than 10, the result is prefixed with 0 (zero). If the precision of the input cannot be exactly represented with seconds, then the format is a decimal floating-point number with a fixed format and a precision matching that of the precision of the input (or to a microseconds precision if the conversion to floating-point decimal seconds cannot be made within 18 fractional digits). The character for the decimal point is localized according to the locale.<br>`%`*N*`S` specifies the maximum number of characters to read, for example `%3S`. If `N`is not specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OS` (letter `O`, not zero) produces the locale’s alternative representation. |
385
+
|`%H`<br>`%`*N*`H`<br>`%OH`| The hour (24-hour clock) as a decimal number. If the result is a single digit, it's prefixed with a `0` (zero).<br>`%`*N*`H` specifies the maximum number of characters to read, for example, `%1H`. If `N`isn't specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OH` (letter `O`, not zero) produces the locale’s alternative representation. |
386
+
|`%I`<br>`%`*N*`I`<br>`%OI`| The hour (12-hour clock) as a decimal number. If the result is a single digit, it's prefixed with `0` (zero).<br>`%`*N*`I` specifies the maximum number of characters to read, for example, `%1I`. If `N`isn't specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OI` (letter `O`, not zero) produces the locale’s alternative representation. |
387
+
|`%M`<br>`%`*N*`M`<br>`%OM`| The minutes as a decimal number. If the result is a single digit, it's prefixed with `0` (zero).<br>`%`*N*`M` specifies the maximum number of characters to read, for example `%3M`. If `N`isn't specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OM` (letter `O`, not zero) produces the locale’s alternative representation.|
388
+
|`%S`<br>`%`*N*`S`<br>`%OS`| Seconds as a decimal number. If the number of seconds is less than 10, the result is prefixed with `0` (zero). If the precision of the input can't be exactly represented with seconds, then the format is a decimal floating-point number with a fixed format. It has a microseconds precision if the function can't convert the floating-point decimal seconds within 18 fractional digits. Otherwise, its precision matches the precision of the input. The character for the decimal point is localized according to the locale.<br>`%`*N*`S` specifies the maximum number of characters to read, for example `%3S`. If `N`isn't specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%OS` (letter `O`, not zero) produces the locale’s alternative representation. |
387
389
|`%p`| The locale’s equivalent of the AM/PM designations associated with a 12-hour clock. |
388
390
|`%r`| The locale’s 12-hour clock time. |
389
391
|`%R`| Equivalent to `%H:%M`. |
@@ -394,26 +396,26 @@ The format may be one of the following:
394
396
395
397
| Specifier | Description |
396
398
|--|--|
397
-
|`%b`, `%B`, `%h`| The locale’s abbreviated month name. If the value does not contain a valid month, a `format_error` exception is thrown.<br>`%h` is equivalent to `%b`. |
398
-
|`%m`, `%`*n*`m`, `%Om`| The month as a decimal number. Jan is 1.<br>`%`*N*`m` specifies the maximum number of characters to read, for example, `%3m`. If `N`is not specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%Om` (letter `O`, not zero) interprets the locale’s alternative representation.|
399
+
|`%b`, `%B`, `%h`| The locale’s abbreviated month name. If the value doesn't contain a valid month, a `format_error` exception is thrown.<br>`%h` is equivalent to `%b`. |
400
+
|`%m`, `%`*n*`m`, `%Om`| The month as a decimal number. Jan is 1.<br>`%`*N*`m` specifies the maximum number of characters to read, for example, `%3m`. If `N`isn't specified, the default is 2.<br>Leading zeroes are permitted but not required.<br>`%Om` (letter `O`, not zero) interprets the locale’s alternative representation.|
399
401
400
402
### Year
401
403
402
404
| Specifier | Description |
403
405
|--|--|
404
-
|`%C`, `%`*N*`C`, `%EC`| The century as a decimal number.<br>`%`*N*`C` specifies the maximum number of characters to read, for example, `%1N`. If `N`is not specified, the default is 2. Leading zeroes are permitted but not required.<br>`%EC` interprets the locale’s alternative representation of the century. |
405
-
|%y, `%`*N*`y`, `%Ey`, `%Oy`| The last two decimal digits of the year. If the century is not otherwise specified (for example with `%C`), values in the range [69, 99] are presumed to refer to the years 1969 to 1999, and values in the range [00, 68] are presumed to refer to the years 2000 to 2068.<br>Leading zeroes are permitted but not required.<br>`%Ey` and `%Oy` (letter `O`, not zero) interpret the locale’s alternative representation.|
406
-
|%Y, `%EY`| The year as a decimal number. If the result is less than four digits it is left-padded with 0 (zero) to four digits.<br>`%EY` produces the locale’s alternative full year representation. |
406
+
|`%C`, `%`*N*`C`, `%EC`| The century as a decimal number.<br>`%`*N*`C` specifies the maximum number of characters to read, for example, `%1N`. If `N`isn't specified, the default is 2. Leading zeroes are permitted but not required.<br>`%EC` interprets the locale’s alternative representation of the century. |
407
+
|`%y`, `%`*N*`y`, `%Ey`, `%Oy`| The last two decimal digits of the year. If the century isn't otherwise specified (for example, by using `%C`), values in the range `[69, 99]` are presumed to refer to the years 1969 to 1999, and values in the range `[00, 68]` are presumed to refer to the years 2000 to 2068.<br>Leading zeroes are permitted but not required.<br>`%Ey` and `%Oy` (letter `O`, not zero) interpret the locale’s alternative representation.|
408
+
|`%Y`, `%EY`| The year as a decimal number. If the result is fewer than four digits, it's left-padded with `0` (zero) to four digits.<br>`%EY` produces the locale’s alternative full year representation. |
407
409
408
410
### ISO 8601 week-based year
409
411
410
412
In ISO 8601, weeks begin with Monday. The first week of the year must include January 4 and include the first Thursday of the year.
|`%g`| The last two decimal digits of the ISO week-based year. If the result is a single digit, is prefixed by 0 (zero). |
415
-
|`%G`| The ISO week-based year as a decimal number. If the result is less than four digits, it is left-padded with 0 (zero) to four digits. |
416
-
|`%V`<br>`%OV`| The ISO week-based week number as a decimal number. If the result is a single digit, it is prefixed with 0 (zero).<br>`%OV` (letter `O`, not zero) produces the locale’s alternative representation |
416
+
|`%g`| The last two decimal digits of the ISO week-based year. If the result is a single digit, is prefixed by `0` (zero). |
417
+
|`%G`| The ISO week-based year as a decimal number. If the result is fewer than four digits, it's left-padded with `0` (zero) to four digits. |
418
+
|`%V`<br>`%OV`| The ISO week-based week number as a decimal number. If the result is a single digit, it's prefixed with `0` (zero).<br>`%OV` (letter `O`, not zero) produces the locale’s alternative representation |
417
419
418
420
### General
419
421
@@ -422,9 +424,9 @@ In ISO 8601, weeks begin with Monday. The first week of the year must include Ja
422
424
|`%%`| Matches the % character |
423
425
|`%c`<br>%Ec% | The locale’s date and time representation.<br>`%Ec` interprets the locale’s alternate date and time representation. |
424
426
|`%n`| Matches a new-line character |
425
-
|`%t`| Matches zero or one whitespace characters|
427
+
|`%t`| Matches zero or one whitespace character|
426
428
|`%z`<br>`%Ez%`<br>`%Oz`| The offset from UTC in the format `[+|-]hh[mm]`. For example, `-0430` refers to 4 hours 30 minutes behind UTC, and `04` refers to 4 hours ahead of UTC.<br>`%Ez` and `%Oz` (letter `O`, not zero) parse a `:` between the hours and minutes and render leading zeroes on the hour field optional: `[+|-]h[h][:mm]`. For example, `-04:30` refers to 4 hours 30 minutes behind UTC, and 4 refers to 4 hours ahead of UTC. |
427
-
| `%Z` | The time zone abbreviation or name. A single word is parsed. This word can only contain characters from the basic source character set that are alphanumeric, or one of `_`, `/`, `-’`, or `+`.
429
+
| `%Z` | The time zone abbreviation or name. A single word is parsed. This word can only contain alphanumeric characters from the basic source character set, or one of `_`, `/`, `-’`, or `+`.
428
430
429
431
*`d`*\
430
432
If the parse is successful, contains the parsed day when the function returns.
@@ -651,7 +653,8 @@ If `is_pm` is **`false`**, `make24` returns the 24-hour equivalent of *`h`* in t
@@ -21,21 +20,22 @@ Beginning in Visual Studio 2015, the implementation of `steady_clock` has change
21
20
22
21
### Classes
23
22
24
-
|Name|Description|
25
-
|-|-|
26
-
|[`duration` Class](../standard-library/duration-class.md)|Describes a type that holds a time interval.|
27
-
|[`time_point` Class](../standard-library/time-point-class.md)|Describes a type that represents a point in time.|
23
+
| Name | Description |
24
+
|--|--|
25
+
|[`duration` class](../standard-library/duration-class.md)| Describes a type that holds a time interval. |
26
+
|[`time_point` class](../standard-library/time-point-class.md)| Describes a type that represents a point in time. |
27
+
|[`time_zone` class](../standard-library/time-point-class.md)| Represents all time zone transitions for a specific geographic area. |
28
28
29
29
### Structs
30
30
31
-
|Name|Description|
32
-
|-|-|
33
-
|[`common_type`Structure](../standard-library/common-type-structure.md)|Describes specializations of class template [`common_type`](../standard-library/common-type-class.md) for instantiations of `duration` and `time_point`.|
34
-
|[`duration_values`Structure](../standard-library/duration-values-structure.md)|Provides specific values for the `duration` template parameter `Rep`.|
|[`steady_clock` struct](../standard-library/steady-clock-struct.md)|Represents a `steady` clock.|
37
-
|[`system_clock`Structure](../standard-library/system-clock-structure.md)|Represents a *`clock type`* that is based on the real-time clock of the system.|
38
-
|[`treat_as_floating_point`Structure](../standard-library/treat-as-floating-point-structure.md)|Specifies whether a type can be treated as a floating-point type.|
31
+
|Name|Description|
32
+
|--|--|
33
+
|[`common_type`struct](../standard-library/common-type-structure.md)|Describes specializations of class template [`common_type`](../standard-library/common-type-class.md) for instantiations of `duration` and `time_point`.|
34
+
|[`duration_values`struct](../standard-library/duration-values-structure.md)|Provides specific values for the `duration` template parameter `Rep`.|
|[`steady_clock` struct](../standard-library/steady-clock-struct.md)|Represents a `steady` clock.|
37
+
|[`system_clock`struct](../standard-library/system-clock-structure.md)|Represents a *`clock type`* that is based on the real-time clock of the system.|
38
+
|[`treat_as_floating_point`struct](../standard-library/treat-as-floating-point-structure.md)|Specifies whether a type can be treated as a floating-point type.|
0 commit comments