Skip to content

Instantly share code, notes, and snippets.

@lefnire
Created December 30, 2013 23:10
Show Gist options
  • Save lefnire/8189780 to your computer and use it in GitHub Desktop.
Save lefnire/8189780 to your computer and use it in GitHub Desktop.
Modified script/index.coffee
diff --git a/script/index.coffee b/script/index.coffee
index bbed240..be8c203 100644
--- a/script/index.coffee
+++ b/script/index.coffee
@@ -774,7 +774,7 @@ api.wrap = (user) ->
when 'todo'
if options.cron
calculateDelta()
- #don't touch stats on cron
+ subtractPoints() if moment(task.date).isBefore(new Date) #FIXME take timezone, etc into calculation
else
calculateDelta()
addPoints() # obviously for delta>0, but also a trick to undo accidental checkboxes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment