Skip to content

Commit

Permalink
Merge pull request #133 from prerak-proof/master
Browse files Browse the repository at this point in the history
Add US Juneteenth holiday to XNYS calendar starting in 2022
  • Loading branch information
gerrymanoim authored Jan 14, 2022
2 parents 467f434 + 973c77f commit bc313f7
Show file tree
Hide file tree
Showing 4 changed files with 1,720 additions and 1 deletion.
3 changes: 3 additions & 0 deletions exchange_calendars/exchange_calendar_xnys.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
USMemorialDay,
USMemorialDay1964to1969,
USMemorialDayBefore1964,
USJuneteenth,
USNationalDaysofMourning,
USNewYearsDay,
USPresidentsDay,
Expand Down Expand Up @@ -85,6 +86,7 @@ class XNYSExchangeCalendar(ExchangeCalendar):
- Good Friday (two days before Easter Sunday)
- Memorial Day (May 30th, before 1970, with rule change in 1964)
- Memorial Day (last Monday in May, after 1970)
- Juneteenth (June 16th, since 2022)
- Independence Day (July 4th Sunday to Monday, before 1954)
- Independence Day (observed on the nearest weekday to July 4th, after
1953)
Expand Down Expand Up @@ -175,6 +177,7 @@ def regular_holidays(self):
USMemorialDayBefore1964,
USMemorialDay1964to1969,
USMemorialDay,
USJuneteenth,
USIndependenceDayBefore1954,
USIndependenceDay,
USLaborDay,
Expand Down
8 changes: 7 additions & 1 deletion exchange_calendars/us_holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ def following_tuesday_every_four_years_observance(dt):
start_date=Timestamp("1971-01-01"),
offset=DateOffset(weekday=MO(1)),
)

USJuneteenth = Holiday(
"Juneteenth National Independence Day",
month=6,
day=19,
start_date=Timestamp("2022-01-01"),
observance=nearest_workday
)
USIndependenceDayBefore1954 = Holiday(
"July 4th",
month=7,
Expand Down
Loading

0 comments on commit bc313f7

Please sign in to comment.