dd : "%d jours",
M : "un mois",
MM : "%d mois",
- y : "une année",
- yy : "%d années"
+ y : "une an",
+ yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : 'ème');
dd : "%d jours",
M : "un mois",
MM : "%d mois",
- y : "une année",
- yy : "%d années"
+ y : "une an",
+ yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : 'ème');
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mois", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mois", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mois", "344 days = 11 months");
- test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une année", "345 days = a year");
- test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une année", "547 days = a year");
- test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 années", "548 days = 2 years");
- test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une année", "1 year = a year");
- test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 années", "5 years = 5 years");
+ test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une an", "345 days = a year");
+ test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une an", "547 days = a year");
+ test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ans", "548 days = 2 years");
+ test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une an", "1 year = a year");
+ test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ans", "5 years = 5 years");
test.done();
},
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mois", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mois", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mois", "344 days = 11 months");
- test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une année", "345 days = a year");
- test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une année", "547 days = a year");
- test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 années", "548 days = 2 years");
- test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une année", "1 year = a year");
- test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 années", "5 years = 5 years");
+ test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une an", "345 days = a year");
+ test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une an", "547 days = a year");
+ test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ans", "548 days = 2 years");
+ test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une an", "1 year = a year");
+ test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ans", "5 years = 5 years");
test.done();
},