Class template std::time_get
encapsulates date and time parsing rules. The I/O manipulator std::get_time uses the std::time_get
facet of the I/O stream's locale to convert text input to a std::tm object.
Inheritance diagram
If a std::time_get
specialization is not guaranteed to be provided by the standard library (see below), the behaviors of its member functions (except the constructor and destructor) are not guaranteed as specified.
The standard library is guaranteed to provide the following specializations (they are required to be implemented by any locale object):
std::time_get<char> parses narrow string representations of date and time std::time_get<wchar_t> parses wide string representations of date and timeIn addition, the standard library is also guaranteed to provide every specialization that satisfies the following type requirements:
CharT
is one of char and wchar_t, andInputIt
must meet the requirements of LegacyInputIterator.char_type
CharT
iter_type
InputIt
[edit] Data members [edit] Member functions [edit] Protected member functions obtains preferred ordering of day, month, and year
dateorder
date order enumeration type, defining the values no_order
, dmy
, mdy
, ymd
, and ydm
[edit] Example
Note: choose clang to observe the output. libstdc++ does not correctly implement the %b specifier: bug 78714.
Possible output:
[edit] See also formats contents of std::tm for output as character sequenceRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4