]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
fixing bad test for #622 #620 #617
authorTim Wood <washwithcare@gmail.com>
Mon, 11 Feb 2013 21:24:46 +0000 (22:24 +0100)
committerTim Wood <washwithcare@gmail.com>
Mon, 11 Feb 2013 21:24:46 +0000 (22:24 +0100)
test/moment/diff.js

index f3538c07a78eb920b287ba1c65afeea55db0f596..53049d46d6a9d7077edebeae66a7f83abff2b475 100644 (file)
@@ -96,7 +96,7 @@ exports.diff = {
         test.expect(7);
 
         test.equal(moment([2011]).utc().diff([2010], 'years'), 1, "year diff");
-        test.equal(moment([2010, 2]).utc().diff([2010], 'months'), 2, "month diff");
+        test.equal(moment([2010, 2, 2]).utc().diff([2010, 0, 2], 'months'), 2, "month diff");
         test.equal(moment([2010, 0, 4]).utc().diff([2010], 'days'), 3, "day diff");
         test.equal(moment([2010, 0, 22]).utc().diff([2010], 'weeks'), 3, "week diff");
         test.equal(moment([2010, 0, 1, 4]).utc().diff([2010], 'hours'), 4, "hour diff");