@@ -54,16 +54,16 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
5454 "Wales" : "WLS" ,
5555 }
5656 supported_languages = ("en_GB" , "en_US" , "th" )
57- _deprecated_subdivisions = ("UK" ,)
58- # Bank Holidays Act 1871
57+ # Bank Holidays Act 1871.
5958 start_year = 1872
59+ _deprecated_subdivisions = ("UK" ,)
6060
6161 def __init__ (self , * args , ** kwargs ):
6262 ChristianHolidays .__init__ (self )
6363 InternationalHolidays .__init__ (self )
6464 StaticHolidays .__init__ (self , UnitedKingdomStaticHolidays )
6565 kwargs .setdefault ("observed_rule" , SAT_SUN_TO_NEXT_MON )
66- # Bank Holidays Extension Act 1875
66+ # Bank Holidays Extension Act 1875.
6767 kwargs .setdefault ("observed_since" , 1875 )
6868 super ().__init__ (* args , ** kwargs )
6969
@@ -92,6 +92,17 @@ def _populate_public_holidays(self) -> None:
9292 else :
9393 self ._add_holiday_last_mon_of_may (name )
9494
95+ def _populate_common (self ):
96+ # Easter Monday.
97+ self ._add_easter_monday (tr ("Easter Monday" ))
98+
99+ if self ._year >= 1971 :
100+ # Late Summer Bank Holiday.
101+ self ._add_holiday_last_mon_of_aug (tr ("Late Summer Bank Holiday" ))
102+ else :
103+ # Whit Monday.
104+ self ._add_whit_monday (tr ("Whit Monday" ))
105+
95106 def _populate_subdiv_holidays (self ):
96107 if self .subdiv != "SCT" :
97108 if self ._year >= 1975 :
@@ -113,36 +124,18 @@ def _populate_subdiv_holidays(self):
113124 super ()._populate_subdiv_holidays ()
114125
115126 def _populate_subdiv_eng_public_holidays (self ):
116- # Easter Monday.
117- self ._add_easter_monday (tr ("Easter Monday" ))
118-
119- if self ._year <= 1970 :
120- # Whit Monday.
121- self ._add_whit_monday (tr ("Whit Monday" ))
122-
123- if self ._year >= 1971 :
124- # Late Summer Bank Holiday.
125- self ._add_holiday_last_mon_of_aug (tr ("Late Summer Bank Holiday" ))
127+ self ._populate_common ()
126128
127129 def _populate_subdiv_nir_public_holidays (self ):
130+ self ._populate_common ()
131+
128132 if self ._year >= 1903 :
129133 # Saint Patrick's Day.
130134 self ._add_observed (self ._add_saint_patricks_day (tr ("Saint Patrick's Day" )))
131135
132- # Easter Monday.
133- self ._add_easter_monday (tr ("Easter Monday" ))
134-
135- if self ._year <= 1970 :
136- # Whit Monday.
137- self ._add_whit_monday (tr ("Whit Monday" ))
138-
139136 # Battle of the Boyne.
140137 self ._add_observed (self ._add_holiday_jul_12 (tr ("Battle of the Boyne" )))
141138
142- if self ._year >= 1971 :
143- # Late Summer Bank Holiday.
144- self ._add_holiday_last_mon_of_aug (tr ("Late Summer Bank Holiday" ))
145-
146139 def _populate_subdiv_sct_public_holidays (self ):
147140 # New Year's Day.
148141 jan_1 = self ._add_new_years_day (tr ("New Year's Day" ))
@@ -175,16 +168,7 @@ def _populate_subdiv_sct_public_holidays(self):
175168 )
176169
177170 def _populate_subdiv_wls_public_holidays (self ):
178- # Easter Monday.
179- self ._add_easter_monday (tr ("Easter Monday" ))
180-
181- if self ._year <= 1970 :
182- # Whit Monday.
183- self ._add_whit_monday (tr ("Whit Monday" ))
184-
185- if self ._year >= 1971 :
186- # Late Summer Bank Holiday.
187- self ._add_holiday_last_mon_of_aug (tr ("Late Summer Bank Holiday" ))
171+ self ._populate_common ()
188172
189173
190174class UK (UnitedKingdom ):
0 commit comments