Creating Business Calendar

You can create business calendars both at runtime using a special visual editor, and at design time with annotated Java interfaces.

Creating Business Calendar at Runtime

After installing the add-on, open the Business calendars list view from the main menu.

business calendar list

Click Create to open the Business calendar editor.

business calendar editor

Provide these values:

  • Name – a human-readable description of the calendar.

  • Code – a unique identifier for the calendar.

Use the tabs in the editor to configure working days and hours, excluding non-working time such as holidays, vacations, and other time off.

Each calendar entry may include Mark — a value that can be used for categorization and to indicate why a day or time has different working hours. The mark is returned by the getDayInfo() methods.

Holidays

On the Holidays tab, click Create to add holidays and weekends.

Supported holiday types:

  • Day of week – marks selected weekdays as holidays. For example, Saturday and Sunday can be set as weekends.

  • Specific date holiday – marks an exact date as a holiday.

  • Annual holiday – marks a holiday that recurs on the same date every year, such as New Year’s Day.

  • Cron-based holiday – defines holidays using quartz CRON format. This is useful for more complex rules, such as the Third Friday of every month or the First Monday of July.

Working Schedule

On the Working schedule tab, set working hours for each day of the week. A day can contain multiple working periods, but they must not overlap.

Additional Business Days

On the Additional business days tab, define dates that must always be treated as business days. If one of these dates falls on a holiday, it is still considered a workday. You can also assign different working hours to it.

Creating Business Calendar at Design Time

Use an annotated Java interface to create a business calendar at design time. For example:

@BusinessCalendar(name = "Sample Business Calendar",
        code = "sample-business-calendar" ) (1)
public interface SampleBusinessCalendar {

    @CronHoliday(expression = "* * * 1-2 MAY ?", mark = "spring-holiday",
            description = "Early May public holidays") (2)
    @CronHoliday(expression = "* * * ? * 6#3", mark = "monthly-maintenance",
            description = "Scheduled maintenance on the third Saturday of each month")
    void cronHoliday();

    @WeeklyHoliday(value = DayOfWeek.SATURDAY, mark = "weekend",
            description = "Standard weekend day")
    @WeeklyHoliday(value = DayOfWeek.SUNDAY, mark = "weekend",
            description = "Standard weekend day") (3)
    void weeklyHolidays();

    @FixedDayHoliday(fixedDate = "2026-01-02", mark = "maintenance", description = "Scheduled maintenance") (4)
    @FixedDayHoliday(fixedDate = "2026-03-04", mark = "company-holiday", description = "Company day off")
    void fixedHoliday();

    @FixedYearlyHoliday(month = Month.NOVEMBER, dayOfMonth = 4, mark = "regional", description = "Annual regional holiday") (5)
    @FixedYearlyHoliday(month = Month.JUNE, dayOfMonth = 8, mark = "regional", description = "Annual regional holiday")
    void fixedYearlyHoliday();

    @ScheduledBusinessDay(dayOfWeek = DayOfWeek.MONDAY,
            startTime = "08:00", endTime = "17:00", mark = "regular-hours") (6)
    @ScheduledBusinessDay(dayOfWeek = DayOfWeek.WEDNESDAY,
            startTime = "09:00", endTime = "17:00", mark = "late-start")
    @ScheduledBusinessDay(dayOfWeek = DayOfWeek.FRIDAY,
            startTime = "10:00", endTime = "15:00", mark = "short-day")
    void scheduledBD();

    @AdditionalBusinessDay(fixedDate = "2026-05-06",
            startTime = "10:00", endTime = "16:30", mark = "holiday-shift") (7)
    @AdditionalBusinessDay(fixedDate = "2026-07-08",
            startTime = "10:00", endTime = "16:30", mark = "extra-workday")
    void additionalBD();
}
1 Design-time business calendar is a Java interface annotated with @BusinessCalendar. This annotation requires two parameters:
  • name – a human-readable description of a given calendar;

  • code – a unique identifier of a given calendar.

2 @CronHoliday defines holidays using Quartz CRON expressions. Useful for complex or recurring patterns. Use mark as a short tag. Add description to provide a human-readable explanation.
3 @WeeklyHoliday defines specific days of the week as holidays (e.g., weekends). Use mark as a short tag. Add description to provide a human-readable explanation.
4 @FixedDayHoliday defines holidays for specific dates. Use mark as a short tag. Add description to provide a human-readable explanation.
5 @FixedYearlyHoliday defines holiday that recur annually on the same date. Use mark as a short tag. Add description to provide a human-readable explanation.
6 @ScheduledBusinessDay sets regular working days, including start and end times. Use mark as a short tag.
7 AdditionalBusinessDay adds working days outside the regular schedule (e.g., shifted workdays). Use mark as a short tag.
A business calendar created at design time is displayed in the list of all business calendars but cannot be edited.
business calendars