]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Add support for years outside 0000-9999.
authorJason Davies <jason@jasondavies.com>
Wed, 25 Jul 2012 17:53:39 +0000 (18:53 +0100)
committerJason Davies <jason@jasondavies.com>
Wed, 25 Jul 2012 17:53:39 +0000 (18:53 +0100)
1  2 
moment.js
test/moment/create.js

diff --cc moment.js
Simple merge
index 480386dca2fcc56540a3e41e21f36eaab01ae94e,4658f7b4595e3bb837cf5036d85c7bba3569aa02..815b933da1c128e34d5f2b3c9d2747f25f320e2c
@@@ -300,13 -297,9 +300,10 @@@ exports.create = 
      },
  
      "first century" : function(test) {
-         test.expect(6);
 -        test.expect(2);
++        test.expect(3);
          test.equal(moment([0, 0, 1]).format("YYYY-MM-DD"), "0000-01-01", "Year AD 0");
          test.equal(moment([99, 0, 1]).format("YYYY-MM-DD"), "0099-01-01", "Year AD 99");
-         test.equal(moment('0 1 1', 'YYYY MM DD').format("YYYY-MM-DD"), "0000-01-01", "Year AD 0");
-         test.equal(moment('99 1 1', 'YYYY MM DD').format("YYYY-MM-DD"), "0099-01-01", "Year AD 99");
-         test.equal(moment('999 1 1', 'YYYY MM DD').format("YYYY-MM-DD"), "0999-01-01", "Year AD 999");
 +        test.equal(moment([999, 0, 1]).format("YYYY-MM-DD"), "0999-01-01", "Year AD 999");
          test.done();
      },