]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
review-based fixes 1021/head
authorIsaac Cambron <icambron@gmail.com>
Mon, 2 Sep 2013 02:20:00 +0000 (22:20 -0400)
committerIsaac Cambron <icambron@gmail.com>
Mon, 2 Sep 2013 02:20:00 +0000 (22:20 -0400)
moment.js

index 578dcfcf6fe2dde27207985f1cf0ac8a66fdb344..2f0a67d56bb552d6cfb456b9dead9fc00dec39c4 100644 (file)
--- a/moment.js
+++ b/moment.js
         },
 
         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 () {