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

How to implement intervals? #805

Open
ePaul opened this issue Apr 16, 2024 · 0 comments
Open

How to implement intervals? #805

ePaul opened this issue Apr 16, 2024 · 0 comments

Comments

@ePaul
Copy link
Member

ePaul commented Apr 16, 2024

Rule 127 describes intervals (i.e. a range of date-times, with some special open-ended ones), and suggests to use these with ..._between query parameters instead of a pair of ..._before and ..._after query parameters.

In the API guild meeting of 2024-04-16, we found that this is not quite easy to implement, e.g. the standard java.time API doesn't even has a type representing it and Joda time's Interval doesn't support open-ended intervals. Guava's Range<Instant> could work, but needs a manual parser. (Same issue likely exists for other languages.)

We should get a section in the best practices chapter giving some ideas of how to implement this (@tkrop mentioned an example (internal link)), or alternatively rethink this recommendation.

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

No branches or pull requests

2 participants