Interface of classes relativizing time
public interface TimeManager
Graphs may mention time via either timed responses, which require follow-up actions in the future, or timed conditions, which impose a wait-period. In both cases we must add a TimeSpan to the current time of the graph.
In general, DCR applications need to be sensitive to working days, weekends, etc: A deadline of "5" will usually mean "within 5 working days". You specify exactly how to interpret that 5 by supplying a class that can add TimeSpan to DateTime, adjusting as necessary.
Implement this interface to, e.g., skip weekends. This operation is not expected to satisfy the usual arithmetic rules of addition; however, it must behave symmetrically on negative values.
Install your implementation by setting the property TimeManager.
Add an offset to a date
DateTime OffsetBy(DateTime date, TimeSpan delta)
Date to offset
Amount to offset the date (may be negative)
Offset date, skipping weekends and holidays as necessary