Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-125321

Provide std::format support for Q(Date|Time)+ classes

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8.0 FF
    • Core: Date/Time
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cnn Qt Core & Network
            ivan.solovev Ivan Solovev
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes