strptime - dates formatted differently on different computers

Chris Angelico rosuav at gmail.com
Tue Dec 11 03:08:18 EST 2012


On Tue, Dec 11, 2012 at 4:34 PM, Michael Torrie <torriem at gmail.com> wrote:
> I use a module I got from pypi called dateutil.  It has a nice submodule
> called parser that can handle a variety of date formats with good
> accuracy.  Not sure how it works, but it handles all the common American
> date formats I've thrown at it.

That sort of statement will get you either amusement or ire, depending
on the respondent. From me, amusement, because there are enough
"common American date formats" for you to feel you've done a thorough
test.

There are a LOT more date formats than those used in the USA. The most
obvious trio is American MDY, European DMY, Japanese YMD, but there
are plenty more to deal with. Have fun.

ChrisA



More information about the Python-list mailing list