Ordering of Holidays

Navigation:  Appendices >

Ordering of Holidays

Previous pageReturn to chapter overviewNext page

When you generate holidays, Q++Studio creates a table of holidays occurrences (as opposed to holidays rules).


In the sample below, the first fields of the holidays database are displayed to show how holiday occurrences are ordered by Q++Studio, when multiple holidays and/or one-time dates occur on the same date and possibly even for the same holidays list.



The table of generated holidays is sorted as follows :


Date : The dates of the generated holidays occurrences are grouped together (a). This sorting criterion is of no importance for single-date holidays tokens such as [fa]..[fu], but it makes a difference for duration tokens such as [fa:m+00].

Counter : Then all occurrences of the Holidays Set counter value are grouped (b). This is the position, in the Holidays List, of the holidays set to which the holiday occurrence belongs to. This means that you are assured that, for example, a-holidays will appear in the order that Holidays Sets were listed in a-Holidays.

Priority : Occurrences of the same date and Holidays Set are then grouped by priority (c1 and c2), which is a property of each holiday rule and one-time-date, allowing you to define the order of appearance of multiple holidays on the same date.

OneTimeDate: In the rare case when 2 holidays occurrences have the same date, same counter (Holidays Set) and same priority, then the OneTimeDate criterion is used to display recurring holiday(s) first, and one-time-date(s) last (see c1 and c2).

Holiday_ID: Finally, in the even rarer case when the Date, the Counter, the Priority are the same (and we are dealing with all the same type of holiday (ie. Recurring Holidays or One-Time-Dates), then the determining criterion is the Holiday ID, which roughly corresponds to the chronological order in which the holidays were created.

Note that this date is saved as the number of days since December 30th 1899, which is an IT standard.

Topic 150500 updated on 03-May-2018.
Topic URL: https://www.qppstudio.net/webhelp/index.html?orderingofholidays.htm