metomi / isodatetime

:date: :watch: Python ISO 8601 date time parser and data model/manipulation utilities
GNU Lesser General Public License v3.0
37 stars 20 forks source link

Ensure TimePoints are not init'd with out of bounds values #157

Closed MetRonnie closed 4 years ago

MetRonnie commented 4 years ago

Do not allow stuff like 2020-00-00 or 2020-13-32T25:61 or --02-30

but allow unbounded values if using TimePoint for datetime-like durations


Also:

Check for conflicting inputs e.g. illegally specifying both day_of_year and month_of_day|day_of_month.

Fix 1 or 2 unnoticed, minor TimePoint bugs


Plus:

Reorganise tests somewhat, because test_00.py is bloated. Move some data model tests to new test_01.py. However, a lot of the untouched tests are intertwined so moving them would result in cylic dependencies.

When reviewing I suggest first looking at the changes I made before reorganising the tests. Then look at the reorganisation of tests changes.