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:
Thierry Carrez 2015-02-26 14:13:04 +01:00
parent 40f12c0d63
commit 77c1530bde
1 changed files with 1 additions and 1 deletions

View File

@ -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)