10BC0 [Temporal] Add calendarId property for PlainDate and PlainDateTime · beidson/WebKit@e1edd28 · GitHub
[go: up one dir, main page]

Skip to content

Commit e1edd28

Browse files
catamorphismConstellation
authored andcommitted
[Temporal] Add calendarId property for PlainDate and PlainDateTime
https://bugs.webkit.org/show_bug.cgi?id=300365 Reviewed by Yusuke Suzuki. Currently, only the iso8601 calendar is supported. However, it's still useful to have a working calendarId property, as many test262 tests depend on it (in particular, tests for toPlainDate() on PlainYearMonth and PlainMonthDay). * JSTests/stress/temporal-plaindate.js: * JSTests/test262/config.yaml: * JSTests/test262/expectations.yaml: * Source/JavaScriptCore/runtime/TemporalPlainDatePrototype.cpp: (JSC::JSC_DEFINE_CUSTOM_GETTER): * Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp: (JSC::JSC_DEFINE_CUSTOM_GETTER): Canonical link: https://commits.webkit.org/301189@main
1 parent f632941 commit e1edd28

File tree

5 files changed

+43
-512
lines changed

5 files changed

+43
-512
lines changed

JSTests/stress/temporal-plaindate.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,3 +423,7 @@ shouldBe(Temporal.PlainDate.prototype.until.length, 1);
423423
shouldThrow(() => { date.until('2019-02-28', { largestUnit: 'hour' }); }, RangeError);
424424
shouldThrow(() => { date.until('2019-02-28', { largestUnit: 'day', smallestUnit: 'month' }); }, RangeError);
425425
}
426+
427+
{
428+
shouldBe(new Temporal.PlainDate(2000, 5, 2, "iso8601").calendarId, "iso8601");
429+
}

JSTests/test262/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ skip:
239239

240240
# Depends on Calendar support
241241
- test/built-ins/Temporal/PlainDate/basic.js
242+
- test/built-ins/Temporal/PlainDate/calendar-case-insensitive.js
243+
- test/built-ins/Temporal/PlainDate/calendar-invalid-iso-string.js
242244
- test/built-ins/Temporal/PlainDate/calendar-number.js
243245
- test/built-ins/Temporal/PlainDate/calendar-wrong-type.js
244246
- test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calendar-leap-second.js
@@ -296,6 +298,8 @@ skip:
296298
- test/built-ins/Temporal/PlainDate/prototype/until/argument-string-invalid.js
297299
- test/built-ins/Temporal/PlainDate/prototype/until/calendar-temporal-object.js
298300
- test/built-ins/Temporal/PlainDate/prototype/until/order-of-operations.js
301+
- test/built-ins/Temporal/PlainDateTime/calendar-case-insensitive.js
302+
- test/built-ins/Temporal/PlainDateTime/calendar-invalid-iso-string.js
299303
- test/built-ins/Temporal/PlainDateTime/calendar-number.js
300304
- test/built-ins/Temporal/PlainDateTime/calendar-wrong-type.js
301305
- test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-leap-second.js

0 commit comments

Comments
 (0)
0