diff --git a/test/built-ins/Temporal/PlainDate/prototype/monthsInYear/basic.js b/test/built-ins/Temporal/PlainDate/prototype/monthsInYear/basic.js index 96cb9b67522..219f016c3da 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/monthsInYear/basic.js +++ b/test/built-ins/Temporal/PlainDate/prototype/monthsInYear/basic.js @@ -9,3 +9,6 @@ features: [Temporal] const plainDate = new Temporal.PlainDate(1976, 11, 18); assert.sameValue(plainDate.monthsInYear, 12); +assert.sameValue((new Temporal.PlainDate(1234, 7, 15)).monthsInYear, 12); +assert.sameValue(Temporal.PlainDate.from('2019-03-18').monthsInYear, 12); +assert.sameValue(Temporal.PlainDate.from('1234-03-18').monthsInYear, 12); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/basic.js b/test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/basic.js index 579b6e619b6..b2eaddca326 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/basic.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/basic.js @@ -9,3 +9,4 @@ features: [Temporal] const datetime = new Temporal.PlainDateTime(1976, 11, 18, 15, 23, 30, 123, 456, 789, "iso8601"); assert.sameValue(datetime.monthsInYear, 12, "check months in year information"); +assert.sameValue((new Temporal.PlainDateTime(1234, 8, 23, 5, 30, 13)).monthsInYear, 12); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/monthsInYear/basic.js b/test/built-ins/Temporal/ZonedDateTime/prototype/monthsInYear/basic.js new file mode 100644 index 00000000000..88a2b7f2f38 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/monthsInYear/basic.js @@ -0,0 +1,12 @@ +// Copyright (C) 2026 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.monthsinyear +description: Checking months in year for a "normal" case (non-undefined, non-boundary case, etc.) +features: [Temporal] +---*/ + +const zdt = new Temporal.ZonedDateTime(217178610123456789n, "UTC"); +assert.sameValue(zdt.monthsInYear, 12, "check months in year information"); +assert.sameValue((new Temporal.ZonedDateTime(-23205637787000000000n, "UTC")).monthsInYear, 12); diff --git a/test/staging/Temporal/v8/calendar-months-in-year.js b/test/staging/Temporal/v8/calendar-months-in-year.js deleted file mode 100644 index 5aff81e8616..00000000000 --- a/test/staging/Temporal/v8/calendar-months-in-year.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: pending -description: > - Automatically ported from calendar-months-in-year test - in V8's mjsunit test calendar-months-in-year.js -features: [Temporal] ----*/ - -assert.sameValue((new Temporal.PlainDate(2021, 7, 15)).monthsInYear, 12); -assert.sameValue((new Temporal.PlainDate(1234, 7, 15)).monthsInYear, 12); -assert.sameValue((new Temporal.PlainDateTime(1997, 8, 23, 5, 30, 13)).monthsInYear, 12); -assert.sameValue((new Temporal.PlainDateTime(1234, 8, 23, 5, 30, 13)).monthsInYear, 12); -assert.sameValue(Temporal.PlainDate.from('2019-03-18').monthsInYear, 12); -assert.sameValue(Temporal.PlainDate.from('1234-03-18').monthsInYear, 12);