Skip to content

Commit

Permalink
Add Easter Tuesday to Christian holidays group (#1959)
Browse files Browse the repository at this point in the history
  • Loading branch information
KJhellico authored Aug 28, 2024
1 parent 66bf2df commit e9c1b3d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion holidays/countries/australia.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def _populate_subdiv_tas_public_holidays(self):

# Easter Tuesday.
if self._year <= 2010:
self._add_holiday_2_days_past_easter("Easter Tuesday")
self._add_easter_tuesday("Easter Tuesday")

# ANZAC Day.
if self._year >= 1921:
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/cyprus.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _populate_bank_holidays(self):
return None

# Easter Tuesday.
self._add_holiday_2_days_past_easter(tr("Τρίτη της Διακαινησίμου"))
self._add_easter_tuesday(tr("Τρίτη της Διακαινησίμου"))

def _populate_optional_holidays(self):
if self._year <= 1960:
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/hongkong.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def _populate_optional_holidays(self):
# Easter Monday.
if self._year >= 1968 and dt_qingming == self._easter_sunday:
# 復活節星期一翌日.
self._add_holiday_2_days_past_easter("The day following Easter Monday")
self._add_easter_tuesday("The day following Easter Monday")
else:
# 復活節星期一.
self._add_easter_monday("Easter Monday")
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/new_zealand.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _populate_subdiv_stc_public_holidays(self):
def _populate_subdiv_stl_public_holidays(self):
name = "Southland Anniversary Day"
if self._year >= 2012:
self._add_holiday_2_days_past_easter(name)
self._add_easter_tuesday(name)
else:
self._add_holiday(name, self._get_nearest_monday(JAN, 17))

Expand Down
9 changes: 9 additions & 0 deletions holidays/groups/christian.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,15 @@ def _add_easter_sunday(self, name, calendar=None) -> date:
"""
return self._add_holiday(name, self.__get_easter_sunday(calendar))

def _add_easter_tuesday(self, name, calendar=None) -> date:
"""
Add Easter Tuesday (2 day after Easter Sunday).
Easter Tuesday is the third day of Eastertide and is a holiday in some areas.
https://en.wikipedia.org/wiki/Easter_Tuesday
"""
return self._add_holiday(name, _timedelta(self.__get_easter_sunday(calendar), +2))

def _add_epiphany_day(self, name, calendar=None) -> date:
"""
Add Epiphany Day.
Expand Down

0 comments on commit e9c1b3d

Please sign in to comment.