From 94305dc2c1bd919a91aae217cbc6d449e29feb3a Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Sun, 2 Feb 2014 22:01:03 -0800 Subject: [PATCH] Fix armenian meridiem #1233 --- lang/sq.js | 3 +++ test/lang/sq.js | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) 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(); } }; -- 2.47.2