Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

How to find if two intervals overlap?

224 0
cancel
Showing results for 
Search instead for 
Did you mean: 

I’m trying to check if users input intervals in a correct usable way for my script to handle an input.

I expect my users to write something like
4-50=£54, -4=£45, +50=£89

I’ve split up every part into an arrays.
And I have the following array I want to check if the ranges overlap
[“4-50”,"-4", “+50”]

Does anyone know the best way to check if any of the ranges overlap?

0 Replies 0