Fix bug in PlainDate#since() test.

Fixes #3249.
This commit is contained in:
Ms2ger 2021-10-07 11:22:30 +02:00 committed by Rick Waldron
parent 7be8fca485
commit 64a1628d04
1 changed files with 2 additions and 2 deletions

View File

@ -21,6 +21,6 @@ TemporalHelpers.assertDuration(feb21.since(feb20, { largestUnit: "weeks" }), 0,
const lastFeb20 = Temporal.PlainDate.from("2020-02-29");
const lastFeb21 = Temporal.PlainDate.from("2021-02-28");
TemporalHelpers.assertDuration(lastFeb21.since(lastFeb20, { largestUnit: "years" }), 0, /* months = */ 11, 0, /* days = */ 28, 0, 0, 0, 0, 0, 0, 0, "end of February, years");
TemporalHelpers.assertDuration(lastFeb21.since(lastFeb20, { largestUnit: "months" }), 0, /* months = */ 11, 0, /* days = */ 28, 0, 0, 0, 0, 0, 0, "end of February, months");
TemporalHelpers.assertDuration(lastFeb21.since(lastFeb20, { largestUnit: "years" }), /* years = */ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "end of February, years");
TemporalHelpers.assertDuration(lastFeb21.since(lastFeb20, { largestUnit: "months" }), 0, /* months = */ 12, 0, 0, 0, 0, 0, 0, 0, 0, "end of February, months");
TemporalHelpers.assertDuration(lastFeb21.since(lastFeb20, { largestUnit: "weeks" }), 0, 0, /* weeks = */ 52, /* days = */ 1, 0, 0, 0, 0, 0, 0, "end of February, weeks");