Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 29, 2024
2 parents 56322b0 + b131f2b commit 8a9f67d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions calendra/europe/united_kingdom.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class UnitedKingdom(WesternCalendar):
2012: [(date(2012, 6, 5), "Queen’s Diamond Jubilee"), ],
2022: [(date(2022, 6, 3), "Queen’s Platinum Jubilee bank holiday"),
(date(2022, 9, 19), "State Funeral of Queen Elizabeth II"), ],
2023: [
(date(2023, 5, 8), "Coronation of His Majesty King Charles III"),
],
}

def get_early_may_bank_holiday(self, year):
Expand Down
14 changes: 14 additions & 0 deletions calendra/tests/test_europe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,20 @@ def test_2022(self):
self.assertIn(date(2022, 12, 26), observed) # Boxing Day
self.assertIn(date(2022, 12, 27), observed) # Christmas Day

def test_2023(self):
holidays = self.cal.holidays_set(2023)
observed = self.cal.observed_holidays(2023)
self.assertIn(date(2023, 1, 2), observed) # New Year
self.assertIn(date(2023, 4, 7), holidays) # Good Friday
self.assertIn(date(2023, 4, 10), holidays) # Easter Monday
self.assertIn(date(2023, 5, 1), holidays) # Early May Bank Holiday
# Coronation of His Majesty King Charles III
self.assertIn(date(2023, 5, 8), holidays)
self.assertIn(date(2023, 5, 29), holidays) # Spring Bank Holidays
self.assertIn(date(2023, 8, 28), holidays) # Summer bank holiday
self.assertIn(date(2023, 12, 25), holidays) # Christmas Day
self.assertIn(date(2023, 12, 26), holidays) # Boxing Day


class UnitedKingdomNorthernIrelandTest(UnitedKingdomTest):
cal_class = UnitedKingdomNorthernIreland
Expand Down
1 change: 1 addition & 0 deletions newsfragments/+f26e376a.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Coronation of His Majesty King Charles III Bank holiday in 2023 to the UK calendar.

0 comments on commit 8a9f67d

Please sign in to comment.