From fdc09fed66d5afefe5fbce5eb848c39f6b3da7c9 Mon Sep 17 00:00:00 2001 From: Isaac Cambron Date: Sun, 1 Sep 2013 22:20:00 -0400 Subject: [PATCH] review-based fixes --- moment.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/moment.js b/moment.js index 578dcfcf6..2f0a67d56 100644 --- a/moment.js +++ b/moment.js @@ -1478,15 +1478,14 @@ }, hasAlignedHourOffset : function (input) { - var mod = this.zone() % 60, - wrapAround = function (minutes) {return minutes < 0 ? 60 + minutes : minutes; }; - - if (input == null || input === '') { - return mod === 0; + if (!input) { + input = 0; } else { - return wrapAround(mod) === wrapAround(moment(input).zone() % 60); + input = moment(input).zone(); } + + return (this.zone() - input) % 60 === 0; }, daysInMonth : function () { -- 2.47.2