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

QLocale::timeFormat(QLocale::NarrowFormat) returns seconds for some locales

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.9.2
    • None
    • All
    • 3
    • Foundation Sprint 139

      QLocale::NarrowFormat is a format for cases when space is very limited. So the docs read. However, for some locales, it includes seconds. As other locales evade them, I assume the seconds are non-essential and should be omitted everywhere when the format is used.

      Namely, the following languages return seconds in the Narrow format:

      • C
      • akk (Akkadian)
      • ase (American Sign Language)
      • egy (Ancient Egyptian)
      • grc (Ancient Greek)
      • arc (Aramaic)
      • av (Avaric)
      • ae (Avestan)
      • ay (Aymara)
      • ban (Balinese)
      • bax (Bamun)
      • bbc (Batak Toba)
      • bi (Bislama)
      • bug (Buginese)
      • ch (Chamorro)
      • cr (Cree)
      • fj (Fijian)
      • got (Gothic)
      • hz (Herero)
      • ho (Hiri Motu)
      • inh (Ingush)
      • ik (Inupiaq)
      • kr (Kanuri)
      • kv (Komi)
      • kg (Kongo)
      • kfo (Koro)
      • kj (Kuanyama)
      • lez (Lezghian)
      • li (Limburgish)
      • lzh (Literary Chinese)
      • man (Mandingo)
      • mh (Marshallese)
      • men (Mende)
      • na (Nauru)
      • ng (Ndonga)
      • new (Newari)
      • oj (Ojibwa)
      • sga (Old Irish)
      • non (Old Norse)
      • peo (Old Persian)
      • pal (Pahlavi)
      • pau (Palauan)
      • pi (Pali)
      • phn (Phoenician)
      • sm (Samoan)
      • saz (Saurashtra)
      • ty (Tahitian)
      • tkl (Tokelau)
      • tvl (Tuvalu)
      • uga (Ugaritic)
      • ik (Inupiaq)
      • kj (Kuanyama)

      The behavior is neither consistent nor optimal for a format named Narrow.


      As for the Documentation part, I'd like the docs to read what parts of the time representation a user will see in their locale. Not how, but what.

      Currently, the docs read the following:

      • LongFormat means a longer format,
      • ShortFormat means a shorter format.

      This explains next to nothing. Will there be TZ info? Seconds? Milliseconds? No clue. I have to test all locales to see.

      Should I create a separate issue for this?

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

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

              Created:
              Updated:

                There are no open Gerrit changes