PEP 321: Date/Time Parsing and Formatting

John Roth newsgroups at jhrothjr.com
Tue Nov 18 07:50:51 EST 2003


"Bengt Richter" <bokr at oz.net> wrote in message
news:bpc05s$3kp$0 at 216.39.172.122...
> On Mon, 17 Nov 2003 20:19:12 -0500, "John Roth" <newsgroups at jhrothjr.com>
wrote:
>
>
> Any order other than y-m-d is brain dead if you are going to sort on the
text.

I certainly agree, although I remember one project I worked on as a
contractor where the code woodenly went through two compares on
every date because they insisted on storing it the same way it was
displayed: mmddyy. (European conventional order (ddmmyy) requires
three tests, which may be why the ISO format is more popular in Europe.
I think.)

Of course, having a date object eliminates all of those issues...

John Roth

>
> Regards,
> Bengt Richter






More information about the Python-list mailing list