From: Isaac Cambron Date: Mon, 2 Sep 2013 02:20:00 +0000 (-0400) Subject: review-based fixes X-Git-Tag: 2.2.0~11^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F1021%2Fhead;p=thirdparty%2Fmoment.git review-based fixes --- 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 () {