]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fixing #92
authorTim Wood <washwithcare@gmail.com>
Fri, 9 Dec 2011 17:27:16 +0000 (19:27 +0200)
committerTim Wood <washwithcare@gmail.com>
Fri, 9 Dec 2011 17:27:16 +0000 (19:27 +0200)
moment.js
sitesrc/js/unit-tests.js

index 0cce77f360b5912c1627d89ad8c0f58f5f96d5ff..d2da69003cff01a8f4637d37b7ef78556e71b1eb 100644 (file)
--- a/moment.js
+++ b/moment.js
             inArray[3] += 12;
         }
         // if is 12 am, change hours to 0
-        if (! isPm && inArray[3] === 12) {
+        if (isPm === false && inArray[3] === 12) {
             inArray[3] = 0;
         }
         // handle timezone
index da8d63f0d17981cb868e91cecfc942530725e8a0..ea73b5100da2216cfb28c600a18c436973da5cd3 100755 (executable)
@@ -58,7 +58,7 @@ test("string without format", 2, function() {
 });
 
 
-test("string with format", 17, function() {
+test("string with format", 18, function() {
     var a = [
             ['MM-DD-YYYY',          '12-02-1999'],
             ['DD-MM-YYYY',          '12-02-1999'],
@@ -75,6 +75,7 @@ test("string with format", 17, function() {
             ['h:mm a',              '12:30 pm'],
             ['h:mm a',              '12:00 am'],
             ['h:mm a',              '12:30 am'],
+            ['HH:mm',               '12:00'],
             ['YYYY-MM-DDTHH:mm:ss', '2011-11-11T11:11:11'],
             ['MM-DD-YYYY \\M',          '12-02-1999 M']
         ],