From: Tim Wood Date: Wed, 7 Nov 2012 21:06:42 +0000 (-0800) Subject: Failing tests for iso week format tokens X-Git-Tag: 2.0.0~35^2~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e525b370acda23382d3672bb378330eb3b219c6;p=thirdparty%2Fmoment.git Failing tests for iso week format tokens --- diff --git a/test/moment/weeks.js b/test/moment/weeks.js index d774078b4..d262a5e6e 100644 --- a/test/moment/weeks.js +++ b/test/moment/weeks.js @@ -112,6 +112,18 @@ exports.utc = { test.equal(moment([2011, 0, 9]).isoWeek(), 1, "Jan 9 2011 should be iso week 1"); test.equal(moment([2011, 0, 10]).isoWeek(), 2, "Jan 10 2011 should be iso week 2"); + test.done(); + }, + + "iso weeks year starting sunday formatted" : function(test) { + test.expect(5); + + test.equal(moment([2012, 0, 1]).format('W WW Wo'), '52 52 52nd', "Jan 1 2012 should be iso week 52"); + test.equal(moment([2012, 0, 2]).format('W WW Wo'), '1 01 1st' , "Jan 2 2012 should be iso week 1"); + test.equal(moment([2012, 0, 8]).format('W WW Wo'), '1 01 1st' , "Jan 8 2012 should be iso week 1"); + test.equal(moment([2012, 0, 9]).format('W WW Wo'), '2 02 2nd' , "Jan 9 2012 should be iso week 2"); + test.equal(moment([2012, 0, 15]).format('W WW Wo'), '2 02 2nd' , "Jan 15 2012 should be iso week 2"); + test.done(); } };