On 12/15/2009 10:30 AM, Tobias Weber wrote:
Hi, despite the directives for leading zero stime.strptime('09121', '%y%m%d') returns the first of December. Shouldn't it raise ValueError?Where do I get strict date parsing?
A bit hackish perhaps, but maybe you can check for the date's length: date = '09121' if len(date) == 6 and time.strptime(date, format): ... -- http://mail.python.org/mailman/listinfo/python-list