From e09487db50bca89c00a0ea27bf86d8300f5e361d Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Mon, 29 Jan 2024 21:00:06 +0200 Subject: [PATCH] Update Ireland holidays --- holidays/countries/ireland.py | 50 ++++--- snapshots/countries/IE_COMMON.json | 218 ++++++----------------------- tests/countries/test_ireland.py | 123 ++++++++-------- 3 files changed, 129 insertions(+), 262 deletions(-) diff --git a/holidays/countries/ireland.py b/holidays/countries/ireland.py index 9ef6cf781..2717224f9 100644 --- a/holidays/countries/ireland.py +++ b/holidays/countries/ireland.py @@ -9,35 +9,33 @@ # Website: https://github.com/dr-prodigy/python-holidays # License: MIT (see LICENSE file) -from holidays.calendars.gregorian import FEB, MAR +from holidays.calendars.gregorian import FEB, MAR, SEP, DEC from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays -from holidays.observed_holiday_base import ( - ObservedHolidayBase, - SAT_SUN_TO_NEXT_MON, - SAT_SUN_TO_NEXT_MON_TUE, -) +from holidays.holiday_base import HolidayBase -class Ireland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays): +class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays): """ - Official holidays in Ireland, as declared in the Citizen's Information - bulletin: - https://www.citizensinformation.ie/en/employment/employment_rights_and_conditions/leave_and_holidays/public_holidays_in_ireland.html + References: + - https://en.wikipedia.org/wiki/Public_holidays_in_the_Republic_of_Ireland + - https://www.citizensinformation.ie/en/employment/employment_rights_and_conditions/leave_and_holidays/public_holidays_in_ireland.html # noqa: E501 """ country = "IE" - observed_label = "%s (observed)" def __init__(self, *args, **kwargs): ChristianHolidays.__init__(self) InternationalHolidays.__init__(self) StaticHolidays.__init__(self, IrelandStaticHolidays) - kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON) super().__init__(*args, **kwargs) def _populate_public_holidays(self): + if self._year <= 1871: + return None + # New Year's Day. - self._add_new_years_day("New Year's Day") + if self._year >= 1975: + self._add_new_years_day("New Year's Day") # St. Brigid's Day. if self._year >= 2023: @@ -48,35 +46,39 @@ def _populate_public_holidays(self): self._add_holiday_1st_mon_from_feb_1(name) # St. Patrick's Day. - self._add_observed(self._add_holiday_mar_17("St. Patrick's Day")) + if self._year >= 1903: + self._add_holiday_mar_17("St. Patrick's Day") # Easter Monday. self._add_easter_monday("Easter Monday") # May Day. - if self._year >= 1978: + if self._year >= 1994: name = "May Day" if self._year == 1995: self._add_holiday_may_8(name) else: self._add_holiday_1st_mon_of_may(name) - # June Bank holiday. - self._add_holiday_1st_mon_of_jun("June Bank Holiday") + if self._year >= 1973: + # June Bank holiday. + self._add_holiday_1st_mon_of_jun("June Bank Holiday") + else: + # Whit Monday. + self._add_whit_monday("Whit Monday") - # Summer Bank holiday. + # August Bank holiday. self._add_holiday_1st_mon_of_aug("August Bank Holiday") # October Bank Holiday. - self._add_holiday_last_mon_of_oct("October Bank Holiday") + if self._year >= 1977: + self._add_holiday_last_mon_of_oct("October Bank Holiday") # Christmas Day. - self._add_observed(self._add_christmas_day("Christmas Day")) + self._add_christmas_day("Christmas Day") # St. Stephen's Day. - self._add_observed( - self._add_christmas_day_two("St. Stephen's Day"), rule=SAT_SUN_TO_NEXT_MON_TUE - ) + self._add_christmas_day_two("St. Stephen's Day") class IE(Ireland): @@ -89,5 +91,7 @@ class IRL(Ireland): class IrelandStaticHolidays: special_public_holidays = { + 1999: (DEC, 31, "Millennium Celebrations"), + 2011: (SEP, 14, "National Day of Mourning"), 2022: (MAR, 18, "Day of Remembrance and Recognition"), } diff --git a/snapshots/countries/IE_COMMON.json b/snapshots/countries/IE_COMMON.json index 8b440541f..eb2cb8aed 100644 --- a/snapshots/countries/IE_COMMON.json +++ b/snapshots/countries/IE_COMMON.json @@ -1,220 +1,152 @@ { - "1950-01-01": "New Year's Day", "1950-03-17": "St. Patrick's Day", "1950-04-10": "Easter Monday", - "1950-06-05": "June Bank Holiday", + "1950-05-29": "Whit Monday", "1950-08-07": "August Bank Holiday", - "1950-10-30": "October Bank Holiday", "1950-12-25": "Christmas Day", "1950-12-26": "St. Stephen's Day", - "1951-01-01": "New Year's Day", "1951-03-17": "St. Patrick's Day", - "1951-03-19": "St. Patrick's Day (observed)", "1951-03-26": "Easter Monday", - "1951-06-04": "June Bank Holiday", + "1951-05-14": "Whit Monday", "1951-08-06": "August Bank Holiday", - "1951-10-29": "October Bank Holiday", "1951-12-25": "Christmas Day", "1951-12-26": "St. Stephen's Day", - "1952-01-01": "New Year's Day", "1952-03-17": "St. Patrick's Day", "1952-04-14": "Easter Monday", - "1952-06-02": "June Bank Holiday", + "1952-06-02": "Whit Monday", "1952-08-04": "August Bank Holiday", - "1952-10-27": "October Bank Holiday", "1952-12-25": "Christmas Day", "1952-12-26": "St. Stephen's Day", - "1953-01-01": "New Year's Day", "1953-03-17": "St. Patrick's Day", "1953-04-06": "Easter Monday", - "1953-06-01": "June Bank Holiday", + "1953-05-25": "Whit Monday", "1953-08-03": "August Bank Holiday", - "1953-10-26": "October Bank Holiday", "1953-12-25": "Christmas Day", "1953-12-26": "St. Stephen's Day", - "1953-12-28": "St. Stephen's Day (observed)", - "1954-01-01": "New Year's Day", "1954-03-17": "St. Patrick's Day", "1954-04-19": "Easter Monday", - "1954-06-07": "June Bank Holiday", + "1954-06-07": "Whit Monday", "1954-08-02": "August Bank Holiday", - "1954-10-25": "October Bank Holiday", "1954-12-25": "Christmas Day", "1954-12-26": "St. Stephen's Day", - "1954-12-27": "Christmas Day (observed)", - "1954-12-28": "St. Stephen's Day (observed)", - "1955-01-01": "New Year's Day", "1955-03-17": "St. Patrick's Day", "1955-04-11": "Easter Monday", - "1955-06-06": "June Bank Holiday", + "1955-05-30": "Whit Monday", "1955-08-01": "August Bank Holiday", - "1955-10-31": "October Bank Holiday", "1955-12-25": "Christmas Day", - "1955-12-26": "Christmas Day (observed); St. Stephen's Day", - "1956-01-01": "New Year's Day", + "1955-12-26": "St. Stephen's Day", "1956-03-17": "St. Patrick's Day", - "1956-03-19": "St. Patrick's Day (observed)", "1956-04-02": "Easter Monday", - "1956-06-04": "June Bank Holiday", + "1956-05-21": "Whit Monday", "1956-08-06": "August Bank Holiday", - "1956-10-29": "October Bank Holiday", "1956-12-25": "Christmas Day", "1956-12-26": "St. Stephen's Day", - "1957-01-01": "New Year's Day", "1957-03-17": "St. Patrick's Day", - "1957-03-18": "St. Patrick's Day (observed)", "1957-04-22": "Easter Monday", - "1957-06-03": "June Bank Holiday", + "1957-06-10": "Whit Monday", "1957-08-05": "August Bank Holiday", - "1957-10-28": "October Bank Holiday", "1957-12-25": "Christmas Day", "1957-12-26": "St. Stephen's Day", - "1958-01-01": "New Year's Day", "1958-03-17": "St. Patrick's Day", "1958-04-07": "Easter Monday", - "1958-06-02": "June Bank Holiday", + "1958-05-26": "Whit Monday", "1958-08-04": "August Bank Holiday", - "1958-10-27": "October Bank Holiday", "1958-12-25": "Christmas Day", "1958-12-26": "St. Stephen's Day", - "1959-01-01": "New Year's Day", "1959-03-17": "St. Patrick's Day", "1959-03-30": "Easter Monday", - "1959-06-01": "June Bank Holiday", + "1959-05-18": "Whit Monday", "1959-08-03": "August Bank Holiday", - "1959-10-26": "October Bank Holiday", "1959-12-25": "Christmas Day", "1959-12-26": "St. Stephen's Day", - "1959-12-28": "St. Stephen's Day (observed)", - "1960-01-01": "New Year's Day", "1960-03-17": "St. Patrick's Day", "1960-04-18": "Easter Monday", - "1960-06-06": "June Bank Holiday", + "1960-06-06": "Whit Monday", "1960-08-01": "August Bank Holiday", - "1960-10-31": "October Bank Holiday", "1960-12-25": "Christmas Day", - "1960-12-26": "Christmas Day (observed); St. Stephen's Day", - "1961-01-01": "New Year's Day", + "1960-12-26": "St. Stephen's Day", "1961-03-17": "St. Patrick's Day", "1961-04-03": "Easter Monday", - "1961-06-05": "June Bank Holiday", + "1961-05-22": "Whit Monday", "1961-08-07": "August Bank Holiday", - "1961-10-30": "October Bank Holiday", "1961-12-25": "Christmas Day", "1961-12-26": "St. Stephen's Day", - "1962-01-01": "New Year's Day", "1962-03-17": "St. Patrick's Day", - "1962-03-19": "St. Patrick's Day (observed)", "1962-04-23": "Easter Monday", - "1962-06-04": "June Bank Holiday", + "1962-06-11": "Whit Monday", "1962-08-06": "August Bank Holiday", - "1962-10-29": "October Bank Holiday", "1962-12-25": "Christmas Day", "1962-12-26": "St. Stephen's Day", - "1963-01-01": "New Year's Day", "1963-03-17": "St. Patrick's Day", - "1963-03-18": "St. Patrick's Day (observed)", "1963-04-15": "Easter Monday", - "1963-06-03": "June Bank Holiday", + "1963-06-03": "Whit Monday", "1963-08-05": "August Bank Holiday", - "1963-10-28": "October Bank Holiday", "1963-12-25": "Christmas Day", "1963-12-26": "St. Stephen's Day", - "1964-01-01": "New Year's Day", "1964-03-17": "St. Patrick's Day", "1964-03-30": "Easter Monday", - "1964-06-01": "June Bank Holiday", + "1964-05-18": "Whit Monday", "1964-08-03": "August Bank Holiday", - "1964-10-26": "October Bank Holiday", "1964-12-25": "Christmas Day", "1964-12-26": "St. Stephen's Day", - "1964-12-28": "St. Stephen's Day (observed)", - "1965-01-01": "New Year's Day", "1965-03-17": "St. Patrick's Day", "1965-04-19": "Easter Monday", - "1965-06-07": "June Bank Holiday", + "1965-06-07": "Whit Monday", "1965-08-02": "August Bank Holiday", - "1965-10-25": "October Bank Holiday", "1965-12-25": "Christmas Day", "1965-12-26": "St. Stephen's Day", - "1965-12-27": "Christmas Day (observed)", - "1965-12-28": "St. Stephen's Day (observed)", - "1966-01-01": "New Year's Day", "1966-03-17": "St. Patrick's Day", "1966-04-11": "Easter Monday", - "1966-06-06": "June Bank Holiday", + "1966-05-30": "Whit Monday", "1966-08-01": "August Bank Holiday", - "1966-10-31": "October Bank Holiday", "1966-12-25": "Christmas Day", - "1966-12-26": "Christmas Day (observed); St. Stephen's Day", - "1967-01-01": "New Year's Day", + "1966-12-26": "St. Stephen's Day", "1967-03-17": "St. Patrick's Day", "1967-03-27": "Easter Monday", - "1967-06-05": "June Bank Holiday", + "1967-05-15": "Whit Monday", "1967-08-07": "August Bank Holiday", - "1967-10-30": "October Bank Holiday", "1967-12-25": "Christmas Day", "1967-12-26": "St. Stephen's Day", - "1968-01-01": "New Year's Day", "1968-03-17": "St. Patrick's Day", - "1968-03-18": "St. Patrick's Day (observed)", "1968-04-15": "Easter Monday", - "1968-06-03": "June Bank Holiday", + "1968-06-03": "Whit Monday", "1968-08-05": "August Bank Holiday", - "1968-10-28": "October Bank Holiday", "1968-12-25": "Christmas Day", "1968-12-26": "St. Stephen's Day", - "1969-01-01": "New Year's Day", "1969-03-17": "St. Patrick's Day", "1969-04-07": "Easter Monday", - "1969-06-02": "June Bank Holiday", + "1969-05-26": "Whit Monday", "1969-08-04": "August Bank Holiday", - "1969-10-27": "October Bank Holiday", "1969-12-25": "Christmas Day", "1969-12-26": "St. Stephen's Day", - "1970-01-01": "New Year's Day", "1970-03-17": "St. Patrick's Day", "1970-03-30": "Easter Monday", - "1970-06-01": "June Bank Holiday", + "1970-05-18": "Whit Monday", "1970-08-03": "August Bank Holiday", - "1970-10-26": "October Bank Holiday", "1970-12-25": "Christmas Day", "1970-12-26": "St. Stephen's Day", - "1970-12-28": "St. Stephen's Day (observed)", - "1971-01-01": "New Year's Day", "1971-03-17": "St. Patrick's Day", "1971-04-12": "Easter Monday", - "1971-06-07": "June Bank Holiday", + "1971-05-31": "Whit Monday", "1971-08-02": "August Bank Holiday", - "1971-10-25": "October Bank Holiday", "1971-12-25": "Christmas Day", "1971-12-26": "St. Stephen's Day", - "1971-12-27": "Christmas Day (observed)", - "1971-12-28": "St. Stephen's Day (observed)", - "1972-01-01": "New Year's Day", "1972-03-17": "St. Patrick's Day", "1972-04-03": "Easter Monday", - "1972-06-05": "June Bank Holiday", + "1972-05-22": "Whit Monday", "1972-08-07": "August Bank Holiday", - "1972-10-30": "October Bank Holiday", "1972-12-25": "Christmas Day", "1972-12-26": "St. Stephen's Day", - "1973-01-01": "New Year's Day", "1973-03-17": "St. Patrick's Day", - "1973-03-19": "St. Patrick's Day (observed)", "1973-04-23": "Easter Monday", "1973-06-04": "June Bank Holiday", "1973-08-06": "August Bank Holiday", - "1973-10-29": "October Bank Holiday", "1973-12-25": "Christmas Day", "1973-12-26": "St. Stephen's Day", - "1974-01-01": "New Year's Day", "1974-03-17": "St. Patrick's Day", - "1974-03-18": "St. Patrick's Day (observed)", "1974-04-15": "Easter Monday", "1974-06-03": "June Bank Holiday", "1974-08-05": "August Bank Holiday", - "1974-10-28": "October Bank Holiday", "1974-12-25": "Christmas Day", "1974-12-26": "St. Stephen's Day", "1975-01-01": "New Year's Day", @@ -222,7 +154,6 @@ "1975-03-31": "Easter Monday", "1975-06-02": "June Bank Holiday", "1975-08-04": "August Bank Holiday", - "1975-10-27": "October Bank Holiday", "1975-12-25": "Christmas Day", "1975-12-26": "St. Stephen's Day", "1976-01-01": "New Year's Day", @@ -230,11 +161,8 @@ "1976-04-19": "Easter Monday", "1976-06-07": "June Bank Holiday", "1976-08-02": "August Bank Holiday", - "1976-10-25": "October Bank Holiday", "1976-12-25": "Christmas Day", "1976-12-26": "St. Stephen's Day", - "1976-12-27": "Christmas Day (observed)", - "1976-12-28": "St. Stephen's Day (observed)", "1977-01-01": "New Year's Day", "1977-03-17": "St. Patrick's Day", "1977-04-11": "Easter Monday", @@ -242,11 +170,10 @@ "1977-08-01": "August Bank Holiday", "1977-10-31": "October Bank Holiday", "1977-12-25": "Christmas Day", - "1977-12-26": "Christmas Day (observed); St. Stephen's Day", + "1977-12-26": "St. Stephen's Day", "1978-01-01": "New Year's Day", "1978-03-17": "St. Patrick's Day", "1978-03-27": "Easter Monday", - "1978-05-01": "May Day", "1978-06-05": "June Bank Holiday", "1978-08-07": "August Bank Holiday", "1978-10-30": "October Bank Holiday", @@ -254,9 +181,7 @@ "1978-12-26": "St. Stephen's Day", "1979-01-01": "New Year's Day", "1979-03-17": "St. Patrick's Day", - "1979-03-19": "St. Patrick's Day (observed)", "1979-04-16": "Easter Monday", - "1979-05-07": "May Day", "1979-06-04": "June Bank Holiday", "1979-08-06": "August Bank Holiday", "1979-10-29": "October Bank Holiday", @@ -265,7 +190,6 @@ "1980-01-01": "New Year's Day", "1980-03-17": "St. Patrick's Day", "1980-04-07": "Easter Monday", - "1980-05-05": "May Day", "1980-06-02": "June Bank Holiday", "1980-08-04": "August Bank Holiday", "1980-10-27": "October Bank Holiday", @@ -274,38 +198,30 @@ "1981-01-01": "New Year's Day", "1981-03-17": "St. Patrick's Day", "1981-04-20": "Easter Monday", - "1981-05-04": "May Day", "1981-06-01": "June Bank Holiday", "1981-08-03": "August Bank Holiday", "1981-10-26": "October Bank Holiday", "1981-12-25": "Christmas Day", "1981-12-26": "St. Stephen's Day", - "1981-12-28": "St. Stephen's Day (observed)", "1982-01-01": "New Year's Day", "1982-03-17": "St. Patrick's Day", "1982-04-12": "Easter Monday", - "1982-05-03": "May Day", "1982-06-07": "June Bank Holiday", "1982-08-02": "August Bank Holiday", "1982-10-25": "October Bank Holiday", "1982-12-25": "Christmas Day", "1982-12-26": "St. Stephen's Day", - "1982-12-27": "Christmas Day (observed)", - "1982-12-28": "St. Stephen's Day (observed)", "1983-01-01": "New Year's Day", "1983-03-17": "St. Patrick's Day", "1983-04-04": "Easter Monday", - "1983-05-02": "May Day", "1983-06-06": "June Bank Holiday", "1983-08-01": "August Bank Holiday", "1983-10-31": "October Bank Holiday", "1983-12-25": "Christmas Day", - "1983-12-26": "Christmas Day (observed); St. Stephen's Day", + "1983-12-26": "St. Stephen's Day", "1984-01-01": "New Year's Day", "1984-03-17": "St. Patrick's Day", - "1984-03-19": "St. Patrick's Day (observed)", "1984-04-23": "Easter Monday", - "1984-05-07": "May Day", "1984-06-04": "June Bank Holiday", "1984-08-06": "August Bank Holiday", "1984-10-29": "October Bank Holiday", @@ -313,9 +229,7 @@ "1984-12-26": "St. Stephen's Day", "1985-01-01": "New Year's Day", "1985-03-17": "St. Patrick's Day", - "1985-03-18": "St. Patrick's Day (observed)", "1985-04-08": "Easter Monday", - "1985-05-06": "May Day", "1985-06-03": "June Bank Holiday", "1985-08-05": "August Bank Holiday", "1985-10-28": "October Bank Holiday", @@ -324,7 +238,6 @@ "1986-01-01": "New Year's Day", "1986-03-17": "St. Patrick's Day", "1986-03-31": "Easter Monday", - "1986-05-05": "May Day", "1986-06-02": "June Bank Holiday", "1986-08-04": "August Bank Holiday", "1986-10-27": "October Bank Holiday", @@ -333,26 +246,22 @@ "1987-01-01": "New Year's Day", "1987-03-17": "St. Patrick's Day", "1987-04-20": "Easter Monday", - "1987-05-04": "May Day", "1987-06-01": "June Bank Holiday", "1987-08-03": "August Bank Holiday", "1987-10-26": "October Bank Holiday", "1987-12-25": "Christmas Day", "1987-12-26": "St. Stephen's Day", - "1987-12-28": "St. Stephen's Day (observed)", "1988-01-01": "New Year's Day", "1988-03-17": "St. Patrick's Day", "1988-04-04": "Easter Monday", - "1988-05-02": "May Day", "1988-06-06": "June Bank Holiday", "1988-08-01": "August Bank Holiday", "1988-10-31": "October Bank Holiday", "1988-12-25": "Christmas Day", - "1988-12-26": "Christmas Day (observed); St. Stephen's Day", + "1988-12-26": "St. Stephen's Day", "1989-01-01": "New Year's Day", "1989-03-17": "St. Patrick's Day", "1989-03-27": "Easter Monday", - "1989-05-01": "May Day", "1989-06-05": "June Bank Holiday", "1989-08-07": "August Bank Holiday", "1989-10-30": "October Bank Holiday", @@ -360,9 +269,7 @@ "1989-12-26": "St. Stephen's Day", "1990-01-01": "New Year's Day", "1990-03-17": "St. Patrick's Day", - "1990-03-19": "St. Patrick's Day (observed)", "1990-04-16": "Easter Monday", - "1990-05-07": "May Day", "1990-06-04": "June Bank Holiday", "1990-08-06": "August Bank Holiday", "1990-10-29": "October Bank Holiday", @@ -370,9 +277,7 @@ "1990-12-26": "St. Stephen's Day", "1991-01-01": "New Year's Day", "1991-03-17": "St. Patrick's Day", - "1991-03-18": "St. Patrick's Day (observed)", "1991-04-01": "Easter Monday", - "1991-05-06": "May Day", "1991-06-03": "June Bank Holiday", "1991-08-05": "August Bank Holiday", "1991-10-28": "October Bank Holiday", @@ -381,24 +286,19 @@ "1992-01-01": "New Year's Day", "1992-03-17": "St. Patrick's Day", "1992-04-20": "Easter Monday", - "1992-05-04": "May Day", "1992-06-01": "June Bank Holiday", "1992-08-03": "August Bank Holiday", "1992-10-26": "October Bank Holiday", "1992-12-25": "Christmas Day", "1992-12-26": "St. Stephen's Day", - "1992-12-28": "St. Stephen's Day (observed)", "1993-01-01": "New Year's Day", "1993-03-17": "St. Patrick's Day", "1993-04-12": "Easter Monday", - "1993-05-03": "May Day", "1993-06-07": "June Bank Holiday", "1993-08-02": "August Bank Holiday", "1993-10-25": "October Bank Holiday", "1993-12-25": "Christmas Day", "1993-12-26": "St. Stephen's Day", - "1993-12-27": "Christmas Day (observed)", - "1993-12-28": "St. Stephen's Day (observed)", "1994-01-01": "New Year's Day", "1994-03-17": "St. Patrick's Day", "1994-04-04": "Easter Monday", @@ -407,7 +307,7 @@ "1994-08-01": "August Bank Holiday", "1994-10-31": "October Bank Holiday", "1994-12-25": "Christmas Day", - "1994-12-26": "Christmas Day (observed); St. Stephen's Day", + "1994-12-26": "St. Stephen's Day", "1995-01-01": "New Year's Day", "1995-03-17": "St. Patrick's Day", "1995-04-17": "Easter Monday", @@ -419,7 +319,6 @@ "1995-12-26": "St. Stephen's Day", "1996-01-01": "New Year's Day", "1996-03-17": "St. Patrick's Day", - "1996-03-18": "St. Patrick's Day (observed)", "1996-04-08": "Easter Monday", "1996-05-06": "May Day", "1996-06-03": "June Bank Holiday", @@ -445,7 +344,6 @@ "1998-10-26": "October Bank Holiday", "1998-12-25": "Christmas Day", "1998-12-26": "St. Stephen's Day", - "1998-12-28": "St. Stephen's Day (observed)", "1999-01-01": "New Year's Day", "1999-03-17": "St. Patrick's Day", "1999-04-05": "Easter Monday", @@ -455,8 +353,7 @@ "1999-10-25": "October Bank Holiday", "1999-12-25": "Christmas Day", "1999-12-26": "St. Stephen's Day", - "1999-12-27": "Christmas Day (observed)", - "1999-12-28": "St. Stephen's Day (observed)", + "1999-12-31": "Millennium Celebrations", "2000-01-01": "New Year's Day", "2000-03-17": "St. Patrick's Day", "2000-04-24": "Easter Monday", @@ -468,7 +365,6 @@ "2000-12-26": "St. Stephen's Day", "2001-01-01": "New Year's Day", "2001-03-17": "St. Patrick's Day", - "2001-03-19": "St. Patrick's Day (observed)", "2001-04-16": "Easter Monday", "2001-05-07": "May Day", "2001-06-04": "June Bank Holiday", @@ -478,7 +374,6 @@ "2001-12-26": "St. Stephen's Day", "2002-01-01": "New Year's Day", "2002-03-17": "St. Patrick's Day", - "2002-03-18": "St. Patrick's Day (observed)", "2002-04-01": "Easter Monday", "2002-05-06": "May Day", "2002-06-03": "June Bank Holiday", @@ -504,8 +399,6 @@ "2004-10-25": "October Bank Holiday", "2004-12-25": "Christmas Day", "2004-12-26": "St. Stephen's Day", - "2004-12-27": "Christmas Day (observed)", - "2004-12-28": "St. Stephen's Day (observed)", "2005-01-01": "New Year's Day", "2005-03-17": "St. Patrick's Day", "2005-03-28": "Easter Monday", @@ -514,7 +407,7 @@ "2005-08-01": "August Bank Holiday", "2005-10-31": "October Bank Holiday", "2005-12-25": "Christmas Day", - "2005-12-26": "Christmas Day (observed); St. Stephen's Day", + "2005-12-26": "St. Stephen's Day", "2006-01-01": "New Year's Day", "2006-03-17": "St. Patrick's Day", "2006-04-17": "Easter Monday", @@ -526,7 +419,6 @@ "2006-12-26": "St. Stephen's Day", "2007-01-01": "New Year's Day", "2007-03-17": "St. Patrick's Day", - "2007-03-19": "St. Patrick's Day (observed)", "2007-04-09": "Easter Monday", "2007-05-07": "May Day", "2007-06-04": "June Bank Holiday", @@ -552,7 +444,6 @@ "2009-10-26": "October Bank Holiday", "2009-12-25": "Christmas Day", "2009-12-26": "St. Stephen's Day", - "2009-12-28": "St. Stephen's Day (observed)", "2010-01-01": "New Year's Day", "2010-03-17": "St. Patrick's Day", "2010-04-05": "Easter Monday", @@ -562,20 +453,18 @@ "2010-10-25": "October Bank Holiday", "2010-12-25": "Christmas Day", "2010-12-26": "St. Stephen's Day", - "2010-12-27": "Christmas Day (observed)", - "2010-12-28": "St. Stephen's Day (observed)", "2011-01-01": "New Year's Day", "2011-03-17": "St. Patrick's Day", "2011-04-25": "Easter Monday", "2011-05-02": "May Day", "2011-06-06": "June Bank Holiday", "2011-08-01": "August Bank Holiday", + "2011-09-14": "National Day of Mourning", "2011-10-31": "October Bank Holiday", "2011-12-25": "Christmas Day", - "2011-12-26": "Christmas Day (observed); St. Stephen's Day", + "2011-12-26": "St. Stephen's Day", "2012-01-01": "New Year's Day", "2012-03-17": "St. Patrick's Day", - "2012-03-19": "St. Patrick's Day (observed)", "2012-04-09": "Easter Monday", "2012-05-07": "May Day", "2012-06-04": "June Bank Holiday", @@ -585,7 +474,6 @@ "2012-12-26": "St. Stephen's Day", "2013-01-01": "New Year's Day", "2013-03-17": "St. Patrick's Day", - "2013-03-18": "St. Patrick's Day (observed)", "2013-04-01": "Easter Monday", "2013-05-06": "May Day", "2013-06-03": "June Bank Holiday", @@ -611,7 +499,6 @@ "2015-10-26": "October Bank Holiday", "2015-12-25": "Christmas Day", "2015-12-26": "St. Stephen's Day", - "2015-12-28": "St. Stephen's Day (observed)", "2016-01-01": "New Year's Day", "2016-03-17": "St. Patrick's Day", "2016-03-28": "Easter Monday", @@ -620,7 +507,7 @@ "2016-08-01": "August Bank Holiday", "2016-10-31": "October Bank Holiday", "2016-12-25": "Christmas Day", - "2016-12-26": "Christmas Day (observed); St. Stephen's Day", + "2016-12-26": "St. Stephen's Day", "2017-01-01": "New Year's Day", "2017-03-17": "St. Patrick's Day", "2017-04-17": "Easter Monday", @@ -632,7 +519,6 @@ "2017-12-26": "St. Stephen's Day", "2018-01-01": "New Year's Day", "2018-03-17": "St. Patrick's Day", - "2018-03-19": "St. Patrick's Day (observed)", "2018-04-02": "Easter Monday", "2018-05-07": "May Day", "2018-06-04": "June Bank Holiday", @@ -642,7 +528,6 @@ "2018-12-26": "St. Stephen's Day", "2019-01-01": "New Year's Day", "2019-03-17": "St. Patrick's Day", - "2019-03-18": "St. Patrick's Day (observed)", "2019-04-22": "Easter Monday", "2019-05-06": "May Day", "2019-06-03": "June Bank Holiday", @@ -659,7 +544,6 @@ "2020-10-26": "October Bank Holiday", "2020-12-25": "Christmas Day", "2020-12-26": "St. Stephen's Day", - "2020-12-28": "St. Stephen's Day (observed)", "2021-01-01": "New Year's Day", "2021-03-17": "St. Patrick's Day", "2021-04-05": "Easter Monday", @@ -669,8 +553,6 @@ "2021-10-25": "October Bank Holiday", "2021-12-25": "Christmas Day", "2021-12-26": "St. Stephen's Day", - "2021-12-27": "Christmas Day (observed)", - "2021-12-28": "St. Stephen's Day (observed)", "2022-01-01": "New Year's Day", "2022-03-17": "St. Patrick's Day", "2022-03-18": "Day of Remembrance and Recognition", @@ -680,7 +562,7 @@ "2022-08-01": "August Bank Holiday", "2022-10-31": "October Bank Holiday", "2022-12-25": "Christmas Day", - "2022-12-26": "Christmas Day (observed); St. Stephen's Day", + "2022-12-26": "St. Stephen's Day", "2023-01-01": "New Year's Day", "2023-02-06": "St. Brigid's Day", "2023-03-17": "St. Patrick's Day", @@ -694,7 +576,6 @@ "2024-01-01": "New Year's Day", "2024-02-05": "St. Brigid's Day", "2024-03-17": "St. Patrick's Day", - "2024-03-18": "St. Patrick's Day (observed)", "2024-04-01": "Easter Monday", "2024-05-06": "May Day", "2024-06-03": "June Bank Holiday", @@ -722,7 +603,6 @@ "2026-10-26": "October Bank Holiday", "2026-12-25": "Christmas Day", "2026-12-26": "St. Stephen's Day", - "2026-12-28": "St. Stephen's Day (observed)", "2027-01-01": "New Year's Day", "2027-02-01": "St. Brigid's Day", "2027-03-17": "St. Patrick's Day", @@ -733,8 +613,6 @@ "2027-10-25": "October Bank Holiday", "2027-12-25": "Christmas Day", "2027-12-26": "St. Stephen's Day", - "2027-12-27": "Christmas Day (observed)", - "2027-12-28": "St. Stephen's Day (observed)", "2028-01-01": "New Year's Day", "2028-02-07": "St. Brigid's Day", "2028-03-17": "St. Patrick's Day", @@ -748,7 +626,6 @@ "2029-01-01": "New Year's Day", "2029-02-05": "St. Brigid's Day", "2029-03-17": "St. Patrick's Day", - "2029-03-19": "St. Patrick's Day (observed)", "2029-04-02": "Easter Monday", "2029-05-07": "May Day", "2029-06-04": "June Bank Holiday", @@ -759,7 +636,6 @@ "2030-01-01": "New Year's Day", "2030-02-01": "St. Brigid's Day", "2030-03-17": "St. Patrick's Day", - "2030-03-18": "St. Patrick's Day (observed)", "2030-04-22": "Easter Monday", "2030-05-06": "May Day", "2030-06-03": "June Bank Holiday", @@ -787,8 +663,6 @@ "2032-10-25": "October Bank Holiday", "2032-12-25": "Christmas Day", "2032-12-26": "St. Stephen's Day", - "2032-12-27": "Christmas Day (observed)", - "2032-12-28": "St. Stephen's Day (observed)", "2033-01-01": "New Year's Day", "2033-02-07": "St. Brigid's Day", "2033-03-17": "St. Patrick's Day", @@ -798,7 +672,7 @@ "2033-08-01": "August Bank Holiday", "2033-10-31": "October Bank Holiday", "2033-12-25": "Christmas Day", - "2033-12-26": "Christmas Day (observed); St. Stephen's Day", + "2033-12-26": "St. Stephen's Day", "2034-01-01": "New Year's Day", "2034-02-06": "St. Brigid's Day", "2034-03-17": "St. Patrick's Day", @@ -812,7 +686,6 @@ "2035-01-01": "New Year's Day", "2035-02-05": "St. Brigid's Day", "2035-03-17": "St. Patrick's Day", - "2035-03-19": "St. Patrick's Day (observed)", "2035-03-26": "Easter Monday", "2035-05-07": "May Day", "2035-06-04": "June Bank Holiday", @@ -840,7 +713,6 @@ "2037-10-26": "October Bank Holiday", "2037-12-25": "Christmas Day", "2037-12-26": "St. Stephen's Day", - "2037-12-28": "St. Stephen's Day (observed)", "2038-01-01": "New Year's Day", "2038-02-01": "St. Brigid's Day", "2038-03-17": "St. Patrick's Day", @@ -851,8 +723,6 @@ "2038-10-25": "October Bank Holiday", "2038-12-25": "Christmas Day", "2038-12-26": "St. Stephen's Day", - "2038-12-27": "Christmas Day (observed)", - "2038-12-28": "St. Stephen's Day (observed)", "2039-01-01": "New Year's Day", "2039-02-07": "St. Brigid's Day", "2039-03-17": "St. Patrick's Day", @@ -862,11 +732,10 @@ "2039-08-01": "August Bank Holiday", "2039-10-31": "October Bank Holiday", "2039-12-25": "Christmas Day", - "2039-12-26": "Christmas Day (observed); St. Stephen's Day", + "2039-12-26": "St. Stephen's Day", "2040-01-01": "New Year's Day", "2040-02-06": "St. Brigid's Day", "2040-03-17": "St. Patrick's Day", - "2040-03-19": "St. Patrick's Day (observed)", "2040-04-02": "Easter Monday", "2040-05-07": "May Day", "2040-06-04": "June Bank Holiday", @@ -877,7 +746,6 @@ "2041-01-01": "New Year's Day", "2041-02-01": "St. Brigid's Day", "2041-03-17": "St. Patrick's Day", - "2041-03-18": "St. Patrick's Day (observed)", "2041-04-22": "Easter Monday", "2041-05-06": "May Day", "2041-06-03": "June Bank Holiday", @@ -905,7 +773,6 @@ "2043-10-26": "October Bank Holiday", "2043-12-25": "Christmas Day", "2043-12-26": "St. Stephen's Day", - "2043-12-28": "St. Stephen's Day (observed)", "2044-01-01": "New Year's Day", "2044-02-01": "St. Brigid's Day", "2044-03-17": "St. Patrick's Day", @@ -915,7 +782,7 @@ "2044-08-01": "August Bank Holiday", "2044-10-31": "October Bank Holiday", "2044-12-25": "Christmas Day", - "2044-12-26": "Christmas Day (observed); St. Stephen's Day", + "2044-12-26": "St. Stephen's Day", "2045-01-01": "New Year's Day", "2045-02-06": "St. Brigid's Day", "2045-03-17": "St. Patrick's Day", @@ -929,7 +796,6 @@ "2046-01-01": "New Year's Day", "2046-02-05": "St. Brigid's Day", "2046-03-17": "St. Patrick's Day", - "2046-03-19": "St. Patrick's Day (observed)", "2046-03-26": "Easter Monday", "2046-05-07": "May Day", "2046-06-04": "June Bank Holiday", @@ -940,7 +806,6 @@ "2047-01-01": "New Year's Day", "2047-02-01": "St. Brigid's Day", "2047-03-17": "St. Patrick's Day", - "2047-03-18": "St. Patrick's Day (observed)", "2047-04-15": "Easter Monday", "2047-05-06": "May Day", "2047-06-03": "June Bank Holiday", @@ -958,7 +823,6 @@ "2048-10-26": "October Bank Holiday", "2048-12-25": "Christmas Day", "2048-12-26": "St. Stephen's Day", - "2048-12-28": "St. Stephen's Day (observed)", "2049-01-01": "New Year's Day", "2049-02-01": "St. Brigid's Day", "2049-03-17": "St. Patrick's Day", @@ -969,8 +833,6 @@ "2049-10-25": "October Bank Holiday", "2049-12-25": "Christmas Day", "2049-12-26": "St. Stephen's Day", - "2049-12-27": "Christmas Day (observed)", - "2049-12-28": "St. Stephen's Day (observed)", "2050-01-01": "New Year's Day", "2050-02-07": "St. Brigid's Day", "2050-03-17": "St. Patrick's Day", @@ -980,5 +842,5 @@ "2050-08-01": "August Bank Holiday", "2050-10-31": "October Bank Holiday", "2050-12-25": "Christmas Day", - "2050-12-26": "Christmas Day (observed); St. Stephen's Day" + "2050-12-26": "St. Stephen's Day" } diff --git a/tests/countries/test_ireland.py b/tests/countries/test_ireland.py index 0f645d222..cbc944b52 100644 --- a/tests/countries/test_ireland.py +++ b/tests/countries/test_ireland.py @@ -18,16 +18,26 @@ class TestIreland(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): - super().setUpClass(Ireland, years=range(1950, 2050)) + super().setUpClass(Ireland, years=range(1900, 2050)) def test_country_aliases(self): self.assertAliases(Ireland, IE, IRL) + def test_no_holidays(self): + self.assertNoHolidays(Ireland(years=1871)) + def test_special_holidays(self): - self.assertHoliday("2022-03-18") + self.assertHoliday( + "1999-12-31", + "2011-09-14", + "2022-03-18", + ) def test_new_years_day(self): - self.assertHolidayName("New Year's Day", (f"{year}-01-01" for year in range(1950, 2050))) + name = "New Year's Day" + self.assertHolidayName(name, (f"{year}-01-01" for year in range(1975, 2050))) + self.assertNoHoliday(f"{year}-01-01" for year in range(1900, 1975)) + self.assertNoHolidayName(name, range(1900, 1975)) def test_st_brigids_day(self): name = "St. Brigid's Day" @@ -44,114 +54,106 @@ def test_st_brigids_day(self): "2031-02-03", "2032-02-02", ) - self.assertNoHolidayName(name, range(1950, 2023)) + self.assertNoHolidayName(name, range(1900, 2023)) def test_st_patricks_day(self): - self.assertHolidayName( - "St. Patrick's Day", (f"{year}-03-17" for year in range(1950, 2050)) - ) - obs_dt = ( - "2001-03-19", - "2002-03-18", - "2007-03-19", - "2012-03-19", - "2013-03-18", - "2018-03-19", - "2019-03-18", - ) - self.assertHoliday(obs_dt) - self.assertNoNonObservedHoliday(obs_dt) + name = "St. Patrick's Day" + self.assertHolidayName(name, (f"{year}-03-17" for year in range(1903, 2050))) + self.assertNoHoliday(f"{year}-03-17" for year in range(1900, 1903)) + self.assertNoHolidayName(name, range(1900, 1903)) def test_easter_monday(self): + name = "Easter Monday" self.assertHolidayName( - "Easter Monday", + name, "2019-04-22", "2020-04-13", "2021-04-05", "2022-04-18", "2023-04-10", ) + self.assertHolidayName(name, range(1900, 2050)) def test_may_day(self): name = "May Day" self.assertHolidayName( name, - "1978-05-01", - "1979-05-07", - "1980-05-05", + "1994-05-02", "1995-05-08", - "1999-05-03", - "2000-05-01", - "2010-05-03", - "2018-05-07", + "1996-05-06", "2019-05-06", "2020-05-04", + "2021-05-03", + "2022-05-02", + "2023-05-01", ) - self.assertNoHolidayName(name, range(1950, 1978)) + self.assertHolidayName(name, range(1994, 2050)) + self.assertNoHolidayName(name, range(1900, 1994)) def test_june_bank_holiday(self): + name = "June Bank Holiday" self.assertHolidayName( - "June Bank Holiday", + name, + "1973-06-04", "2019-06-03", "2020-06-01", "2021-06-07", "2022-06-06", "2023-06-05", ) + self.assertHolidayName(name, range(1973, 2050)) + self.assertNoHolidayName(name, range(1900, 1973)) + + def test_whit_monday(self): + name = "Whit Monday" + self.assertHolidayName( + name, + "1900-06-04", + "1910-05-16", + "1920-05-24", + "1930-06-09", + "1940-05-13", + "1950-05-29", + "1960-06-06", + "1970-05-18", + "1971-05-31", + "1972-05-22", + ) + self.assertHolidayName(name, range(1900, 1973)) + self.assertNoHolidayName(name, range(1973, 2050)) def test_august_bank_holiday(self): + name = "August Bank Holiday" self.assertHolidayName( - "August Bank Holiday", + name, "2019-08-05", "2020-08-03", "2021-08-02", "2022-08-01", "2023-08-07", ) + self.assertHolidayName(name, range(1900, 2050)) def test_october_bank_holiday(self): + name = "October Bank Holiday" self.assertHolidayName( - "October Bank Holiday", + name, "2019-10-28", "2020-10-26", "2021-10-25", "2022-10-31", "2023-10-30", ) + self.assertHolidayName(name, range(1977, 2050)) + self.assertNoHolidayName(name, range(1900, 1977)) def test_christmas_day(self): - name = "Christmas Day" - self.assertHolidayName(name, (f"{year}-12-25" for year in range(1950, 2050))) - obs_dt = ( - "1993-12-27", - "1999-12-27", - "2004-12-27", - "2010-12-27", - "2021-12-27", - ) - self.assertHoliday(obs_dt) - self.assertNoNonObservedHoliday(obs_dt) - self.assertHolidayName( - f"{name} (observed)", - "1994-12-26", - "2005-12-26", - "2011-12-26", - "2016-12-26", - "2022-12-26", - ) + self.assertHolidayName("Christmas Day", (f"{year}-12-25" for year in range(1900, 2050))) def test_st_stephens_day(self): - name = "St. Stephen's Day" - self.assertHolidayName(name, (f"{year}-12-26" for year in range(1950, 2050))) - obs_dt = ( - "2004-12-28", - "2009-12-28", - "2010-12-28", - "2015-12-28", - "2020-12-28", + self.assertHolidayName( + "St. Stephen's Day", (f"{year}-12-26" for year in range(1950, 2050)) ) - self.assertHoliday(obs_dt) - self.assertNoNonObservedHoliday(obs_dt) def test_2020(self): self.assertHolidays( @@ -165,7 +167,6 @@ def test_2020(self): ("2020-10-26", "October Bank Holiday"), ("2020-12-25", "Christmas Day"), ("2020-12-26", "St. Stephen's Day"), - ("2020-12-28", "St. Stephen's Day (observed)"), ) def test_2022(self): @@ -180,5 +181,5 @@ def test_2022(self): ("2022-08-01", "August Bank Holiday"), ("2022-10-31", "October Bank Holiday"), ("2022-12-25", "Christmas Day"), - ("2022-12-26", "Christmas Day (observed); St. Stephen's Day"), + ("2022-12-26", "St. Stephen's Day"), )