Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).