in reply to Schedule Optimization
DateTime::SpanSet may help you write the time functions, together with DateTime::Event::Recurrence. Although these modules don't provide all the logic you need, they do provide the basic operations.
A combination of the above
Results (150 votes). Check out past polls.