Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Poland holidays: fix Ascension Day #1751

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions holidays/countries/poland.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# Website: https://github.com/vacanza/python-holidays
# License: MIT (see LICENSE file)

from datetime import timedelta as td
from gettext import gettext as tr

from holidays.calendars.gregorian import NOV
Expand Down Expand Up @@ -68,7 +67,7 @@ def _populate_public_holidays(self):

if self._year <= 1950:
# Ascension Day.
self._add_holiday(tr("Wniebowstąpienie Pańskie"), self._easter_sunday + td(days=+40))
self._add_ascension_thursday(tr("Wniebowstąpienie Pańskie"))

# Pentecost.
self._add_whit_sunday(tr("Zielone Świątki"))
Expand Down
2 changes: 1 addition & 1 deletion snapshots/countries/PL_COMMON.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"1950-05-01": "National Day",
"1950-05-03": "National Day of the Third of May",
"1950-05-09": "National Victory and Freedom Day",
"1950-05-19": "Ascension Day",
"1950-05-18": "Ascension Day",
"1950-05-28": "Pentecost",
"1950-05-29": "Whit Monday",
"1950-06-08": "Corpus Christi",
Expand Down
12 changes: 6 additions & 6 deletions tests/countries/test_poland.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,19 @@ def test_swieto_narodowe_trzeciego_maja(self):

def test_narodowe_swieto_zwyciestwa_i_wolnosci(self):
self.assertHoliday(f"{year}-05-09" for year in range(1946, 1951))
self.assertNoHoliday(f"{year}-05-09" for year in range(1925, 1946))
self.assertNoHoliday(f"{year}-05-09" for year in set(range(1925, 1946)).difference({1929}))
KJhellico marked this conversation as resolved.
Show resolved Hide resolved
self.assertNoHoliday(f"{year}-05-09" for year in range(1951, 2050))
self.assertNoHolidayName(
"Narodowe Święto Zwycięstwa i Wolności", range(1925, 1946), range(1951, 2050)
)

def test_wniebowstapienie_panskie(self):
self.assertHoliday(
"1930-05-30",
"1934-05-11",
"1939-05-19",
"1945-05-11",
"1950-05-19",
"1930-05-29",
"1934-05-10",
"1939-05-18",
"1945-05-10",
"1950-05-18",
)
self.assertNoHolidayName("Wniebowstąpienie Pańskie", range(1951, 2050))

Expand Down