From 154fcb4f8c4fc43dab16a6b3aaab1826f88de10e Mon Sep 17 00:00:00 2001 From: Alys Date: Sat, 31 Oct 2015 13:00:42 +1000 Subject: [PATCH] make daysMissed have a negative value for a lastCron in the future so that setting your PC time backwards doesn't trigger cron --- common/script/index.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/script/index.coffee b/common/script/index.coffee index 9b5d873c26..a69f64fcaf 100644 --- a/common/script/index.coffee +++ b/common/script/index.coffee @@ -73,7 +73,7 @@ api.dayMapping = {0:'su',1:'m',2:'t',3:'w',4:'th',5:'f',6:'s'} ### api.daysSince = (yesterday, options = {}) -> o = sanitizeOptions options - Math.abs api.startOfDay(_.defaults {now:yesterday}, o).diff(api.startOfDay(_.defaults {now:o.now}, o), 'days') + api.startOfDay(_.defaults {now:o.now}, o).diff(api.startOfDay(_.defaults {now:yesterday}, o), 'days') ### Should the user do this task on this date, given the task's repeat options and user.preferences.dayStart?