To check for overlap in two different dateranges, {Start1, End1} and {Start2, End2} I am checking:
if ((Start1 <= End2) && (End1 >= Start2))
{
//overlap exists
}
The question is,
what is a good way to compare overlaps if I had let’s say five dateranges?.
checking to see if any of them don’t overlap each other?
If I have multiple date ranges, how to find if any of these ranges are overlapping?
To find if all are overlapping
to find if any are overlapping