Group A
Start date: 1/1/2017
End date: 1/31/2017
Group B
Start date: 1/29/2017
End date: 2/4/2017
To find if date ranges(Group B dates fall in range within Group A dates) overlap or not, i can go with this:
If (GroupA.StartDate<= GroupB.EndDate && GroupB.StartDate<= GroupA.EndDate)
{
//Date in range - overlaps.
}
How do i get the list of the dates that don't overlap and don't fall in the range?
In the above example, i want to get back efficiently
1/29 - Yes
1/30 - Yes
1/31- Yes
2/1 - No
2/2 - No
2/3- No
2/4- No
Thanks in advance.