Skip to content

Commit

Permalink
fix get_last_weekday
Browse files Browse the repository at this point in the history
  • Loading branch information
sirfoga committed Oct 23, 2017
1 parent ecc1aa8 commit 9fcd78e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hal/time/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def get_last_weekday(weekday, including_today=False):
elif now.weekday() == weekday.value and not including_today:
delta = - datetime.timedelta(days=7)
else:
delta = datetime.timedelta(
- now.weekday() + weekday.value
delta = - datetime.timedelta(
now.weekday() + (7 - weekday.value)
) # time D to last sunday
return get_just_date(now + delta)

Expand Down

0 comments on commit 9fcd78e

Please sign in to comment.