Bug fix holiday start and end dates
This commit is contained in:
parent
3a7784bb25
commit
4b6f4231b7
|
@ -48,7 +48,7 @@ def get_nyse_holidays(
|
||||||
title=rename.get(title, title),
|
title=rename.get(title, title),
|
||||||
)
|
)
|
||||||
for hol_date, title in hols.items()
|
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]
|
found = [hol for hol in found if (hol.date, hol.title) not in known_us_hols]
|
||||||
for hol in found:
|
for hol in found:
|
||||||
|
@ -78,7 +78,7 @@ def get_holidays(country: str, start_date: date, end_date: date) -> list[Holiday
|
||||||
country=country.lower(),
|
country=country.lower(),
|
||||||
)
|
)
|
||||||
for hol_date, title in en_hols.items()
|
for hol_date, title in en_hols.items()
|
||||||
if start_date < hol_date < end_date
|
if start_date <= hol_date <= end_date
|
||||||
]
|
]
|
||||||
|
|
||||||
return found
|
return found
|
||||||
|
|
Loading…
Reference in a new issue