]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Whitespace
authorJohn Madhavan-Reese <jsmreese@pureshare.com>
Mon, 25 Aug 2014 16:28:21 +0000 (12:28 -0400)
committerIskren Chernev <iskren.chernev@gmail.com>
Fri, 5 Sep 2014 05:02:45 +0000 (22:02 -0700)
moment.js
test/moment/duration.js

index 5f70541359d87450f0bedabd5a5f750b032dbea0..0c19f59df66c78f0bbfec0ed65c939dfcf80ecb8 100644 (file)
--- a/moment.js
+++ b/moment.js
                 days = this._days + this._milliseconds / 864e5;
                 months = this._months + daysToYears(days) * 12;
                 return units === 'month' ? months : months / 12;
-                       } else {
-                               // handle milliseconds separately because of floating point math errors (issue #1867)
+            } else {
+                // handle milliseconds separately because of floating point math errors (issue #1867)
                 days = this._days + yearsToDays(this._months / 12);
                 switch (units) {
                     case 'week': return days / 7 + this._milliseconds / 6048e5;
                     case 'hour': return days * 24 + this._milliseconds / 36e5;
                     case 'minute': return days * 24 * 60 + this._milliseconds / 6e4;
                     case 'second': return days * 24 * 60 * 60 + this._milliseconds / 1000;
-                                       // Math.floor prevents floating point math errors here
+                    // Math.floor prevents floating point math errors here
                     case 'millisecond': return Math.floor(days * 24 * 60 * 60 * 1000) + this._milliseconds;
                     default: throw new Error('Unknown unit ' + units);
                 }
index 42e5699009e6e9fd648d99085b26cbdaa256b457..c8fd962410d708d3b273d67cc717f1d1bb63287e 100644 (file)
@@ -513,7 +513,7 @@ exports.duration = {
         test.done();
     },
 
-       'as getters for small units' : function (test) {
+    'as getters for small units' : function (test) {
         var dS = moment.duration(1, 'milliseconds'),
             ds = moment.duration(3, 'seconds'),
             dm = moment.duration(13, 'minutes');
@@ -529,7 +529,7 @@ exports.duration = {
         test.equal(dm.asMinutes(),        13, 'asMinutes()');
         test.done();
     },
-       
+
     'isDuration' : function (test) {
         test.expect(3);
         test.ok(moment.isDuration(moment.duration(12345678)), 'correctly says true');