closeio/ciso8601

Incorrect parse for day = 0

movermeyer opened this issue · 2 comments

In [1]: import ciso8601

In [2]: ciso8601.parse_datetime('20140200')
Out[2]: datetime.datetime(2014, 2, 1)

Expected the parse to fail, since there is no day 0 (in any month, let alone February).
Instead it succeeds because of this line.

For what it's worth, I will be fixing this as part of my version 2 changes. I just wanted to have an issue to track.

Fixed in version 2.0.0 (#43).

Attempting to parse this incorrect timestamp now raises a ValueError.