calendar calculation wrong for 2021
search cancel

calendar calculation wrong for 2021


Article ID: 203924


Updated On:


CA Automic Workload Automation - Automation Engine


The calculation of a calendar entry for a continuous date (period definition), at least two weeks apart, beyond the 2020/2021 annual limit, is not carried out correctly.

The error in the calendar calculation occurs at the turn of the year from 2020 to 2021.

There are 53 weeks in 2020. Every 7th year has 53 weeks.
The year 2021 has 52 weeks. A year usually has 52 weeks, e.g. at the year 2021, 2022, 2023.

The error occurs in a year with 53 calendar weeks (i.e. 2020). This only happens every seven years. In the following years (2021, 2022, 2023) the calculation across the annual limit is correct. These subsequent years only have 52 weeks each.

This behavior exists e.g. also for calendar entries with the event "Every 2 weeks", "Every 4 weeks", "Every 8 weeks".


Steps to reproduce (incl. expected/documented vs. actual behavior)

  • create a new CALE object
  • create a new entry - name it like 'every_other_friday'
  • define 'Friday' - 'every 2 week'
  • save
  • check selected days for january 2020, 2021 and 2022
    => Friday January 1st, 2021 is selected where it shouldn't




Release : 12.3



configuration of calendars and FIRST_WEEK_METHOD


This problem depends on the definition of the first week of the year.
This is controlled with the variables FIRST_WEEK_METHOD and FIRST_DAY_OF_WEEK in UC_CLIENT_SETTINGS.
The variable FIRST_DAY_OF_WEEK defines the first day of the week.
This variable is not important to our problem.
There are three possibilities how the first week of the year can be defined with FIRST_WEEK_METHOD:
1 - The week that includes January 1st
4 - The first week that includes at least 4 days of the new year
7 - The first week that includes 7 days of the new year

The default value is 4 which in this case was the definition in place.
There are only 3 days in the first week of January in 2021.
It is therefore not the first week of 2021 in the Automic system according to the FIRST_WEEK_METHOD variable.
The first week is the week between January 4th and 10th.
According to this information, the 1st and 15th of January will be selected.

to resolve this, the Variable FIRST_WEEK_METHOD needs to be set to 1.
Restart of the system is required after the changing of this variable.

Additional Information

Mor information on FIRST_WEEK_MEHTOD can be found here:

and here: