Skip to content

Commit ab06866

Browse files
committed
[Temporal] Remove test/staging/Temporal/v8/calendar-months-in-year.js
And move tests into separate files for each type.
1 parent 0d3ca0d commit ab06866

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

test/built-ins/Temporal/PlainDate/prototype/monthsInYear/basic.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ features: [Temporal]
99

1010
const plainDate = new Temporal.PlainDate(1976, 11, 18);
1111
assert.sameValue(plainDate.monthsInYear, 12);
12+
assert.sameValue((new Temporal.PlainDate(1234, 7, 15)).monthsInYear, 12);
13+
assert.sameValue(Temporal.PlainDate.from('2019-03-18').monthsInYear, 12);
14+
assert.sameValue(Temporal.PlainDate.from('1234-03-18').monthsInYear, 12);

test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/basic.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ features: [Temporal]
99

1010
const datetime = new Temporal.PlainDateTime(1976, 11, 18, 15, 23, 30, 123, 456, 789, "iso8601");
1111
assert.sameValue(datetime.monthsInYear, 12, "check months in year information");
12+
assert.sameValue((new Temporal.PlainDateTime(1234, 8, 23, 5, 30, 13)).monthsInYear, 12);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (C) 2026 Igalia, S.L. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
4+
/*---
5+
esid: sec-get-temporal.zoneddatetime.prototype.monthsinyear
6+
description: Checking months in year for a "normal" case (non-undefined, non-boundary case, etc.)
7+
features: [Temporal]
8+
---*/
9+
10+
const zdt = new Temporal.ZonedDateTime(217178610123456789n, "UTC");
11+
assert.sameValue(zdt.monthsInYear, 12, "check months in year information");
12+
assert.sameValue((new Temporal.ZonedDateTime(-23205637787000000000n, "UTC")).monthsInYear, 12);

test/staging/Temporal/v8/calendar-months-in-year.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)