DB::parseDateString

josephj at main.nc.us josephj at main.nc.us
Wed Apr 19 17:15:57 BST 2023


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.

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