Skip to content

Commit

Permalink
Update United States holidays: fix Washington's Birthday in GA & IN (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KJhellico committed Sep 24, 2024
1 parent 919fc41 commit 6b1060b
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 177 deletions.
29 changes: 23 additions & 6 deletions holidays/countries/united_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@

from typing import Tuple, Union

from holidays.calendars.gregorian import DEC
from holidays.calendars.gregorian import MON, TUE, WED, THU, FRI, SAT, SUN
from holidays.constants import PUBLIC, UNOFFICIAL
from holidays.groups import ChristianHolidays, InternationalHolidays
from holidays.observed_holiday_base import (
ObservedHolidayBase,
ObservedRule,
MON_TO_NEXT_TUE,
FRI_TO_PREV_THU,
SAT_TO_PREV_FRI,
Expand All @@ -25,6 +26,10 @@
SAT_SUN_TO_NEXT_MON,
)

GA_IN_WASHINGTON_BIRTHDAY = ObservedRule(
{MON: +1, TUE: -1, WED: -1, THU: +1, FRI: -1, SAT: -2, SUN: -2}
)


class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
"""
Expand All @@ -43,6 +48,12 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
Frances Xavier Cabrini Day:
- https://leg.colorado.gov/sites/default/files/2020a_1031_signed.pdf
Washington's Birthday (GA):
- https://www.gasupreme.us/court-information/holidays-2/
Washington's Birthday (IN):
- https://www.in.gov/spd/benefits/state-holidays/
"""

country = "US"
Expand Down Expand Up @@ -187,6 +198,7 @@ def _populate_subdiv_holidays(self):
"DE",
"FL",
"GA",
"IN",
"NM",
"PR",
"VI",
Expand Down Expand Up @@ -404,11 +416,10 @@ def _populate_subdiv_ga_public_holidays(self):
)

# Washington's Birthday
name = "Washington's Birthday"
if self._is_wednesday(DEC, 24):
self._add_holiday_dec_26(name)
else:
self._add_holiday_dec_24(name)
self._add_holiday(
"Washington's Birthday",
self._get_observed_date(self._christmas_day, rule=GA_IN_WASHINGTON_BIRTHDAY),
)

def _populate_subdiv_gu_public_holidays(self):
# Guam Discovery Day
Expand Down Expand Up @@ -490,6 +501,12 @@ def _populate_subdiv_in_public_holidays(self):
if self._year >= 2010:
self._add_holiday_1_day_past_4th_thu_of_nov("Lincoln's Birthday")

# Washington's Birthday
self._add_holiday(
"Washington's Birthday",
self._get_observed_date(self._christmas_day, rule=GA_IN_WASHINGTON_BIRTHDAY),
)

def _populate_subdiv_ks_public_holidays(self):
# Christmas Eve
if self._year >= 2013:
Expand Down
Loading

0 comments on commit 6b1060b

Please sign in to comment.