Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix weekly schedule update #124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/_data/update_this_week.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def add_business_days(start_date, add_days, current_year):
rem_days_to_add = add_days
current_date = datetime.strptime(start_date, "%a %b %d").replace(year=current_year)
current_date = datetime.strptime("%s %s" % (start_date, current_date.year), "%a %b %d %Y")

while rem_days_to_add > 0:
current_date += timedelta(days=1)
Expand Down Expand Up @@ -43,7 +43,7 @@ def ignore_aliases(self, data):
current_date = start_date

for schedule_day in schedule:
schedule_date = datetime.strptime(schedule_day['date'], "%a %b %d").replace(year=current_date.year)
schedule_date = datetime.strptime("%s %s" % (schedule_day['date'], current_date.year), "%a %b %d %Y")
if not week_start_date and schedule_date > current_date:
# We're at the current week!
week_start_date = schedule_date
Expand Down