mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-21 11:14:14 +00:00
make daysMissed have a negative value for a lastCron in the future so that setting your PC time backwards doesn't trigger cron
This commit is contained in:
parent
34c51fc710
commit
154fcb4f8c
1 changed files with 1 additions and 1 deletions
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Reference in a new issue