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

Extend ISO 8601 support to include years BCE and > 9999 CE.

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.x
    • None
    • Core: Date/Time
    • None

    Description

      A 2019 update to ISO 8601 extended it to allow years outside the range from 0000 (1 BCE) to 9999; the year number, if it's not simply four digits, must start with a + or - sign and give all of its digits. Formally this only applies where both parties to the information exchange have agreed to it, and agreed the number of digits to use.
      It may thus make sense to introduce a third ISODate member to the time format enum, or to change how we handle ISO date formatting entirely, to an API with optional flags (for inclusion of milliseconds, extended years) and parameters (number of digits to give in extended years).
      However, on parsing, it makes sense to simply be liberal; and it may be adequate to simply stick with the enum members we have and handle formerly-out-of-range years with a sign and its minimal number of digits.

      Attachments

        Issue Links

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

          Activity

            People

              Eddy Edward Welbourne
              Eddy Edward Welbourne
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes