[Zope3-dev] datetimeutil.py for the rest of us
Martijn Faassen
faassen at infrae.com
Sun May 30 14:51:38 EDT 2004
Stuart Bishop wrote:
>
> - If an ambiguous datetime format is parsed, it assumes US format.
> I feel that this case should instead raise an exception.
> If US programmers insist on being able to write broken code,
> seperate US specific methods could be made available in
> datetimeutils.py or a seperate US centric module.
I strongly agree that the datetime parser should *not* try to make sense
of wrong data. If the format says mm-dd-yy and the date doesn't fit in
it as it's dd-mm-yy, it should fail, and verse versa. I'm not the only
one who has run into bugs (outside of Zope, mind) because people insist
of doing it the Perl way and guess at it, instead of doing it the Python
way and refusing to guess.
Regards,
Martijn
More information about the Zope3-dev
mailing list