From: Iskren Chernev Date: Mon, 3 Feb 2014 06:01:03 +0000 (-0800) Subject: Fix armenian meridiem #1233 X-Git-Tag: 2.6.0~40^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F1457%2Fhead;p=thirdparty%2Fmoment.git Fix armenian meridiem #1233 --- diff --git a/lang/sq.js b/lang/sq.js index a5e44b5a5..b77d93a09 100644 --- a/lang/sq.js +++ b/lang/sq.js @@ -18,6 +18,9 @@ weekdays : "E Diel_E Hënë_E Marte_E Mërkure_E Enjte_E Premte_E Shtunë".split("_"), weekdaysShort : "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"), weekdaysMin : "D_H_Ma_Më_E_P_Sh".split("_"), + meridiem : function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, longDateFormat : { LT : "HH:mm", L : "DD/MM/YYYY", diff --git a/test/lang/sq.js b/test/lang/sq.js index 25ddfef3c..63f0f5b7b 100644 --- a/test/lang/sq.js +++ b/test/lang/sq.js @@ -57,7 +57,7 @@ exports["lang:sq"] = { ['H HH', '15 15'], ['m mm', '25 25'], ['s ss', '50 50'], - ['a A', 'pm PM'], + ['a A', 'MD MD'], ['[the] DDDo [day of the year]', 'the 45. day of the year'], ['L', '14/02/2010'], ['LL', '14 Shkurt 2010'], @@ -78,6 +78,15 @@ exports["lang:sq"] = { test.done(); }, + "meridiem" : function (test) { + test.expect(2); + + test.equal(moment([2011, 2, 23, 0, 0]).format('A'), "PD", "before dawn"); + test.equal(moment([2011, 2, 23, 12, 0]).format('A'), "MD", "noon"); + + test.done(); + }, + "format ordinal" : function (test) { test.expect(31); @@ -375,12 +384,12 @@ exports["lang:sq"] = { test.done(); }, - + "returns the name of the language" : function (test) { if (typeof module !== 'undefined' && module.exports) { test.equal(require('../../lang/sq'), 'sq', "module should export sq"); } - + test.done(); } };