Start ical on current day
Start recurring events on the same day as the generation, since that day is not really fully in the past yet. Change-Id: I167fdd2d20b38b3c77029854fa3df191fb127181
This commit is contained in:
parent
40f12c0d63
commit
77c1530bde
|
@ -33,7 +33,7 @@ class WeeklyRecurrence(object):
|
|||
|
||||
weekday = WEEKDAYS[day]
|
||||
days_ahead = weekday - current_date_time.weekday()
|
||||
if days_ahead <= 0: # target day already happened this week
|
||||
if days_ahead < 0: # target day already happened this week
|
||||
days_ahead += 7
|
||||
return current_date_time + datetime.timedelta(days_ahead)
|
||||
|
||||
|
|
Loading…
Reference in New Issue