diff --git a/holidays.py b/holidays.py index 1161c0de6..7d4e8c8e4 100755 --- a/holidays.py +++ b/holidays.py @@ -2243,8 +2243,12 @@ def _populate(self, year): weekday_delta = WE(-2) if base_data.weekday() == 2 else WE(-1) self[base_data + rd(weekday=weekday_delta)] = 'Buß- und Bettag' - if year >= 2019 and self.prov == 'BE': - self[date(year, MAR, 8)] = 'Internationaler Frauentag' + if (year >= 2019): + if self.prov == 'TH': + self[date(year, SEP, 20)] = 'Weltkindertag' + + if self.prov == 'BE': + self[date(year, MAR, 8)] = 'Internationaler Frauentag' self[date(year, DEC, 25)] = 'Erster Weihnachtstag' self[date(year, DEC, 26)] = 'Zweiter Weihnachtstag' diff --git a/tests.py b/tests.py index 097258044..37581ee73 100644 --- a/tests.py +++ b/tests.py @@ -2673,6 +2673,26 @@ def test_christi_himmelfahrt(self): for province, (y, m, d) in product(holidays.DE.PROVINCES, known_good): self.assertIn(date(y, m, d), self.prov_hols[province]) + def test_weltkindertag(self): + known_good = [(2019, 9, 20), (2021, 9, 20)] + + provinces_that_have = {"TH"} + provinces_that_dont = set(holidays.DE.PROVINCES) - provinces_that_have + for province, (y, m, d) in product(provinces_that_have, known_good): + self.assertIn(date(y, m, d), self.prov_hols[province]) + for province, (y, m, d) in product(provinces_that_dont, known_good): + self.assertNotIn(date(y, m, d), self.prov_hols[province]) + + def test_frauentag(self): + known_good = [(2019, 3, 8), ] + + provinces_that_have = {"BE"} + provinces_that_dont = set(holidays.DE.PROVINCES) - provinces_that_have + for province, (y, m, d) in product(provinces_that_have, known_good): + self.assertIn(date(y, m, d), self.prov_hols[province]) + for province, (y, m, d) in product(provinces_that_dont, known_good): + self.assertNotIn(date(y, m, d), self.prov_hols[province]) + def test_pfingstsonntag(self): known_good = [(2014, 6, 8), (2015, 5, 24), (2016, 5, 15), (2017, 6, 4), (2018, 5, 20), (2019, 6, 9),