From b52e04c1ae41a857020ccda57a60dd1809c710cf Mon Sep 17 00:00:00 2001 From: Noufal E Date: Sun, 21 Mar 2021 18:54:32 -0700 Subject: [PATCH] US Holidays Fix --- gamestonk_terminal/helper_funcs.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gamestonk_terminal/helper_funcs.py b/gamestonk_terminal/helper_funcs.py index 7623f5cbedb..4aff574d3f5 100644 --- a/gamestonk_terminal/helper_funcs.py +++ b/gamestonk_terminal/helper_funcs.py @@ -201,16 +201,14 @@ def divide_chunks(data, n): def get_next_stock_market_days(last_stock_day, n_next_days) -> list: n_days = 0 l_pred_days = list() - years = list() - holidays = list() + years: list = [] + holidays: list = [] while n_days < n_next_days: - last_stock_day += timedelta(hours=24) year = last_stock_day.date().year if year not in years: years.append(year) holidays = holidays + us_market_holidays(year) - # Check if it is a weekend if last_stock_day.date().weekday() > 4: continue