Created
August 25, 2014 15:44
-
-
Save DanielWJudge/a1a7bc94a7c8191e02f6 to your computer and use it in GitHub Desktop.
Time Period Final
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isTypeA) | |
{ | |
periodsToCheck.AddAll(typeAPeriods); | |
if (isTypeB) | |
{ | |
//find overlaps between type a and type b | |
periodsToCheck.AddAll(typeBPeriods); | |
overlapPeriods = periodCombiner.IntersectPeriods(periodsToCheck); | |
//reassign periods to check to the overlapping periods if we have to look at type C | |
periodsToCheck = (TimePeriodCollection) overlapPeriods; | |
} | |
if (isTypeC) | |
{ | |
//find overlaps between type a (and possibly type b) | |
periodsToCheck.AddAll(typeCPeriods); | |
overlapPeriods = periodCombiner.IntersectPeriods(periodsToCheck); | |
} | |
} | |
else | |
{ | |
//find overlaps for just type B and type C | |
periodsToCheck.AddAll(typeBPeriods); | |
periodsToCheck.AddAll(typeCPeriods); | |
overlapPeriods = periodCombiner.IntersectPeriods(periodsToCheck); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment