Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Business calendar : Business calendar tags : Non-working time tags
 

Non-working time tags

The non-working time can be lunch hour (Mid-day break), weekends, or holidays.

The lunch hour

An example of the lunch hour definition is shown below:
<lunch-hours start-time="1300" end-time="1400" />
The lunch hour are excluded while calculating the duration / due date.

Half-day holidays

Sometimes only the first half or the second half of the business day is a holiday.
The start time/end time of a half day is decided by the lunch hour. The start time of the lunch hour marks the starting of a half day holiday for the second half. And the end time of the lunch hour marks the end of a half-day holiday for the first half. The lunch hour are excluded while calculating the duration and the due date.
An example of the half-day holiday is shown below:
<holiday name="HalfDay" first-half="true" month="Jan" day="10" />
This example specifies the first half of 10th January as a half-day holiday. The attribute second-half="true" can be used to specify that the second half of the day is a half-day holiday.

Weekends

The weekends may be different across countries and across business entities. For example, a typical American weekend is Saturday and Sunday, while the Arabian Gulf Countries have Friday and Saturday as weekends. In some business sectors, the weekly off days are only Sundays, while some offices may have second and fourth Saturdays as weekend days besides all Sundays.
The weekend definition therefore has two attributes - dow (day-of-the-week) and occurrence.
*dow: The attribute dow defines the day of the week with the possible values—Sun, Mon, Tue, Wed, Thu, Fri, Sat, as per java.util.Calendar definitions.
*occurrence: The attribute occurrence defines which occurrence of the day is a holiday. The valid values are—first, second, third, fourth, fifth, all. The default value is "all", indicating that all occurrences of the specified day are holidays. The value "last" is not valid for the weekends. You can compare it with the attribute occurrence in the case of Fixed holidays.
An example of the weekend definition is shown below:
<week-end>
    <holiday name= dow= occurrence=/>
</week-end>
The holiday name acts as a label, and can be "Sunday" or any other suitable name. Some more examples of the weekend format are shown below.
*Only Sunday as the weekend day:
<week-end>
     <holiday name="Sunday" dow="Sun" />
</week-end>
*Both Sunday and Saturday as the weekend days:
<week-end>
        <holiday name="Sunday" dow="Sun" />
        <holiday name="Saturday" dow="Sat" />
        </week-end>
*All Sundays and the first Saturday of every month as the weekend days:
<week-end>
    <holiday name="Sunday" dow="Sun" />
    <holiday name="Saturday" dow="Sat" occurrence="first"/>
</week-end>
*All Sundays and the second and fourth Saturdays of every month as the weekend days:
<week-end>
    <holiday name="Sunday" dow="Sun" />
    <holiday name="Saturday" dow="Sat" occurrence="second"/>
    <holiday name="Saturday" dow="Sat" occurrence="fourth"/>
    </week-end>
Note: Some weekend holidays can be half-day holiday. Refer to Half-day holidays.
* Fixed holidays
* Year-specific holidays