]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
fix for utc-mode .weekday() being incorrect
authorAdam Shaw <arshaw@arshaw.com>
Tue, 17 Sep 2013 05:24:57 +0000 (22:24 -0700)
committerAdam Shaw <arshaw@arshaw.com>
Tue, 17 Sep 2013 05:39:46 +0000 (22:39 -0700)
moment.js

index 3a5ebd2fe711efb3cc37fa0fa5d6364a6a74e25e..2c520e007c753e62027b59ba42b5c89e93be6ab9 100644 (file)
--- a/moment.js
+++ b/moment.js
         },
 
         weekday : function (input) {
-            var weekday = (this._d.getDay() + 7 - this.lang()._week.dow) % 7;
+            var weekday = (this.day() + 7 - this.lang()._week.dow) % 7;
             return input == null ? weekday : this.add("d", input - weekday);
         },