The variability is specified by the inclusion of one or more lines, below the holiday's "default" name (the text on the first row of the holiday name textbox into the holiday name variation), which begin with >>> followed by one of the keywords, and equal sign and then the name to use if the keyword applies.
This code <hol>, placed anywhere on the right of the = sign, will be replaced with the text of the first line of the holiday.
In the example on the right, we have a holiday which lasts 2 days, always.
The <hol> on the right means that, on the second day, the <hol> is replaced by the first line of the holiday, "President's Day", and the holiday name is therefore "President's Day Holiday".
This code <DELETE>, placed alone on the right of the = sign, will delete the occurrence of the holiday that matches the keywords on the left.
In the example on the right, we have a holiday which has an extra day on the Monday, if its usual date falls on a Sunday. The <DUP> keyword corresponds to these Monday substitute, or day in lieu, holidays. The code <DELETE> on the right means that these Monday substitute occurrences should be deleted.
For advanced examples of the use of the <DELETE> code, see this topic.
Below is a list of the allowed keywords, and examples of their use:
For example, if Australia Day falls on a Sunday, then the following Monday is a public holiday in Australia but, of course, one would not call that day Australia Day. In the example here we chose to call it Australia Day Holiday.
Using <DELETE> as part of any holiday variation will ensure that dates covered by that variation are not generated. For example, using >>>DUP=<DELETE> on a holiday with Sunday duplicated on Monday would mean that the dates corresponding to these days in lieu are not generated.
It is also possible to specify that a different name variation should be used, depending on the weekday on which the duplicated holiday occurs, as shown below.
In the above example, we handle the fact that some Malaysian states observe a Friday-Saturday weekend, and some observe a Saturday-Sunday weekend, by changing the list of states that observe the day in lieu duplicated holiday.
Finally, it is possible to specify that a different name variation should be used, depending on the day of the month on which the duplicated holiday occurs, as shown below.
The BASE keyword specifies the name to use for the base date of a holiday which has been duplicated (see DUP option above).
In the example on the left, both the Boxing Day holiday and the 1st day of Stanley Races are set on December 26, except when December 26 is a Saturday, Sunday or Monday, in which case the Stanley Races move to the next working day (via the DUP keyword) while Boxing Day remains fixed on December 26 (via the BASE keyword).
For example, in Colombia the Saint Joseph Day bank holiday, normally on March 19, is moved to the nearest Monday if it falls on any other weekday, and in such cases calling that bank holiday as Saint Joseph Day would be wrong, so we use a holiday name variation to have its name changed to Saint Joseph's Day Holiday.
Just as is the case for the DUP keyword above, it is possible to specify that a different name variation should be used, depending on the weekday on which a holiday is moved to. It is also possible to specify that a different name variation should be used, depending on the day of the month to which the holiday is moved.
The DAY keyword is useful for multiple day events.
The DAY keyword, when followed by a number indicates that a specific variation of the name should occur on the specified day of a multi-day holiday (eg. DAY2 would apply to the second day only of a multi-day holiday).
The DAY keyword can also be followed by a tilde and a number to indicate that a specific variation of the name should occur on all days except the specified day of a multi-day holiday (eg. DAY~1 would apply to all days of a holiday except the first day).
When the keyword is a single digit from 1-7, then it specifies the name to use in the case of the holiday falling on a given day of the week (Monday=1, ..., Sunday=7).
In the example on the left, the holiday is a full day holiday when it falls on a Monday (>>>1), and is only a half-day afternoon holiday when it falls on a Friday (>>>5).
When the keyword is a double-digit from 01-31, then it specifies the name to use in the case of the holiday falling on a given day of the month (from 1-31).
In the example on the left, the holiday is observed on the 3rd Monday in August. But, as the anniversary being commemorated was August 17, we want to change the name when the holidays falls on the 17th of August.
special name in 2011
add "(tentative)" to the name for any year beginning with 2012
add a list of states to the name for the years 2011 to 2014, inclusively
observed in different regions depending if the year is a leap year or a common year
observed in Catalonia in leap years beginning on a Friday or common years beginning on a Saturday
the top 2 rules, having a suffix, take precedence over the bottom rule, when the holiday date is a Wednesday or a Friday
When the keyword is a four-digit from 2000-9999, then it specifies the name to use for all occurrences of a holiday in a given calendar year. In the example on the left, the holiday in 2011 is renamed as the 30th Anniversary of Independence, something that will only occur in 2011.
Range of years
You can specify a range of years using 2 dots (..) to separate the beginning year from the end year (eg. 2011..2014).
Minimum and maximum years
You can add a + or - to the 4 digits to indicate that the change occurs for the given year and all future years (eg. 2011+), or for the given year and all years before (eg. 2011-).
You can add the suffix L or C to a minimum year variation to specify that the variation is only applicable in leap years or common years (non-leap years), respectively.
For example, the variation 2024+L would only apply for leap years beginning in 2024, while the variation 2025+C would only apply to common years beginning in 2025.
You can also specify that a variation only occurs for leap year or common years that begin on a specific weekday (ie. January 1st of that year is a specific weekday). In the example on the left, beginning in 2023, Pentecost Monday is observed in Catalonia in leap years beginning on a Friday (2023+L5) or common years beginning on a Saturday (2023+C6).
Priority order for year variations
You can mix all of the above year variations, but you should keep in mind the following order of priority, which runs from most specific to most general.
If a holiday occurs on a date that matches more than one year variation, then Q++Studio will use the following priority order to decide which variation to use:
1.Specific year, such as 2025.
2.Range of specific years, such as 2022..2026.
3.Leap or common year beginning on a specific weekday, such as 2023+L5 or 2023+C6.
4.Leap or common year, such as 2023+L or 2023+C.
5.Minimum or maximum year range, such as 2025+ or 2020-.
6.The DEFAULT marker.
Finally note that a year variation with a suffix will have priority over a simple year variation, as shown in the example on the left, where 2023+_5 and 2023+_3 take precedence over 2023+ when the holiday date is a Wednesday or a Friday.
Any of the other name variation keywords can be added to any of the year variation keywords, separating them with an underscore. For example: 2011+_DUP or 2012_MOV or 2023+_30 or 2025+_28.
Use the DEFAULT keyword to specify the name of the holiday when none of the special cases apply.
In the example on the left, the use of the DEFAULT keyword allows us to remove the usual (except CT) from the name of the holiday, so that the 2010, 2014, 2015, and 2017 exceptions can use the <hol> token. Without the DEFAULT keyword entry, the full name of the holiday, minus the usual (except CT), would have had to be written out every line (for example >>>2017=Maundy Thursday (except CT VC) ).
In the example to the left, the DEFAULT entry is the very first one, and it makes sense, for the sake of legibility, to place it there, but there is no technical requirement that the DEFAULT entry should be the very first one; it can be placed in any position.
See also: variable abbreviations.
Topic 178620, last updated on 17-Mar-2023