Skip to content

Commit a807a6f

Browse files
jmcdermosercant
authored andcommitted
move around the holiday definitions to follow the chronological order
1 parent b4af1ae commit a807a6f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

pandas_market_calendars/exchange_calendar_nyse.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@
2929
November29BacklogRelief, PaperworkCrisis68, September11Closings,
3030
USBlackFridayBefore1993, USBlackFridayInOrAfter1993,
3131
USColumbusDayBefore1954, USElectionDay1848to1967,
32-
USElectionDay1968to1980, USIndependenceDay,
32+
USElectionDay1968to1980, USJuneteenthAfter2022, USIndependenceDay,
3333
USIndependenceDayBefore1954, USLincolnsBirthDayBefore1954,
3434
USMartinLutherKingJrAfter1998, USMemorialDay, USMemorialDay1964to1969,
3535
USMemorialDayBefore1964, USNationalDaysofMourning, USNewYearsDay,
3636
USPresidentsDay, USThanksgivingDay, USThanksgivingDay1939to1941,
3737
USThanksgivingDayBefore1939, USVeteransDay1934to1953,
3838
USWashingtonsBirthDay1964to1970, USWashingtonsBirthDayBefore1964,
39-
WeatherSnowClosing, WednesdayBeforeIndependenceDayPost2013,
40-
USJuneteenthAfter2022)
39+
WeatherSnowClosing, WednesdayBeforeIndependenceDayPost2013)
4140
from .market_calendar import MarketCalendar
4241

4342
# Useful resources for making changes to this file:

pandas_market_calendars/holidays_us.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ def following_tuesday_every_four_years_observance(dt):
128128
end_date=Timestamp('1953-12-31'),
129129
observance=sunday_to_monday,
130130
)
131+
#######################################
132+
# US Juneteenth (June 19th)
133+
#######################################
134+
USJuneteenthAfter2022 = Holiday(
135+
'Juneteenth Starting at 2022',
136+
start_date=Timestamp('2022-06-19'),
137+
month=6, day=19,
138+
observance=nearest_workday,
139+
)
131140
USIndependenceDay = Holiday(
132141
'July 4th',
133142
month=7,
@@ -351,10 +360,3 @@ def following_tuesday_every_four_years_observance(dt):
351360
Timestamp('2007-01-02', tz='UTC'),
352361
Timestamp('2018-12-05', tz='UTC'),
353362
]
354-
355-
USJuneteenthAfter2022 = Holiday(
356-
'Juneteenth Starting at 2022',
357-
start_date=Timestamp('2022-06-19'),
358-
month=6, day=19,
359-
observance=nearest_workday,
360-
)

0 commit comments

Comments
 (0)