From: Iskren Chernev Date: Mon, 23 Dec 2013 06:16:15 +0000 (-0800) Subject: Use makeAs in calendar too X-Git-Tag: 2.5.0^2~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93bcae3ebd2e84ef8a6bc83c5eab6edc985a9a4d;p=thirdparty%2Fmoment.git Use makeAs in calendar too --- diff --git a/moment.js b/moment.js index c29b111b7..87e0380db 100644 --- a/moment.js +++ b/moment.js @@ -1876,7 +1876,7 @@ calendar : function () { // We want to compare the start of today, vs this. // Getting start-of-today depends on whether we're zone'd or not. - var sod = (this._isUTC ? moment().zone(this.zone()) : moment()).startOf('day'), + var sod = makeAs(moment(), this).startOf('day'), diff = this.diff(sod, 'days', true), format = diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' :