]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
hungarian language, meridiem added 1571/head
authorRomeo Vegvari <romeo@anyvan.com>
Tue, 1 Apr 2014 09:39:38 +0000 (10:39 +0100)
committerRomeo Vegvari <romeo@anyvan.com>
Tue, 1 Apr 2014 09:39:38 +0000 (10:39 +0100)
lang/hu.js
test/lang/hu.js

index 4d84ebdf6be17b3e718e65c431970732f50f3086..9833024cdb8981e579e7ffaa4311027eb56f74fd 100644 (file)
             LLL : "YYYY. MMMM D., LT",
             LLLL : "YYYY. MMMM D., dddd LT"
         },
+        meridiem : function (hours, minutes, isLower) {
+            if (hours < 12) {
+                return isLower === true ? 'de' : 'DE';
+            } else {
+                return isLower === true ? 'du' : 'DU';
+            }
+        },
         calendar : {
             sameDay : '[ma] LT[-kor]',
             nextDay : '[holnap] LT[-kor]',
index 192966b29188b582295c16c46b1521553bf0e520..1313edaf608ad70826817af029ee3d3a5a80670a 100644 (file)
@@ -70,6 +70,22 @@ exports["lang:hu"] = {
         test.done();
     },
 
+    "meridiem" : function (test) {
+        test.expect(8);
+
+        test.equal(moment([2011, 2, 23,  0,  0]).format('a'), "de", "am");
+        test.equal(moment([2011, 2, 23, 11, 59]).format('a'), "de", "am");
+        test.equal(moment([2011, 2, 23, 12,  0]).format('a'), "du", "pm");
+        test.equal(moment([2011, 2, 23, 23, 59]).format('a'), "du", "pm");
+
+        test.equal(moment([2011, 2, 23,  0,  0]).format('A'), "DE", "AM");
+        test.equal(moment([2011, 2, 23, 11, 59]).format('A'), "DE", "AM");
+        test.equal(moment([2011, 2, 23, 12,  0]).format('A'), "DU", "PM");
+        test.equal(moment([2011, 2, 23, 23, 59]).format('A'), "DU", "PM");
+
+        test.done();
+    },
+
     "format ordinal" : function (test) {
         test.expect(31);
 
@@ -353,12 +369,12 @@ exports["lang:hu"] = {
 
         test.done();
     },
-    
+
     "returns the name of the language" : function (test) {
         if (typeof module !== 'undefined' && module.exports) {
             test.equal(require('../../lang/hu'), 'hu', "module should export hu");
         }
-        
+
         test.done();
     }
 };