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

Add a method to Range to detect overlap/intersection with another Range #14487

Open
jgaskins opened this issue Apr 15, 2024 · 0 comments · May be fixed by #15106
Open

Add a method to Range to detect overlap/intersection with another Range #14487

jgaskins opened this issue Apr 15, 2024 · 0 comments · May be fixed by #15106
Labels
good first issue This is an issue suited for newcomers to become aquianted with working on the codebase. help wanted This issue is generally accepted and needs someone to pick it up kind:feature topic:stdlib:collection

Comments

@jgaskins
Copy link
Contributor

The Range type doesn't currently tell you if it overlaps with another instance, but it's a useful thing to check for. For example, a scheduling app may need to detect whether a given time period conflicts with any existing meetings/events:

existing_events.any?(&.overlaps?(range))
@straight-shoota straight-shoota added good first issue This is an issue suited for newcomers to become aquianted with working on the codebase. help wanted This issue is generally accepted and needs someone to pick it up labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This is an issue suited for newcomers to become aquianted with working on the codebase. help wanted This issue is generally accepted and needs someone to pick it up kind:feature topic:stdlib:collection
Projects
None yet
3 participants