moment changed .sod() to .startOf('day')

This commit is contained in:
Tyler Renelle
2013-02-08 14:22:33 -05:00
parent dc1639ceb4
commit 842d3183b2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports.deleteStaleAccounts = ->
return unless user? #why does this happen sometimes?
if !!user.lastCron # for now ignore missing crons, still looking into why this is happening
lastCron = new Date(user.lastCron)
diff = Math.abs(moment(today).sod().diff(moment(lastCron).sod(), "days"))
diff = Math.abs(moment(today).startOf('day').diff(moment(lastCron).startOf('day'), "days"))
if diff > 10
removeAccount(collection, user._id)
else