|Introduction: The Holidays family is a collection of functions that give the date of a particular holiday given the year. Currently the national holidays of the UK, USA, Canada and Australia are catered for (see List of Holidays for details). This diverse family of functions includes the following:|
- Holiday gives you the date of a particular holiday in a specified year, using the holiday number in the List of Holidays, so for example you can determine the date of Washingtons Birthday for any particular year. DescribeHol simply accepts a holiday number and tells you in words what that holiday is (useful as a check on the spreadsheet).
- WhatHol tells you in words what, if any, is the holiday of the specified date and business day convention (BusDaySwitch). So you can find out if a date is a Saturday, Sunday, or Bank Holiday directly. Similar to this there is IsHol, which simply tells you true or false whether a particular date is a holiday or not, again according to the specified business day convention. Even more basic is IsWE, which simply says whether a date is on a weekend or not (optionally allowing you to specify which days of the week are weekend days).
- WesternEaster is the only function for determining a specific holiday, using an established algorithm to calculate the date of Easter in a given year.
- CreateDate determines generically a holiday from first principles such as "3rd Friday in February", and indeed this function is used internally to generate the holidays specified by BusDaySwitch. It only has one compulsory variable, the YearOrDate in which you want to create the holiday date. Thereafter you can optionally specify the MonthInYearOpt and DayInMonthOpt. Then, the rules by which the date is determined are given. OccurrenceNo and DayinWeekOpt describes the part of a rule like "3rd Friday". Relativity provides the second part of the rule, whether it should be relative to the month start eg (3rd Friday in March), or relative to Easter (3rd Friday after Easter). The other parameters define the rest of the rule. FirstYear optionally specifies the first year where this date occurs, RecurringYrs how often it recurs, and MoveWeekend, whether the date moves forwards or back if it falls on a weekend.