This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, ezio.melotti, ryles
Date 2010-06-06.02:07:42
SpamBayes Score 0.021965193
Marked as misclassified No
Message-id <1275790065.46.0.980893508963.issue5979@psf.upfronthosting.co.za>
In-reply-to
Content
Looks like a bug to me:

>>> datetime.strptime("1", "%d")
datetime.datetime(1900, 1, 1, 0, 0)

>>> datetime.strptime('1', '%m')
datetime.datetime(1900, 1, 1, 0, 0)

both %m and %d accept single digits but they should not.

>>> datetime.strptime('123', '%m%d')
datetime.datetime(1900, 12, 3, 0, 0)

>>> import this
..
In the face of ambiguity, refuse the temptation to guess.
History
Date User Action Args
2010-06-06 02:07:45belopolskysetrecipients: + belopolsky, ezio.melotti, ryles
2010-06-06 02:07:45belopolskysetmessageid: <1275790065.46.0.980893508963.issue5979@psf.upfronthosting.co.za>
2010-06-06 02:07:42belopolskylinkissue5979 messages
2010-06-06 02:07:42belopolskycreate