Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Business calendar : Calculating the duration : Working hours for half-day holiday
 

Working hours for half-day holiday

For half-day holiday, the business hours are of two types:
*First-half holiday: Mid-day Break Start Time to Regular End Time.
*Second-half holiday: Regular Start Time to Mid-day Break End Time.
However, Mid-day Break hours are excluded while calculating the actual working hours.
For the first-half holiday, working hours are calculated as:
(Regular End Time - Half-day Start Time) minus (Mid-day Break End Time - Mid-day Break Start Time)
which works out to be (Regular End Time - Mid-day Break End Time)
For the second-half holiday, working hours are calculated as:
(Half-day End Time - Regular Start Time) minus (Mid-day Break End Time - Mid-day Break Start Time)
which works out to be (Mid-day Break Start Time - Regular Start Time)
Consider a calendar with:
*Regular Start Time: 09:00
*Regular End TIme: 18:00
*Mid-day Break Start Time: 13:00
*Mid-day Break End Time: 14:00
The Table 3 illustrates the use of Mid-day Break hours.
Table 3. Half-day working hours examples
Half-day Working Hours
Duration
Start Time
End Time
09:00
14:00
(14:00 - 09:00) - (14:00 - 13:00)
4 Hours
13:00
18:00
(18:00 - 13:00) - (14:00 - 13:00)
4 Hours