Update scheduler to handle rolling chores
This commit is contained in:
parent
eae8005dcf
commit
925b7db300
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,9 @@ func scheduleNextDueDate(chore *chModel.Chore, completedDate time.Time) (*time.T
|
|||
baseDate = time.Date(baseDate.Year(), baseDate.Month(), baseDate.Day(), t.Hour(), t.Minute(), 0, 0, t.Location())
|
||||
|
||||
}
|
||||
|
||||
if chore.IsRolling {
|
||||
baseDate = completedDate.UTC()
|
||||
}
|
||||
if chore.FrequencyType == "daily" {
|
||||
nextDueDate = baseDate.AddDate(0, 0, 1)
|
||||
} else if chore.FrequencyType == "weekly" {
|
||||
|
|
Loading…
Add table
Reference in a new issue