- changed status to resolved
Parsing ordinal dates should only allow day 366 for leap years
Issue #14
resolved
Currently, allowing day 366 succeeds for all dates.
>>> print aniso8601.parse_date('1981366')
1982-01-01
>>> print aniso8601.parse_date('1980366')
1980-12-31
The first should raise a ValueError
. From Wikipedia on ISO 8601 and ordinal dates: "[YYYY] indicates a year. [DDD] is the day of that year, from 001 through 365 (366 in leap years)"
Comments (1)
-
reporter - Log in to comment
Enforce ordinal day restrictions, fixes
#14→ <<cset 92e879d6fd08>>