I am trying to build a tool that calculates something called quota based upon when employees are scheduled to work and when they request off.
My ShiftSet object is a set of Shift objects which consist of a StartTime and EndTime (both of type time(7). Each ShiftSet corresponds to a day.
ScheduleExceptions are times that an employee has off. There can be any number of overlapping or non-overlapping ScheduleExceptions in a day. They are of the datetime data type.
An example of a ShiftSet:
An example of ScheduleExceptions for that same day:
What I need to do is to find the amount of time that the employee is working on a day. The way I can figure to do this is to calculate the intersection of ShiftSet and the inverse of ScheduleExceptions.
How would I do this with time? I would prefer to use Linq if possible.