AddDurationToOrSubtractDurationFromPlainYearMonth doesn't add "month" to calendar fields

Fixes #3546
This commit is contained in:
André Bargull 2022-06-01 17:03:41 +02:00 committed by Ms2ger
parent 53d6cd6d46
commit c61a04fd88
2 changed files with 8 additions and 8 deletions

View File

@ -105,7 +105,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 1 },
{ year: 2022, monthCode: "M02", day: 1 },
"first day of month 2 passed to dateFromFields when adding positive duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");
@ -120,7 +120,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 1 },
{ year: 2022, monthCode: "M02", day: 1 },
"first day of month 2 passed to dateFromFields when adding positive duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");
@ -135,7 +135,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 36 },
{ year: 2022, monthCode: "M02", day: 36 },
"last day of month 2 passed to dateFromFields when adding negative duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");
@ -150,7 +150,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 36 },
{ year: 2022, monthCode: "M02", day: 36 },
"last day of month 2 passed to dateFromFields when adding negative duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");

View File

@ -105,7 +105,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 36 },
{ year: 2022, monthCode: "M02", day: 36 },
"last day of month 2 passed to dateFromFields when subtracting positive duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");
@ -120,7 +120,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 36 },
{ year: 2022, monthCode: "M02", day: 36 },
"last day of month 2 passed to dateFromFields when subtracting positive duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");
@ -135,7 +135,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 1 },
{ year: 2022, monthCode: "M02", day: 1 },
"first day of month 2 passed to dateFromFields when subtracting negative duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");
@ -150,7 +150,7 @@ TemporalHelpers.assertPlainYearMonth(
assert.sameValue(calendar.dateFromFieldsCalls.length, 1, "dateFromFields was called");
assert.deepEqual(
calendar.dateFromFieldsCalls[0][0],
{ year: 2022, month: 2, monthCode: "M02", day: 1 },
{ year: 2022, monthCode: "M02", day: 1 },
"first day of month 2 passed to dateFromFields when subtracting negative duration"
);
assert.sameValue(calendar.dateFromFieldsCalls[0][1], undefined, "undefined options passed");