Bug fix holiday start and end dates

This commit is contained in:
Edward Betts 2024-01-16 18:08:11 +00:00
parent 3a7784bb25
commit 4b6f4231b7

View file

@ -48,7 +48,7 @@ def get_nyse_holidays(
title=rename.get(title, title),
)
for hol_date, title in hols.items()
if start_date < hol_date < end_date
if start_date <= hol_date <= end_date
]
found = [hol for hol in found if (hol.date, hol.title) not in known_us_hols]
for hol in found:
@ -78,7 +78,7 @@ def get_holidays(country: str, start_date: date, end_date: date) -> list[Holiday
country=country.lower(),
)
for hol_date, title in en_hols.items()
if start_date < hol_date < end_date
if start_date <= hol_date <= end_date
]
return found