From: Vincent Roy Date: Tue, 20 Mar 2012 18:52:28 +0000 (+0530) Subject: Fixed weekday returned when isUTC date. X-Git-Tag: 1.5.1~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F212%2Fhead;p=thirdparty%2Fmoment.git Fixed weekday returned when isUTC date. --- diff --git a/moment.js b/moment.js index 7b2047a88..3b2a46bf7 100644 --- a/moment.js +++ b/moment.js @@ -668,7 +668,7 @@ }, day : function (input) { - var day = this._d.getDay(); + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return input == null ? day : this.add({ d : input - day }); },