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 United States holidays: Columbus Day adjustment #1503

Merged
merged 6 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ The list of supported countries, their subdivisions and supported languages
-
* - United States of America (the)
- US
- States and territories: AK, AL, AR, AS, AZ, CA, CO, CT, DC, DE, FL, FM, GA, GU, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MH, MI, MN, MO, MP, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, PR, PW, RI, SC, SD, TN, TX, UM, UT, VA, VI, VT, WA, WI, WV, WY
- States and territories: AK, AL, AR, AS, AZ, CA, CO, CT, DC, DE, FL, GA, GU, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MP, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, PR, RI, SC, SD, TN, TX, UM, UT, VA, VI, VT, WA, WI, WV, WY
-
* - United States Virgin Islands (the)
-
Expand Down
228 changes: 148 additions & 80 deletions holidays/countries/united_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,73 +29,84 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
https://en.wikipedia.org/wiki/Public_holidays_in_the_United_States

For Northern Mariana Islands (subdivision MP):
https://governor.gov.mp/archived-news/executive-actions-archive/memorandum-2022-legal-holidays/
https://webcache.googleusercontent.com/search?q=cache:C17_7FBgPtQJ:https://governor.gov.mp/archived-news/executive-actions-archive/memorandum-2022-legal-holidays/&hl=en&gl=sg&strip=1&vwsrc=0
- https://governor.gov.mp/archived-news/executive-actions-archive/memorandum-2022-legal-holidays/ # noqa: E501
- https://webcache.googleusercontent.com/search?q=cache:C17_7FBgPtQJ:https://governor.gov.mp/archived-news/executive-actions-archive/memorandum-2022-legal-holidays/&hl=en&gl=sg&strip=1&vwsrc=0 # noqa: E501

Columbus Day / Indigenous Peoples' Day history:
- https://www.pewresearch.org/short-reads/2023/10/05/working-on-columbus-day-or-indigenous-peoples-day-it-depends-on-where-your-job-is/ # noqa: E501
- https://www.officeholidays.com/holidays/usa/columbus-day-state-guide
- https://en.wikipedia.org/wiki/Indigenous_Peoples%27_Day_(United_States)
- https://www.sos.ri.gov/divisions/civics-and-education/reference-desk/ri-state-holidays
- https://web.archive.org/web/20080831103521/http://www.dpa.ca.gov/personnel-policies/holidays.htm # noqa: E501

"""

country = "US"
observed_label = "%s (Observed)"
subdivisions: Union[Tuple[()], Tuple[str, ...]] = (
"AK",
"AL",
"AR",
"AS",
"AZ",
"CA",
"CO",
"CT",
"DC",
"DE",
"FL",
"AK", # Alaska.
"AL", # Alabama.
"AR", # Arkansas.
"AS", # American Samoa.
"AZ", # Arizona.
"CA", # California.
"CO", # Colorado.
"CT", # Connecticut.
"DC", # District of Columbia.
"DE", # Delaware.
"FL", # Florida.
"GA", # Georgia.
"GU", # Guam.
"HI", # Hawaii.
"IA", # Iowa.
"ID", # Idaho.
"IL", # Illinois.
"IN", # Indiana.
"KS", # Kansas.
"KY", # Kentucky.
"LA", # Louisiana.
"MA", # Massachusetts.
"MD", # Maryland.
"ME", # Maine.
"MI", # Michigan.
"MN", # Minnesota.
"MO", # Missouri.
"MP", # Northern Mariana Islands.
"MS", # Mississippi.
"MT", # Montana.
"NC", # North Carolina.
"ND", # North Dakota.
"NE", # Nebraska.
"NH", # New Hampshire.
"NJ", # New Jersey.
"NM", # New Mexico.
"NV", # Nevada.
"NY", # New York.
"OH", # Ohio.
"OK", # Oklahoma.
"OR", # Oregon.
"PA", # Pennsylvania.
"PR", # Puerto Rico.
"RI", # Rhode Island.
"SC", # South Carolina.
"SD", # South Dakota.
"TN", # Tennessee.
"TX", # Texas.
"UM", # United States Minor Outlying Islands.
"UT", # Utah.
"VA", # Virginia.
"VI", # Virgin Islands, U.S..
"VT", # Vermont.
"WA", # Washington.
"WI", # Wisconsin.
"WV", # West Virginia.
"WY", # Wyoming.
)

_deprecated_subdivisions = (
"FM",
"GA",
"GU",
"HI",
"IA",
"ID",
"IL",
"IN",
"KS",
"KY",
"LA",
"MA",
"MD",
"ME",
"MH",
"MI",
"MN",
"MO",
"MP",
"MS",
"MT",
"NC",
"ND",
"NE",
"NH",
"NJ",
"NM",
"NV",
"NY",
"OH",
"OK",
"OR",
"PA",
"PR",
"PW",
"RI",
"SC",
"SD",
"TN",
"TX",
"UM",
"UT",
"VA",
"VI",
"VT",
"WA",
"WI",
"WV",
"WY",
)

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -183,18 +194,31 @@ def _add_subdiv_holidays(self):
self._add_holiday_feb_22(name)

# Columbus Day
if self._year >= 1937 and self.subdiv not in {
"AK",
"AR",
"DE",
"FL",
"HI",
"NV",
"SD",
"VI",
}:
if self._year >= 1937 and (
self.subdiv is None
or self.subdiv
in {
"AS",
"AZ",
"CT",
"GA",
"ID",
"IL",
"IN",
"MA",
"MD",
"MO",
"MT",
"NJ",
"NY",
"OH",
"PA",
"UT",
"WV",
}
):
name = "Columbus Day"
if self._year >= 1970:
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(name)
else:
self._add_columbus_day(name)
Expand All @@ -210,6 +234,12 @@ def _add_subdiv_ak_holidays(self):
else:
self._add_holiday_mar_30(name)

# Indigenous Peoples' Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Indigenous Peoples' Day" if self._year >= 2015 else "Columbus Day"
)

# Alaska Day
if self._year >= 1867:
self._add_observed(self._add_holiday_oct_18("Alaska Day"))
Expand All @@ -234,6 +264,14 @@ def _add_subdiv_al_holidays(self):
if self._year >= 1890:
self._add_holiday_1st_mon_of_jun("Jefferson Davis Birthday")

# Columbus Day / American Indian Heritage Day / Fraternal Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Columbus Day / American Indian Heritage Day / Fraternal Day"
if self._year >= 2000
else "Columbus Day / Fraternal Day"
)

def _add_subdiv_ar_holidays(self):
# Martin Luther King Jr. Day
if self._year >= 1986:
Expand Down Expand Up @@ -273,6 +311,10 @@ def _add_subdiv_ca_holidays(self):
if self._year >= 1995:
self._add_observed(self._add_holiday_mar_31("Cesar Chavez Day"), rule=SUN_TO_NEXT_MON)

# Columbus Day
if 1971 <= self._year <= 2008:
self._add_holiday_2nd_mon_of_oct("Columbus Day")

# Day After Thanksgiving
if self._year >= 1975:
self._add_holiday_1_day_past_4th_thu_of_nov("Day After Thanksgiving")
Expand Down Expand Up @@ -303,6 +345,12 @@ def _add_subdiv_dc_holidays(self):
if self._year >= 2005:
self._add_observed(self._add_holiday_apr_16("Emancipation Day"))

# Indigenous Peoples' Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Indigenous Peoples' Day" if self._year >= 2019 else "Columbus Day"
)

def _add_subdiv_de_holidays(self):
# Good Friday
self._add_good_friday("Good Friday")
Expand All @@ -324,9 +372,6 @@ def _add_subdiv_fl_holidays(self):
if self._year >= 1975:
self._add_holiday_1_day_past_4th_thu_of_nov("Friday After Thanksgiving")

def _add_subdiv_fm_holidays(self):
pass

def _add_subdiv_ga_holidays(self):
# Martin Luther King Jr. Day
if self._year >= 1986:
Expand Down Expand Up @@ -509,8 +554,11 @@ def _add_subdiv_me_holidays(self):
else:
self._add_holiday_apr_19(name)

def _add_subdiv_mh_holidays(self):
pass
# Indigenous Peoples' Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Indigenous Peoples' Day" if self._year >= 2019 else "Columbus Day"
)

def _add_subdiv_mi_holidays(self):
if self._year >= 2013:
Expand Down Expand Up @@ -597,6 +645,12 @@ def _add_subdiv_ne_holidays(self):
else:
self._add_holiday_apr_22(name)

# Indigenous Peoples' Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Indigenous Peoples' Day" if self._year >= 2020 else "Columbus Day"
)

def _add_subdiv_nh_holidays(self):
# Martin Luther King Jr. Day
if self._year >= 1986:
Expand All @@ -623,6 +677,12 @@ def _add_subdiv_nj_holidays(self):
self._add_holiday_1_day_past_1st_mon_of_nov("Election Day")

def _add_subdiv_nm_holidays(self):
# Indigenous Peoples' Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Indigenous Peoples' Day" if self._year >= 2019 else "Columbus Day"
)

# Presidents' Day
self._add_holiday_1_day_past_4th_thu_of_nov("Presidents' Day")

Expand Down Expand Up @@ -686,23 +746,26 @@ def _add_subdiv_pr_holidays(self):
# Discovery Day
self._add_observed(self._add_holiday_nov_19("Discovery Day"), rule=SUN_TO_NEXT_MON)

def _add_subdiv_pw_holidays(self):
pass

def _add_subdiv_ri_holidays(self):
# Victory Day
if self._year >= 1948:
self._add_holiday_2nd_mon_of_aug("Victory Day")

# Indigenous Peoples' Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Indigenous Peoples' Day / Columbus Day" if self._year >= 2022 else "Columbus Day"
)

def _add_subdiv_sc_holidays(self):
# Confederate Memorial Day
if self._year >= 1866:
self._add_holiday_4th_mon_of_apr("Confederate Memorial Day")

def _add_subdiv_sd_holidays(self):
# Columbus Day
# Native Americans' Day / Columbus Day
if self._year >= 1937:
name = "Native American Day"
name = "Native Americans' Day" if self._year >= 1990 else "Columbus Day"
if self._year >= 1970:
self._add_holiday_2nd_mon_of_oct(name)
else:
Expand Down Expand Up @@ -780,6 +843,11 @@ def _add_subdiv_va_holidays(self):
else self._add_holiday_mar_4(name),
rule=SUN_TO_NEXT_MON,
)
# Indigenous Peoples' Day
if self._year >= 1971:
self._add_holiday_2nd_mon_of_oct(
"Indigenous Peoples' Day" if self._year >= 2020 else "Columbus Day"
)

def _add_subdiv_vi_holidays(self):
# Three Kings Day
Expand Down
Loading