fix #1270. if start-from fits the recurrence pattern, the first todo should use the start-from date

this is use-case 2 mentioned in the ticket.
This commit is contained in:
Reinier Balt 2013-06-11 23:38:30 +02:00
parent 3a2af7caf2
commit 56b884055f
4 changed files with 53 additions and 5 deletions

View file

@ -541,14 +541,13 @@ class RecurringTodo < ActiveRecord::Base
end
def get_monthly_date(previous)
start = determine_start(previous)
day = self.every_other1
n = self.every_other2
case self.recurrence_selector
when 0 # specific day of the month
if start.mday >= day
if start.mday > day
# there is no next day n in this month, search in next month
#
# start += n.months