From: Wasil W Siargiejczyk Date: Sun, 21 Sep 2014 09:53:32 +0000 (+0600) Subject: pass present moment to a calendar function X-Git-Tag: 2.8.4~4^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=980c2d976cb980ae492aaa2b24aa4c2548160661;p=thirdparty%2Fmoment.git pass present moment to a calendar function --- diff --git a/moment.js b/moment.js index d8577dca5..354e895f3 100644 --- a/moment.js +++ b/moment.js @@ -2276,7 +2276,7 @@ diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; - return this.format(this.localeData().calendar(format, this)); + return this.format(this.localeData().calendar(format, this, moment(now))); }, isLeapYear : function () {