Subject: Re: bug#21229: 24.5; parse-time-string ignore PM/AM

From: Tino Calancha <[email-masked]>
Date: Wed, 12 Aug 2015 14:45:36 +0900 (JST)

At some point one decision (order to support) should be taken 
because MM DD need to be identified:
07-11, november 7th?
Maybe July 11th?

My propose is support
date +%F (%Y-%m-%d already in vanilla emacs)
and
date +%D (%m/%d/%y)

It is straightforward to extend my previous patch adding one rule to 
support:
%m/%d/%Y (%Y instead of %y)

I think that cover enough date formats.

I understand is hard to remember if %m/%d/%y or %d/%m/%y
is supported: the documentation string of parse-time-string should 
be updated to clearly point out what input strings are valid.

Tino

On Tue, 11 Aug 2015, Stefan Monnier wrote:

>>> It should be possible to add support for:
>>> "%m/%d/%y"
>> What about "%d/%m/%y"?
>
> Indeed.  I already bumped into such problems with parse-time-string
> where it seemed to return a completely bogus result until I realized
> that it picked a different ordering from the one I had.
>
> The problem exists for "a-b-c" as well, tho I can't remember ever seeing
> "YYYY-DD-MM" nor "MM-DD-YYYY" so if the year is spelled out as 4 digits,
> the "a-b-c" format is somewhat reliable (at least within my part of the
> world).
>
>
>        Stefan
>