]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix armenian meridiem #1233 1457/head
authorIskren Chernev <iskren.chernev@gmail.com>
Mon, 3 Feb 2014 06:01:03 +0000 (22:01 -0800)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 3 Feb 2014 06:01:03 +0000 (22:01 -0800)
lang/sq.js
test/lang/sq.js

index a5e44b5a5aa4e11ae8c7701f2d2b18874812b3e4..b77d93a0950075556227e305bf5433781c76ed09 100644 (file)
@@ -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",
index 25ddfef3c563206f3e00dbbc01532c0a2ccbcc12..63f0f5b7b0759cfbc3a66284248a2a082588127c 100644 (file)
@@ -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();
     }
 };