From: Jeeeyul Date: Thu, 19 Dec 2013 09:23:24 +0000 (+0900) Subject: Apply coding convention X-Git-Tag: 2.5.0^2~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fd81ee7583fff010cf006fa42aa4f72ac714563;p=thirdparty%2Fmoment.git Apply coding convention --- diff --git a/lang/ko.js b/lang/ko.js index 1f87c55fb..88639d6fb 100644 --- a/lang/ko.js +++ b/lang/ko.js @@ -56,8 +56,8 @@ }, ordinal : '%d일', meridiemParse : /(오전|오후)/i, - isPM : function(token){ - return token == "오후"; + isPM : function (token) { + return token === "오후"; } }); })); diff --git a/test/lang/ko.js b/test/lang/ko.js index f77d340b8..f6a533abf 100644 --- a/test/lang/ko.js +++ b/test/lang/ko.js @@ -37,43 +37,42 @@ exports["lang:kr"] = { test.done(); }, - - "parse meridiem" : function (test){ - var elements = [{ - expression : "1981년 9월 8일 오후 2시 30분", - inputFormat : "YYYY[년] M[월] D[일] A h[시] m[분]", - outputFormat : "A", - expected : "오후" - },{ - expression : "1981년 9월 8일 오전 2시 30분", - inputFormat : "YYYY[년] M[월] D[일] A h[시] m[분]", - outputFormat : "A h시", - expected : "오전 2시" - },{ - expression : "14시 30분", - inputFormat : "H[시] m[분]", - outputFormat : "A", - expected : "오후" - },{ - expression : "오후 4시", - inputFormat : "A h[시]", - outputFormat : "H", - expected : "16" - }]; + "parse meridiem" : function (test) { + var elements = [{ + expression : "1981년 9월 8일 오후 2시 30분", + inputFormat : "YYYY[년] M[월] D[일] A h[시] m[분]", + outputFormat : "A", + expected : "오후" + },{ + expression : "1981년 9월 8일 오전 2시 30분", + inputFormat : "YYYY[년] M[월] D[일] A h[시] m[분]", + outputFormat : "A h시", + expected : "오전 2시" + },{ + expression : "14시 30분", + inputFormat : "H[시] m[분]", + outputFormat : "A", + expected : "오후" + },{ + expression : "오후 4시", + inputFormat : "A h[시]", + outputFormat : "H", + expected : "16" + }]; - test.expect(elements.length); - - elements.forEach(function(it){ - var actual = moment(it.expression, it.inputFormat).format(it.outputFormat); - - test.equal( - actual, - it.expected, - "'" + it.outputFormat + "' of '" + it.expression + "' must be '" + it.expected + "' but was '" + actual + "'." - ); - }); - - test.done(); + test.expect(elements.length); + + elements.forEach(function(it){ + var actual = moment(it.expression, it.inputFormat).format(it.outputFormat); + + test.equal( + actual, + it.expected, + "'" + it.outputFormat + "' of '" + it.expression + "' must be '" + it.expected + "' but was '" + actual + "'." + ); + }); + + test.done(); }, "format" : function (test) {