template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
basic_string<charT, traits, Alloc>& abbrev);
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
minutes& offset);
from_stream(is, fmt.c_str(), tp, static_cast<basic_string<charT, traits, Alloc>*>(nullptr), &offset)
template<class charT, class traits, class Alloc, class Parsable>
unspecified
parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp,
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
Flag | Parsed value |
%a | The locale's full or abbreviated case-insensitive weekday name. |
%A | Equivalent to %a. |
%b | The locale's full or abbreviated case-insensitive month name. |
%B | Equivalent to %b. |
%c | The locale's date and time representation. The modified command %Ec interprets
the locale's alternate date and time representation. |
%C | The century as a decimal number. The modified command %NC specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %EC interprets
the locale's alternative representation of the century. |
%d | The day of the month as a decimal number. The modified command %Nd specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %Od interprets
the locale's alternative representation of the day of the month. |
%D | Equivalent to %m/%d/%y. |
%e | |
%F | Equivalent to %Y-%m-%d. |
%g | The last two decimal digits of the ISO week-based year. The modified command %Ng specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. |
%G | The ISO week-based year as a decimal number. The modified command %NG specifies
the maximum number of characters to read. If N is not specified, the default is 4. Leading zeroes are permitted but not required. |
%h | Equivalent to %b. |
%H | The hour (24-hour clock) as a decimal number. The modified command %NH specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %OH interprets
the locale's alternative representation. |
%I | The hour (12-hour clock) as a decimal number. The modified command %NI specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %OI
interprets the locale's alternative representation. |
%j | Otherwise,
the day of the year as a decimal number. Jan 1 is 1. In either case,
the modified command %Nj specifies
the maximum number of characters to read. If N is not specified, the default is 3. Leading zeroes are permitted but not required. |
%m | The month as a decimal number. Jan is 1. The modified command %Nm specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %Om interprets
the locale's alternative representation. |
%M | The minutes as a decimal number. The modified command %NM specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %OM interprets
the locale's alternative representation. |
%n | Matches one white space character. |
%p | The locale's equivalent of the AM/PM designations associated with a 12-hour clock. |
%r | The locale's 12-hour clock time. |
%R | Equivalent to %H:%M. |
%S | The seconds as a decimal number. The modified command %NS specifies
the maximum number of characters to read. If N is not specified,
the default is 2 if the input time has a precision convertible to seconds. Otherwise the default width is determined by
the decimal precision of the input
and the field is interpreted as a long double in a fixed format. If encountered, the locale determines the decimal point character. Leading zeroes are permitted but not required. The modified command %OS interprets
the locale's alternative representation. |
%t | Matches zero or one white space characters. |
%T | Equivalent to %H:%M:%S. |
%u | The modified command %Nu specifies
the maximum number of characters to read. Leading zeroes are permitted but not required. |
%U | 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. The modified command %NU specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %OU interprets
the locale's alternative representation. |
%V | The ISO week-based week number as a decimal number. The modified command %NV specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. |
%w | The modified command %Nw specifies
the maximum number of characters to read. Leading zeroes are permitted but not required. The modified command %Ow interprets
the locale's alternative representation. |
%W | 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. The modified command %NW specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command %OW interprets
the locale's alternative representation. |
%x | The locale's date representation. The modified command %Ex interprets the locale's alternate date representation. |
%X | The locale's time representation. The modified command %EX interprets the locale's alternate time representation. |
%y | The last two decimal digits of the year. If the century is not otherwise specified
(e.g. 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. The modified command %Ny specifies
the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. |
%Y | The year as a decimal number. The modified command %NY specifies
the maximum number of characters to read. If N is not specified, the default is 4. Leading zeroes are permitted but not required. The modified command %EY interprets
the locale's alternative representation. |
%z | The offset from UTC in the format [+|-]hh[mm]. The modified commands %Ez and %Oz
parse a : between the hours and minutes
and render leading zeroes on the hour field optional:
[+|-]h[h][:mm]. |
%Z | The time zone abbreviation or name. A single word is parsed. This word can only contain characters
from the basic source character set ([lex.charset])
that are alphanumeric, or one of
'_', '/', '-', or '+'. |
%% | A % character is extracted. |