diff --git a/src/controllers/payments.js b/src/controllers/payments.js index ad69489be4..ec0da30ab0 100644 --- a/src/controllers/payments.js +++ b/src/controllers/payments.js @@ -108,7 +108,7 @@ function cancelSubscription(user, data){ if(isProduction) emailUser(user, 'cancel-subscription'); user.purchased.plan.dateTerminated = moment( now.format('MM') + '/' + moment(du).format('DD') + '/' + now.format('YYYY') ) - .add(1, 'month') + .add({months:1}) .toDate(); ga.event('unsubscribe', 'Stripe').send(); diff --git a/src/controllers/user.js b/src/controllers/user.js index fe610e4f9a..e2e7ec6b38 100644 --- a/src/controllers/user.js +++ b/src/controllers/user.js @@ -477,7 +477,7 @@ api.batchUpdate = function(req, res, next) { }else if(response.wasModified){ // Preen 3-day past-completed To-Dos from Angular & mobile app response.todos = _.where(response.todos, function(t) { - return !t.completed || (t.challenge && t.challenge.id) || moment(t.dateCompleted).isAfter(moment().subtract('days',3)); + return !t.completed || (t.challenge && t.challenge.id) || moment(t.dateCompleted).isAfter(moment().subtract({days:3})); }); res.json(200, response);