]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
fixing jshint errors 1545/head
authorIsaac Cambron <isaac@isaaccambron.com>
Mon, 31 Mar 2014 16:38:56 +0000 (12:38 -0400)
committerIsaac Cambron <isaac@isaaccambron.com>
Mon, 31 Mar 2014 16:38:56 +0000 (12:38 -0400)
moment.js
test/moment/create.js

index 41a241ec4a07bdc13f26001fedc14637bad490d5..e1f77cb5bb2ded90b471e6b18982b9aa14333c48 100644 (file)
--- a/moment.js
+++ b/moment.js
         return moment.apply(null, arguments).parseZone();
     };
 
-    moment.parseTwoDigitYear = function(input) {
-      return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
-    }
+    moment.parseTwoDigitYear = function (input) {
+        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+    };
 
     /************************************
         Moment Prototype
index 70e36dae3b6ac861f3f7f8e8c338f0eebb2258ca..6dc4c75558990148915c0ee90cdc757a12f00052 100644 (file)
@@ -814,24 +814,21 @@ exports.create = {
     },
 
     'parsing with customized two-digit year' : function (test) {
-      var original = moment.parseTwoDigitYear;
-      try {
-        test.equal(moment('68', 'YY').year(), 2068);
-        test.equal(moment('69', 'YY').year(), 1969);
-        moment.parseTwoDigitYear = function(input){
-          return +input + (+input > 30 ? 1900 : 2000);
-        };
-        test.equal(moment('68', 'YY').year(), 1968);
-        test.equal(moment('67', 'YY').year(), 1967);
-        test.equal(moment('31', 'YY').year(), 1931);
-        test.equal(moment('30', 'YY').year(), 2030);
-
-      }
-      finally {
-        moment.parseTwoDigitYear = original;
-        test.done();
-      }
-
+        var original = moment.parseTwoDigitYear;
+        try {
+            test.equal(moment('68', 'YY').year(), 2068);
+            test.equal(moment('69', 'YY').year(), 1969);
+            moment.parseTwoDigitYear = function (input) {
+                return +input + (+input > 30 ? 1900 : 2000);
+            };
+            test.equal(moment('68', 'YY').year(), 1968);
+            test.equal(moment('67', 'YY').year(), 1967);
+            test.equal(moment('31', 'YY').year(), 1931);
+            test.equal(moment('30', 'YY').year(), 2030);
+        }
+        finally {
+            moment.parseTwoDigitYear = original;
+            test.done();
+        }
     }
-
 };