From f781846c70eb5b3f29930268b224d6d0352a6333 Mon Sep 17 00:00:00 2001 From: Isaac Cambron Date: Mon, 31 Mar 2014 12:38:56 -0400 Subject: [PATCH] fixing jshint errors --- moment.js | 6 +++--- test/moment/create.js | 35 ++++++++++++++++------------------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/moment.js b/moment.js index 41a241ec4..e1f77cb5b 100644 --- a/moment.js +++ b/moment.js @@ -1771,9 +1771,9 @@ 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 diff --git a/test/moment/create.js b/test/moment/create.js index 70e36dae3..6dc4c7555 100644 --- a/test/moment/create.js +++ b/test/moment/create.js @@ -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(); + } } - }; -- 2.47.2