From a699c2924e83c0cdd46ecee8a6a9b7469bc4b25e Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Wed, 8 Oct 2014 17:44:47 -0600 Subject: [PATCH] chore(moment): upgrade moment, run grunt --- dist/habitrpg-shared.js | 16 +++++++++++----- package.json | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index b2e1a05067..05b535d6d0 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -13451,7 +13451,9 @@ api.startOfDay = function(options) { options = {}; } o = sanitizeOptions(options); - return moment(o.now).startOf('day').add('h', o.dayStart); + return moment(o.now).startOf('day').add({ + hours: o.dayStart + }); }; api.dayMapping = { @@ -13503,7 +13505,9 @@ api.shouldDo = function(day, repeat, options) { if (options.dayStart <= o.now.hour()) { return selected; } else { - yesterday = moment(o.now).subtract(1, 'd').day(); + yesterday = moment(o.now).subtract({ + days: 1 + }).day(); return repeat[api.dayMapping[yesterday]]; } }; @@ -15299,7 +15303,9 @@ api.wrap = function(user, main) { scheduleMisses = 0; _.times(daysMissed, function(n) { var thatDay; - thatDay = moment(now).subtract('days', n + 1); + thatDay = moment(now).subtract({ + days: n + 1 + }); if (api.shouldDo(thatDay, repeat, user.preferences)) { return scheduleMisses++; } @@ -15489,5 +15495,5 @@ api.wrap = function(user, main) { }; -}).call(this,require("/home/matteo/Dev/habitrpg/habitrpg-shared/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js")) -},{"./content.coffee":5,"./i18n.coffee":6,"/home/matteo/Dev/habitrpg/habitrpg-shared/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":2,"lodash":3,"moment":4}]},{},[1]) \ No newline at end of file +}).call(this,require("/Users/lefnire/Dropbox/Sites/habitrpg/modules/habitrpg-shared/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js")) +},{"./content.coffee":5,"./i18n.coffee":6,"/Users/lefnire/Dropbox/Sites/habitrpg/modules/habitrpg-shared/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":2,"lodash":3,"moment":4}]},{},[1]) \ No newline at end of file diff --git a/package.json b/package.json index c8d3d0dc1d..36893f7636 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "browserify": "~3.30.2", "coffeeify": "0.6.0", "coffee-script": "1.7.1", - "moment": "~2.4.0", + "moment": "~2.8.3", "lodash": "~2.4.1", "grunt-spritesmith": "~1.22.0" },