https://bugs.kde.org/show_bug.cgi?id=466899

--- Comment #1 from Natalie Clarius <natalie_clar...@yahoo.de> ---
I had the same thought, but haven't found a satisfactory solution.

This is all the valid short time formats (ignoring dates) across locales:

> 'Kl'. H.mm
> AP 'ga' h:mm
> AP h.mm
> AP h:mm
> APh:mm
> B H:mm
> H.mm
> H:m
> H:mm
> H:mm 'hodź'.
> H:mm 'ч'.
> HH 'h' mm
> HH.mm
> HH:mm
> HH:mm:ss
> h:mm AP
> hh:mm AP
> ཆུ་ཚོད་ h སྐར་མ་ mm AP

Note that these don't uniquely map to the possible strings, e.g. "h" means with
or without leading zero and "AP" is the A.M./P.M. affix to be spelled out. See
https://doc.qt.io/qt-6/qtime.html#toString.

Initially I tried with a regex, but that became monstrous rather quickly and
only introduces bugs like we already had in the night color KCM so I don't
think that's a viable alternative.

Iterating through all locales would be possible but costly performance-wise,
and would introduce problems with multiple valid interpretations of dates
(d/m/y vs m/d/y format).

We could settle on a few selected formats, like C, en_US and the system locale,
and hope that that covers most use cases.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to