Skip to content

Commit

Permalink
Fix 2025 Chinese Calendar's Birthday of Buddha (#2310)
Browse files Browse the repository at this point in the history
  • Loading branch information
PPsyrius authored Feb 25, 2025
1 parent 93fb2d7 commit 13e3c47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion holidays/calendars/chinese.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class _ChineseLunisolar:
2022: (MAY, 8),
2023: (MAY, 26),
2024: (MAY, 15),
2025: (MAY, 4),
2025: (MAY, 5),
2026: (MAY, 24),
2027: (MAY, 13),
2028: (MAY, 2),
Expand Down
3 changes: 1 addition & 2 deletions snapshots/countries/HK_COMMON.json
Original file line number Diff line number Diff line change
Expand Up @@ -1278,8 +1278,7 @@
"2025-04-19": "The day following Good Friday",
"2025-04-21": "Easter Monday",
"2025-05-01": "Labor Day",
"2025-05-04": "The Birthday of the Buddha",
"2025-05-05": "The Birthday of the Buddha (observed); The day following the Birthday of the Buddha",
"2025-05-05": "The Birthday of the Buddha",
"2025-05-31": "Tuen Ng Festival",
"2025-07-01": "Hong Kong Special Administrative Region Establishment Day",
"2025-10-01": "National Day",
Expand Down
15 changes: 5 additions & 10 deletions tests/countries/test_hongkong.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def test_birthday_of_buddha(self):
"2022-05-08",
"2023-05-26",
"2024-05-15",
"2025-05-04",
"2025-05-05",
"2026-05-24",
"2027-05-13",
"2028-05-02",
Expand All @@ -488,10 +488,7 @@ def test_birthday_of_buddha(self):
"2034-05-25",
"2035-05-15",
)
obs_dt = (
"2022-05-09",
"2025-05-05",
)
obs_dt = ("2022-05-09",)
self.assertHolidayName(name, range(2022, 2050))
self.assertHolidayName(name_observed, obs_dt)
self.assertNoHolidayName(name, range(1963, 2022))
Expand Down Expand Up @@ -520,15 +517,14 @@ def test_birthday_of_buddha(self):
"2023-05-26",
"2024-05-15",
)
exception_years = {2002, 2005, 2019, 2022, 2025, 2026, 2029, 2032, 2046, 2049}
exception_years = {2002, 2005, 2019, 2022, 2026, 2029, 2032, 2046, 2049}
self.assertHolidayName(
name_following,
self.opt_holidays,
"2002-05-20",
"2005-05-16",
"2019-05-13",
"2022-05-09",
"2025-05-05",
)
self.assertHolidayName(
name, self.opt_holidays, set(range(1999, 2050)).difference(exception_years)
Expand Down Expand Up @@ -1268,8 +1264,7 @@ def test_2025(self):
("2025-01-31", "農曆年初三"),
("2025-04-04", "清明節"),
("2025-05-01", "勞動節"),
("2025-05-04", "佛誕"),
("2025-05-05", "佛誕(慶祝)"),
("2025-05-05", "佛誕"),
("2025-05-31", "端午節"),
("2025-07-01", "香港特別行政區成立紀念日"),
("2025-10-01", "國慶日"),
Expand Down Expand Up @@ -1409,7 +1404,7 @@ def test_optional_2025(self):
("2025-04-19", "耶穌受難節翌日"),
("2025-04-21", "復活節星期一"),
("2025-05-01", "勞動節"),
("2025-05-05", "佛誕翌日"),
("2025-05-05", "佛誕"),
("2025-05-31", "端午節"),
("2025-07-01", "香港特別行政區成立紀念日"),
("2025-10-01", "國慶日"),
Expand Down

0 comments on commit 13e3c47

Please sign in to comment.