Calendars and Business Time
When we measure the time intervals, we should take into account the fact the business hours are different from the astronomical hours. The businesses operate on various calendars. For example, if a patient arrives in an emergency room at on Friday at 4pm and leaves on Monday at 4pm, he spends there 72 hours. However if the same happens to a mortgage application in a bank, we should say it was processes in just 8 hours (1 hour on Friday and 7 on Monday), assuming 9-5 working day. Moreover, the calendar could include the holidays, short days, even the snow days.
It’s important to remember the different parts of the same company could have different schedules. The billing department of an electric company works 9-5 M-F, however the technical support could be 24×7.
First, user should be able to define multiple calendars. We could have our standard approach with the list, edit, delete and new commands.\
A single calendar consists of a base and the list of the exceptions.
A base is defined as weekly schedule with start and end time for each day. The exceptions are the long (so we need a scroller) list:
Once user clicks on Edit or New:
If an event is already assigned to another calendar, we just display the other calendar name next to it. User could still check it to this calendar. That means overwrite its assignment.
Where it matters
There are several places in TimelinePI where the calendars affect the calculations.
The obvious places are:
- Time Interval Measurement panel
- Workflow time calculation
In both cases, we use the calendar of the “second” event for time calculations. If no calendar is assigned to the event, we use the astronomical time.