]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
pass present moment to a calendar function
authorWasil W Siargiejczyk <szelga.wws@gmail.com>
Sun, 21 Sep 2014 09:53:32 +0000 (15:53 +0600)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 17 Nov 2014 17:28:27 +0000 (09:28 -0800)
moment.js

index d8577dca55a66cd9f060dd3a4f2a053e1f5367d3..354e895f33a751717bd6104942c0d785e2c5d7ff 100644 (file)
--- a/moment.js
+++ b/moment.js
                     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 () {