Difference between revisions of "cpp/chrono/zoned time/formatter"
From cppreference.com
< cpp | chrono | zoned time
D41D8CD98F (Talk | contribs) (+) |
m (langlinks) |
||
Line 36: | Line 36: | ||
{{dsc inc | cpp/utility/format/dsc format}} | {{dsc inc | cpp/utility/format/dsc format}} | ||
{{dsc end}} | {{dsc end}} | ||
+ | |||
+ | {{langlinks|ja|zh}} |
Revision as of 04:51, 20 November 2019
Defined in header <chrono>
|
||
template<class Duration, class TimeZonePtr, class CharT> struct formatter<std::chrono::zoned_time<Duration, TimeZonePtr>, CharT> |
||
Specialization of std::formatter that defines formatting rules for a std::chrono::zoned_time.
This formatter uses std::chrono::local_time_format for formatting.
The parse
member is inherited from the base class.
Let tp
be the formatting argument, ctx
be the formatting context. The behavior of the format
member is equivalent to
auto info = tp.get_info(); return std::formatter<std::chrono::/*local-time-format-t*/>::format( std::local_time_format(tp.get_local_time(), &info.abbrev, &info.offset), ctx);
The std::formatter specialization is usually not directly accessed, but is used through formatting functions.
Format specification
Template:cpp/chrono/to stream format
Example
This section is incomplete Reason: no example |
See also
(C++20) |
stores formatted representation of the arguments in a new string (function template) |