]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Renaming internal variable to pass closure-compiler #63
authorTim Wood <washwithcare@gmail.com>
Mon, 14 Nov 2011 17:51:29 +0000 (09:51 -0800)
committerTim Wood <washwithcare@gmail.com>
Mon, 14 Nov 2011 17:51:29 +0000 (09:51 -0800)
moment.js

index c4fc97939bf90be2648cc41856bfd5808d4bf63d..16b7347402dd12cc5e2dc50eab6d46f6fa00f243 100644 (file)
--- a/moment.js
+++ b/moment.js
             return this;
         },
 
-        diff : function (input, val, float) {
+        diff : function (input, val, asFloat) {
             var inputMoment = moment(input),
                 diff = this._d - inputMoment._d, 
                 year = this.year() - inputMoment.year(), 
                     val === 'weeks' ? diff / 6048e5 : // 1000 * 60 * 60 * 24 * 7
                     val === 'days' ? diff / 3600 : diff;
             }
-            return float ? output : round(output);
+            return asFloat ? output : round(output);
         },
 
         from : function (time, withoutSuffix) {