Details
-
User Story
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.0 FF
-
None
Description
C++20 already provides a bunch of std::formatter specializations for chrono types.
See the list of supported overloads here. Each formatter specialization defines a set of supported format specifiers.
QDateTime already support conversion to std::chrono::sys_time, so we can just use the respective formatter overload.
QDate is convertible to std::chrono::sys_days, and we probably need to convert it to std::chrono::year_month_day and use the respective formatter.
QTime does not have any conversions to std::chrono types, but std::chrono::hh_mm_ss and the related formatter look like a reasonable choice.