Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatetimeInterval does not support open-ended intervals #97

Open
philvarner opened this issue Nov 8, 2024 · 2 comments
Open

DatetimeInterval does not support open-ended intervals #97

philvarner opened this issue Nov 8, 2024 · 2 comments

Comments

@philvarner
Copy link
Contributor

STAPI allows singly open-ended intervals in query (e.g., ../2024-04-23T00:00:00Z or 2024-04-23T00:00:00Z../), but the DatetimeInterval class only validates ISO8601 datetime values. Also, the validation of the datetime values should be revisited to ensure it's tightly allowing only RFC 3339 values instead of the broader class of ISO 8601 values. There is support for this more narrow validation in pystac that can be copied.

@c-wygoda
Copy link
Member

Isn't pystac also lenient on RFC339/ISO8601 using dateutil.parser.isoparse? https://github.com/stac-utils/pystac/blob/5b72d15f8245cdabe0126680f9dda673434bf525/pystac/utils.py#L397

@philvarner
Copy link
Contributor Author

ah, you're right, it is lenient. That part is probably fine then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants