--- alias: user-guide-generate-calendar-days description: "This documentation details generating calendar days based on existing calendar and shift definitions" --- # Generate Calendar Days :lock: CalendarDay.**Generate** ## Overview This operation is used to generate Calendar Days for a given **Calendar**, a vital operation for reporting purposes. ## Setup No specific setup is required other than to meet the preconditions of the transaction. ## Preconditions * The **Calendar** exists in the system. * A valid **ShiftDefinition** exists and is associated with the **Calendar**. ## Sequence of Steps To generate Calendar Days, follow the sequence: 1. Open the **Calendar**. 2. Change to the *Calendar Days* view. Notice the following color codes: ![non_working_days_legend][non_working_days_legend] * White - days are not created. * Grey - days are created and are non-working days. * Green - days are created and are working days. 3. Select one or more days from the **Calendar**, through mouse dragging in the Month view or by selecting single days separately. Information on the number of selected days can be seen in the right side panel. When one or more days are selected, press the *Generate* button on the top ribbon and the Generate Calendar Days wizard dialog will be opened. 4. Values for *Start Date* and *End Date* should match the days selected in the main **Calendar** page, along with the number of days. Both values can be changed to better suit the Calendar Day generation and the number of days should be displayed automatically. 5. Select whether the generation of *Calendar Days* will override existing ones, or if only *Calendar Days* that do not exist will be generated. 6. Check and optionally update the fiscal information for the Start Day (Starting Date) which is automatically calculated. Notice the following: * The Year increases every Calendar Fiscal Start Day; * Quarter is determined by the fiscal week. To whit: * 1-13 -> Q1 * 14-26 -> Q2 * 27-39 -> Q3 * \>= 40 -> Q4 (rolling over to one after fiscal month and fiscal week changes to *1*); * Month increases every time it reaches the 1st of the month (civil calendar) and resets to one when it reaches Calendar Fiscal Start Day * Week increases every Calendar Week Start Day and resets to one after Calendar Fiscal Start Day. * Working capacity takes the **Calendar** default Working Capacities. 7. If a Team Pattern exists for the start day, it's possible to define in which position the Team Pattern should be applied. Team Patterns are applied cyclically for each unique **Shift Definition**. 8. Optional, enter a comment. 9. Press **Generate** to complete the operation and the new *Calendar Days* will be created. ![generate_calendar_days][generate_calendar_days] [non_working_days_legend]: images/non_working_days_legend.png [generate_calendar_days]: images/generate_calendar_days.png