]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
see https://github.com/moment/moment/pull/1933#discussion_r18125806
authorWasil W Siargiejczyk <szelga.wws@gmail.com>
Sun, 28 Sep 2014 06:53:38 +0000 (12:53 +0600)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 17 Nov 2014 17:28:27 +0000 (09:28 -0800)
moment.js

index 354e895f33a751717bd6104942c0d785e2c5d7ff..2f898536db571a2b0f896578f843ea9eed4f473d 100644 (file)
--- a/moment.js
+++ b/moment.js
             lastWeek : '[Last] dddd [at] LT',
             sameElse : 'L'
         },
-        calendar : function (key, mom) {
+        calendar : function (key, mom, now) {
             var output = this._calendar[key];
-            return typeof output === 'function' ? output.apply(mom, Array.prototype.slice.call(arguments, 2)) : output;
+            return typeof output === 'function' ? output.apply(mom, [now]) : output;
         },
 
         _relativeTime : {