Skip to content

Commit

Permalink
Add United Kingdom's Whit Monday holidays for pre-1971 years (#1668)
Browse files Browse the repository at this point in the history
Co-authored-by: ~Jhellico <[email protected]>
  • Loading branch information
PPsyrius and KJhellico authored Feb 1, 2024
1 parent a7e62f0 commit 5506de9
Show file tree
Hide file tree
Showing 11 changed files with 227 additions and 0 deletions.
4 changes: 4 additions & 0 deletions holidays/countries/isle_of_man.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def _populate_public_holidays(self) -> None:
# Easter Monday
self._add_easter_monday("Easter Monday")

# Whit Monday.
if self._year <= 1970:
self._add_whit_monday("Whit Monday")

# Late Summer bank holiday (last Monday in August)
if self._year >= 1971:
self._add_holiday_last_mon_of_aug("Late Summer Bank Holiday")
Expand Down
28 changes: 28 additions & 0 deletions holidays/countries/united_kingdom.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
"""
References:
- https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom
- https://archive.org/details/treatiseonbanki00walk/page/334/mode/2up
- https://www.gov.uk/bank-holidays
- https://www.timeanddate.com/holidays/uk/
The Anniversary of the Battle of the Boyne bank holiday is proclaimed annually by the
Secretary of State for Northern Ireland.
In-Lieu observance was first provided in the Bank Holidays Extension Act 1875.
"""

country = "GB"
Expand All @@ -51,9 +57,15 @@ def __init__(self, *args, **kwargs):
InternationalHolidays.__init__(self)
StaticHolidays.__init__(self, UnitedKingdomStaticHolidays)
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
# Bank Holidays Extension Act 1875
kwargs.setdefault("observed_since", 1875)
super().__init__(*args, **kwargs)

def _populate_public_holidays(self) -> None:
# Bank Holidays Act 1871
if self._year <= 1871:
return None

# Good Friday
self._add_good_friday("Good Friday")

Expand Down Expand Up @@ -88,6 +100,10 @@ def _populate_public_holidays(self) -> None:
self._populate_subdiv_wls_public_holidays()

def _populate_subdiv_holidays(self):
# Bank Holidays Act 1871
if self._year <= 1871:
return None

if self.subdiv not in {"SCT", "Scotland"}:
# New Year's Day
if self._year >= 1975:
Expand All @@ -109,6 +125,10 @@ def _populate_subdiv_eng_public_holidays(self):
# Easter Monday
self._add_easter_monday("Easter Monday")

# Whit Monday.
if self._year <= 1970:
self._add_whit_monday("Whit Monday")

# Late Summer bank holiday (last Monday in August)
if self._year >= 1971:
self._add_holiday_last_mon_of_aug("Late Summer Bank Holiday")
Expand All @@ -121,6 +141,10 @@ def _populate_subdiv_nir_public_holidays(self):
# Easter Monday
self._add_easter_monday("Easter Monday")

# Whit Monday.
if self._year <= 1970:
self._add_whit_monday("Whit Monday")

# Battle of the Boyne
self._add_observed(self._add_holiday_jul_12("Battle of the Boyne"))

Expand Down Expand Up @@ -161,6 +185,10 @@ def _populate_subdiv_wls_public_holidays(self):
# Easter Monday
self._add_easter_monday("Easter Monday")

# Whit Monday.
if self._year <= 1970:
self._add_whit_monday("Whit Monday")

# Late Summer bank holiday (last Monday in August)
if self._year >= 1971:
self._add_holiday_last_mon_of_aug("Late Summer Bank Holiday")
Expand Down
21 changes: 21 additions & 0 deletions snapshots/countries/GB_ENG.json
Original file line number Diff line number Diff line change
@@ -1,96 +1,117 @@
{
"1950-04-07": "Good Friday",
"1950-04-10": "Easter Monday",
"1950-05-29": "Whit Monday",
"1950-12-25": "Christmas Day",
"1950-12-26": "Boxing Day",
"1951-03-23": "Good Friday",
"1951-03-26": "Easter Monday",
"1951-05-14": "Whit Monday",
"1951-12-25": "Christmas Day",
"1951-12-26": "Boxing Day",
"1952-04-11": "Good Friday",
"1952-04-14": "Easter Monday",
"1952-06-02": "Whit Monday",
"1952-12-25": "Christmas Day",
"1952-12-26": "Boxing Day",
"1953-04-03": "Good Friday",
"1953-04-06": "Easter Monday",
"1953-05-25": "Whit Monday",
"1953-12-25": "Christmas Day",
"1953-12-26": "Boxing Day",
"1953-12-28": "Boxing Day (observed)",
"1954-04-16": "Good Friday",
"1954-04-19": "Easter Monday",
"1954-06-07": "Whit Monday",
"1954-12-25": "Christmas Day",
"1954-12-26": "Boxing Day",
"1954-12-27": "Christmas Day (observed)",
"1954-12-28": "Boxing Day (observed)",
"1955-04-08": "Good Friday",
"1955-04-11": "Easter Monday",
"1955-05-30": "Whit Monday",
"1955-12-25": "Christmas Day",
"1955-12-26": "Boxing Day",
"1955-12-27": "Christmas Day (observed)",
"1956-03-30": "Good Friday",
"1956-04-02": "Easter Monday",
"1956-05-21": "Whit Monday",
"1956-12-25": "Christmas Day",
"1956-12-26": "Boxing Day",
"1957-04-19": "Good Friday",
"1957-04-22": "Easter Monday",
"1957-06-10": "Whit Monday",
"1957-12-25": "Christmas Day",
"1957-12-26": "Boxing Day",
"1958-04-04": "Good Friday",
"1958-04-07": "Easter Monday",
"1958-05-26": "Whit Monday",
"1958-12-25": "Christmas Day",
"1958-12-26": "Boxing Day",
"1959-03-27": "Good Friday",
"1959-03-30": "Easter Monday",
"1959-05-18": "Whit Monday",
"1959-12-25": "Christmas Day",
"1959-12-26": "Boxing Day",
"1959-12-28": "Boxing Day (observed)",
"1960-04-15": "Good Friday",
"1960-04-18": "Easter Monday",
"1960-06-06": "Whit Monday",
"1960-12-25": "Christmas Day",
"1960-12-26": "Boxing Day",
"1960-12-27": "Christmas Day (observed)",
"1961-03-31": "Good Friday",
"1961-04-03": "Easter Monday",
"1961-05-22": "Whit Monday",
"1961-12-25": "Christmas Day",
"1961-12-26": "Boxing Day",
"1962-04-20": "Good Friday",
"1962-04-23": "Easter Monday",
"1962-06-11": "Whit Monday",
"1962-12-25": "Christmas Day",
"1962-12-26": "Boxing Day",
"1963-04-12": "Good Friday",
"1963-04-15": "Easter Monday",
"1963-06-03": "Whit Monday",
"1963-12-25": "Christmas Day",
"1963-12-26": "Boxing Day",
"1964-03-27": "Good Friday",
"1964-03-30": "Easter Monday",
"1964-05-18": "Whit Monday",
"1964-12-25": "Christmas Day",
"1964-12-26": "Boxing Day",
"1964-12-28": "Boxing Day (observed)",
"1965-04-16": "Good Friday",
"1965-04-19": "Easter Monday",
"1965-06-07": "Whit Monday",
"1965-12-25": "Christmas Day",
"1965-12-26": "Boxing Day",
"1965-12-27": "Christmas Day (observed)",
"1965-12-28": "Boxing Day (observed)",
"1966-04-08": "Good Friday",
"1966-04-11": "Easter Monday",
"1966-05-30": "Whit Monday",
"1966-12-25": "Christmas Day",
"1966-12-26": "Boxing Day",
"1966-12-27": "Christmas Day (observed)",
"1967-03-24": "Good Friday",
"1967-03-27": "Easter Monday",
"1967-05-15": "Whit Monday",
"1967-12-25": "Christmas Day",
"1967-12-26": "Boxing Day",
"1968-04-12": "Good Friday",
"1968-04-15": "Easter Monday",
"1968-06-03": "Whit Monday",
"1968-12-25": "Christmas Day",
"1968-12-26": "Boxing Day",
"1969-04-04": "Good Friday",
"1969-04-07": "Easter Monday",
"1969-05-26": "Whit Monday",
"1969-12-25": "Christmas Day",
"1969-12-26": "Boxing Day",
"1970-03-27": "Good Friday",
"1970-03-30": "Easter Monday",
"1970-05-18": "Whit Monday",
"1970-12-25": "Christmas Day",
"1970-12-26": "Boxing Day",
"1970-12-28": "Boxing Day (observed)",
Expand Down
21 changes: 21 additions & 0 deletions snapshots/countries/GB_NIR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@
"1950-03-17": "St. Patrick's Day",
"1950-04-07": "Good Friday",
"1950-04-10": "Easter Monday",
"1950-05-29": "Whit Monday",
"1950-07-12": "Battle of the Boyne",
"1950-12-25": "Christmas Day",
"1950-12-26": "Boxing Day",
"1951-03-17": "St. Patrick's Day",
"1951-03-19": "St. Patrick's Day (observed)",
"1951-03-23": "Good Friday",
"1951-03-26": "Easter Monday",
"1951-05-14": "Whit Monday",
"1951-07-12": "Battle of the Boyne",
"1951-12-25": "Christmas Day",
"1951-12-26": "Boxing Day",
"1952-03-17": "St. Patrick's Day",
"1952-04-11": "Good Friday",
"1952-04-14": "Easter Monday",
"1952-06-02": "Whit Monday",
"1952-07-12": "Battle of the Boyne",
"1952-07-14": "Battle of the Boyne (observed)",
"1952-12-25": "Christmas Day",
"1952-12-26": "Boxing Day",
"1953-03-17": "St. Patrick's Day",
"1953-04-03": "Good Friday",
"1953-04-06": "Easter Monday",
"1953-05-25": "Whit Monday",
"1953-07-12": "Battle of the Boyne",
"1953-07-13": "Battle of the Boyne (observed)",
"1953-12-25": "Christmas Day",
Expand All @@ -30,6 +34,7 @@
"1954-03-17": "St. Patrick's Day",
"1954-04-16": "Good Friday",
"1954-04-19": "Easter Monday",
"1954-06-07": "Whit Monday",
"1954-07-12": "Battle of the Boyne",
"1954-12-25": "Christmas Day",
"1954-12-26": "Boxing Day",
Expand All @@ -38,6 +43,7 @@
"1955-03-17": "St. Patrick's Day",
"1955-04-08": "Good Friday",
"1955-04-11": "Easter Monday",
"1955-05-30": "Whit Monday",
"1955-07-12": "Battle of the Boyne",
"1955-12-25": "Christmas Day",
"1955-12-26": "Boxing Day",
Expand All @@ -46,26 +52,30 @@
"1956-03-19": "St. Patrick's Day (observed)",
"1956-03-30": "Good Friday",
"1956-04-02": "Easter Monday",
"1956-05-21": "Whit Monday",
"1956-07-12": "Battle of the Boyne",
"1956-12-25": "Christmas Day",
"1956-12-26": "Boxing Day",
"1957-03-17": "St. Patrick's Day",
"1957-03-18": "St. Patrick's Day (observed)",
"1957-04-19": "Good Friday",
"1957-04-22": "Easter Monday",
"1957-06-10": "Whit Monday",
"1957-07-12": "Battle of the Boyne",
"1957-12-25": "Christmas Day",
"1957-12-26": "Boxing Day",
"1958-03-17": "St. Patrick's Day",
"1958-04-04": "Good Friday",
"1958-04-07": "Easter Monday",
"1958-05-26": "Whit Monday",
"1958-07-12": "Battle of the Boyne",
"1958-07-14": "Battle of the Boyne (observed)",
"1958-12-25": "Christmas Day",
"1958-12-26": "Boxing Day",
"1959-03-17": "St. Patrick's Day",
"1959-03-27": "Good Friday",
"1959-03-30": "Easter Monday",
"1959-05-18": "Whit Monday",
"1959-07-12": "Battle of the Boyne",
"1959-07-13": "Battle of the Boyne (observed)",
"1959-12-25": "Christmas Day",
Expand All @@ -74,33 +84,38 @@
"1960-03-17": "St. Patrick's Day",
"1960-04-15": "Good Friday",
"1960-04-18": "Easter Monday",
"1960-06-06": "Whit Monday",
"1960-07-12": "Battle of the Boyne",
"1960-12-25": "Christmas Day",
"1960-12-26": "Boxing Day",
"1960-12-27": "Christmas Day (observed)",
"1961-03-17": "St. Patrick's Day",
"1961-03-31": "Good Friday",
"1961-04-03": "Easter Monday",
"1961-05-22": "Whit Monday",
"1961-07-12": "Battle of the Boyne",
"1961-12-25": "Christmas Day",
"1961-12-26": "Boxing Day",
"1962-03-17": "St. Patrick's Day",
"1962-03-19": "St. Patrick's Day (observed)",
"1962-04-20": "Good Friday",
"1962-04-23": "Easter Monday",
"1962-06-11": "Whit Monday",
"1962-07-12": "Battle of the Boyne",
"1962-12-25": "Christmas Day",
"1962-12-26": "Boxing Day",
"1963-03-17": "St. Patrick's Day",
"1963-03-18": "St. Patrick's Day (observed)",
"1963-04-12": "Good Friday",
"1963-04-15": "Easter Monday",
"1963-06-03": "Whit Monday",
"1963-07-12": "Battle of the Boyne",
"1963-12-25": "Christmas Day",
"1963-12-26": "Boxing Day",
"1964-03-17": "St. Patrick's Day",
"1964-03-27": "Good Friday",
"1964-03-30": "Easter Monday",
"1964-05-18": "Whit Monday",
"1964-07-12": "Battle of the Boyne",
"1964-07-13": "Battle of the Boyne (observed)",
"1964-12-25": "Christmas Day",
Expand All @@ -109,6 +124,7 @@
"1965-03-17": "St. Patrick's Day",
"1965-04-16": "Good Friday",
"1965-04-19": "Easter Monday",
"1965-06-07": "Whit Monday",
"1965-07-12": "Battle of the Boyne",
"1965-12-25": "Christmas Day",
"1965-12-26": "Boxing Day",
Expand All @@ -117,33 +133,38 @@
"1966-03-17": "St. Patrick's Day",
"1966-04-08": "Good Friday",
"1966-04-11": "Easter Monday",
"1966-05-30": "Whit Monday",
"1966-07-12": "Battle of the Boyne",
"1966-12-25": "Christmas Day",
"1966-12-26": "Boxing Day",
"1966-12-27": "Christmas Day (observed)",
"1967-03-17": "St. Patrick's Day",
"1967-03-24": "Good Friday",
"1967-03-27": "Easter Monday",
"1967-05-15": "Whit Monday",
"1967-07-12": "Battle of the Boyne",
"1967-12-25": "Christmas Day",
"1967-12-26": "Boxing Day",
"1968-03-17": "St. Patrick's Day",
"1968-03-18": "St. Patrick's Day (observed)",
"1968-04-12": "Good Friday",
"1968-04-15": "Easter Monday",
"1968-06-03": "Whit Monday",
"1968-07-12": "Battle of the Boyne",
"1968-12-25": "Christmas Day",
"1968-12-26": "Boxing Day",
"1969-03-17": "St. Patrick's Day",
"1969-04-04": "Good Friday",
"1969-04-07": "Easter Monday",
"1969-05-26": "Whit Monday",
"1969-07-12": "Battle of the Boyne",
"1969-07-14": "Battle of the Boyne (observed)",
"1969-12-25": "Christmas Day",
"1969-12-26": "Boxing Day",
"1970-03-17": "St. Patrick's Day",
"1970-03-27": "Good Friday",
"1970-03-30": "Easter Monday",
"1970-05-18": "Whit Monday",
"1970-07-12": "Battle of the Boyne",
"1970-07-13": "Battle of the Boyne (observed)",
"1970-12-25": "Christmas Day",
Expand Down
Loading

0 comments on commit 5506de9

Please sign in to comment.