DB::parseDateString
Tobias Leupold
tl at stonemx.de
Wed Apr 19 17:27:00 BST 2023
Am Mittwoch, 19. April 2023, 18:15:57 CEST schrieb josephj at main.nc.us:
> Using locale is a good idea.
>
> If you can get locale in bash, you can certainly get it anywhere else -
> even if you have to use an awkward external shell call. But that's
> something lots of applications need, so there must be convenient ways to
> get it in most languages.
Yeah, of course that would be no problem. E.g. using QLocale::dateFormat. I
didn't have had a look at the problem itself yet though ;-)
> I usually like the standard American dates, but often use y/m/d format
> because I can sort it as is without resorting to timestamp conversions.
> But that has nothing to do with KPA.
>
> Joe
>
> > (Somehow I managed to miss the switchover for the list...yeah, I'm a bit
> > out of date...)
> >
> > Just spotted this now...
> >
> > It appears that parseDateString assumes the European order (D-M-Y), which
> > is going to cause a lot of
> > confusion to the left of the puddle (e. g. one of the examples, 03-02-12,
> > would be interpreted as
> > March 2, 2012 in the US, not February 3). Perhaps there's some way to
> > look at the locale to decide
> > how to parse such?
> >
> > I personally prefer YYYY-MM-DD for everything, but I'm in the minority
> > there...
More information about the KPhotoAlbum
mailing list