The temporal filter accepts objects with a strftime method (e.g Python's standard library date and datetime objects) or "ISO-8601 strings", but it doesn't accept all ISO-8601 strings and it doesn't handle non utc datetime objects.
This PR offers an enhancement that accepts ISO-8601 strings with reduced precision. A user can supply a year (e.g. party like it's "1999") or a month (e.g. "1963-12" ... what a night) and get a valid interpretation. As part of this implementation, the temporal filter knows to round-down the "date-from" and round-up the "date-to".
This PR also offers the enhancement of accepting strings or datetime objects that specify a timezone, and converts them to UTC for the CMR API.
The first commit is just a bit of housekeeping (poetry indicated the poetry.lock file was out of sync with pyproject.toml).
Closes #29
The temporal filter accepts objects with a
strftime
method (e.g Python's standard library date and datetime objects) or "ISO-8601 strings", but it doesn't accept all ISO-8601 strings and it doesn't handle non utc datetime objects.This PR offers an enhancement that accepts ISO-8601 strings with reduced precision. A user can supply a year (e.g. party like it's "1999") or a month (e.g. "1963-12" ... what a night) and get a valid interpretation. As part of this implementation, the temporal filter knows to round-down the "date-from" and round-up the "date-to".
This PR also offers the enhancement of accepting strings or datetime objects that specify a timezone, and converts them to UTC for the CMR API.
The first commit is just a bit of housekeeping (poetry indicated the poetry.lock file was out of sync with pyproject.toml).