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:
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: