From 980c2d976cb980ae492aaa2b24aa4c2548160661 Mon Sep 17 00:00:00 2001 From: Wasil W Siargiejczyk Date: Sun, 21 Sep 2014 15:53:32 +0600 Subject: [PATCH] pass present moment to a calendar function --- moment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 () { -- 2.47.3