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

index 9a9ea96b15caa51e00702d4be49a70d05f6e0c87..d8577dca55a66cd9f060dd3a4f2a053e1f5367d3 100644 (file)
--- a/moment.js
+++ b/moment.js
         },
         calendar : function (key, mom) {
             var output = this._calendar[key];
-            return typeof output === 'function' ? output.apply(mom) : output;
+            return typeof output === 'function' ? output.apply(mom, Array.prototype.slice.call(arguments, 2)) : output;
         },
 
         _relativeTime : {