v2
Changed the getDayOfYear function to exit early if not adjusting for DLS
Fixed a couple of the docstrings
Removed a couple unneeded properties and parameters
Changed a couple functions to methods
Users should still only need to use the Holidays function or Init a HolidayMetaData object if adding holidays.
Updated:
getDayOfYear(monthOfYear, dayOfMonth, weekOfMonth, dayOfWeek, lastOccurrenceInMonth, holiday)
Function gets the day of the year of a given holiday (1-366)
Parameters:
monthOfYear (int): `int` - The month of the year of the holiday.
dayOfMonth (int): `int` - The day of the month of the holiday.
weekOfMonth (int): `int` - The week of the month of the holiday.
dayOfWeek (int): `int` - The day of the week of the holiday.
lastOccurrenceInMonth (bool): `bool` - Flag indicating whether the holiday is the last occurrence of the day in the month.
holiday (string): `string` - The name of the holiday.
Returns: `int` - The day of the year of the holiday 1-366.
method buildMap(holidayMap, holiday, monthOfYear, weekOfMonth, dayOfWeek, dayOfMonth, lastOccurrenceInMonth)
Function to build the `holidaysMap`.
Namespace types: map<string, HolidayMetaData>
Parameters:
holidayMap (map<string, HolidayMetaData>): `map<string, HolidayMetaData>` - The map of holidays.
holiday (string): `string` - The name of the holiday.
monthOfYear (int): `int` - The month of the year of the holiday.
weekOfMonth (int): `int` - The week of the month of the holiday.
dayOfWeek (int): `int` - The day of the week of the holiday.
dayOfMonth (int): `int` - The day of the month of the holiday.
lastOccurrenceInMonth (bool): `bool` - Flag indicating whether the holiday is the last occurrence of the day in the month.
Returns: `map<string, HolidayMetaData>` - The updated map of holidays
HolidayMetaData
HolidayMetaData
Fields:
holiday (series string): `string` - The name of the holiday.
dayOfYear (series int): `int` - The day of the year of the holiday.
monthOfYear (series int): `int` - The month of the year of the holiday.
dayOfMonth (series int): `int` - The day of the month of the holiday.
weekOfMonth (series int): `int` - The week of the month of the holiday.
dayOfWeek (series int): `int` - The day of the week of the holiday.
lastOccurrenceInMonth (series bool)