Linus Groh
90fa356b93
LibJS: Implement Temporal.Duration.prototype.toJSON()
2021-11-07 15:31:28 +01:00
Linus Groh
b2548393d2
LibJS: Implement Temporal.Duration.prototype.toString()
...
I hereby claim "implemented largest AO in LibJS ever" (450 lines). :^)
2021-11-07 15:31:28 +01:00
Linus Groh
36b51276d5
LibJS: Change calendar_date_add() date parameter from PlainDate to Value
...
Turns out use of this AO is a bit more flexible than I anticipated.
2021-11-07 15:31:28 +01:00
Luke Wilde
706296374b
LibJS: Implement Temporal.ZonedDateTime.prototype.equals
2021-11-07 15:35:16 +02:00
Luke Wilde
ac12581140
LibJS: Implement Temporal.ZonedDateTime.compare
2021-11-07 15:35:16 +02:00
Luke Wilde
c9ec3295d9
LibJS: Implement Temporal.ZonedDateTime.from
2021-11-07 15:35:16 +02:00
Luke Wilde
2b89d2a360
LibJS: Implement ToTemporalZonedDateTime and the required AOs
2021-11-07 15:35:16 +02:00
Luke Wilde
b8db0ddc70
LibJS: Implement Temporal.ZonedDateTime.prototype.withCalendar
2021-11-05 09:49:47 +01:00
Luke Wilde
58bb73b60f
LibJS: Implement Temporal.ZonedDateTime.prototype.withTimeZone
2021-11-05 09:49:47 +01:00
Luke Wilde
d5f2745a19
LibJS: Implement Temporal.ZonedDateTime.prototype.withPlainDate
2021-11-05 09:49:47 +01:00
Luke Wilde
132a56f07c
LibJS: Implement Temporal.ZonedDateTime.prototype.withPlainTime
2021-11-05 09:49:47 +01:00
Linus Groh
1dc32fed8f
LibJS: Adjust approximated result in year_from_time() if necessary
2021-11-05 01:18:27 +01:00
Linus Groh
37146e305a
LibJS: Account for leap days in year_from_time()
...
A year has 365.2425 days, not 365. This lead to off-by-one results for
time values (milliseconds) near the end of a year, which would lead to
calculation issues and crashes in other AOs.
Fixes #10796 .
2021-11-05 01:09:18 +01:00
Linus Groh
0dae7c9420
LibJS: Replace a couple of TODO()'s in Temporal with InternalError
...
This helps us to distinguish between crashes because of incomplete code
paths and crashes because of genuine bugs more easily when running
test262.
2021-11-04 23:59:40 +01:00
Linus Groh
dd1a808f7e
LibJS: Remove TODO() from implemented code path
...
Well, that's embarassing. TODO()'d it, implemented it, forgot to remove
the TODO().
2021-11-04 23:59:40 +01:00
Linus Groh
38809f90d9
LibJS: Introduce & use FormatISOTimeZoneOffsetString
...
This is a normative change in the Temporal spec.
See: 6b7a993
2021-11-04 16:45:54 +01:00
Linus Groh
d129e1ff29
LibJS: Move common code into RejectObjectWithCalendarOrTimeZone
...
This is an editorial change in the Temporal spec.
See: 5654fe0
2021-11-04 16:17:26 +01:00
Linus Groh
bb60629d3b
LibJS: Update ToTemporalTimeRecord to not require all properties
...
This is a normative change in the Temporal spec.
See: 84b7d53
2021-11-04 16:17:26 +01:00
Luke Wilde
c001926752
LibJS: Implement Temporal.ZonedDateTime.prototype.startOfDay
2021-11-04 12:11:33 +01:00
Luke Wilde
d1a5254e41
LibJS: Implement Temporal.PlainDateTime.prototype.round
2021-11-03 19:48:08 +01:00
Luke Wilde
84f79d4c51
LibJS: Implement Temporal.ZonedDateTime.prototype.hoursInDay
2021-11-03 17:55:04 +01:00
Luke Wilde
e42431ec7c
LibJS: Implement Temporal.PlainDateTime.prototype.toJSON
2021-11-03 11:03:30 +01:00
Luke Wilde
2a98b521b4
LibJS: Implement Temporal.PlainDateTime.prototype.toLocaleString
2021-11-03 11:03:30 +01:00
Luke Wilde
b2bbd4d2b8
LibJS: Implement Temporal.PlainDateTime.prototype.toString
2021-11-03 11:03:30 +01:00
Luke Wilde
b83e3fd01d
LibJS: Implement Temporal.PlainTime.prototype.round
2021-11-02 21:42:40 +01:00
Idan Horowitz
853fab352d
LibJS: Convert the InitializeReferencedBinding AO to ThrowCompletionOr
2021-11-02 19:48:35 +01:00
Idan Horowitz
1aaaf521b8
LibJS: Convert the PutValue AO to ThrowCompletionOr
2021-11-02 19:48:35 +01:00
Idan Horowitz
390a04a985
LibJS: Convert the GetValue AO to ThrowCompletionOr
2021-11-02 19:48:35 +01:00
Idan Horowitz
d73b258874
LibJS: Convert reference deletion to ThrowCompletionOr
2021-11-02 19:48:35 +01:00
Linus Groh
330ac1e5ad
LibJS: Implement Temporal.PlainTime.prototype.toZonedDateTime()
2021-11-02 18:40:37 +01:00
Linus Groh
070f056926
LibJS: Implement Temporal.PlainDateTime.prototype.toZonedDateTime()
2021-11-02 18:40:37 +01:00
Linus Groh
e27bb94038
LibJS: Implement Temporal.PlainDate.prototype.toZonedDateTime()
2021-11-02 18:40:37 +01:00
Linus Groh
0e537e2e1f
LibJS/Tests: Fix arg name in Instant.prototype.toZonedDateTime() test
...
"item", not "items".
2021-11-02 17:51:02 +01:00
Linus Groh
654380c2c2
LibJS: Implement Temporal.PlainDate.prototype.subtract()
2021-11-02 13:29:25 +01:00
Linus Groh
bcd96c80f3
LibJS: Implement Temporal.PlainDate.prototype.add()
2021-11-02 13:29:25 +01:00
Linus Groh
07b0aded99
LibJS: Implement Temporal.PlainDateTime.prototype.subtract()
2021-11-02 09:24:35 +01:00
Linus Groh
c4e371b3da
LibJS: Implement Temporal.PlainDateTime.prototype.add()
2021-11-02 09:24:35 +01:00
Linus Groh
643a2433db
LibJS: Enable Temporal.Calendar.prototype.dateAdd() test that now passes
2021-11-02 09:24:35 +01:00
Linus Groh
d49bbb1da3
LibJS: Implement TODO()'d parts of balance_duration()
...
Massive :yakstack:, so I understand why it was skipped in the first
place :^)
2021-11-02 09:24:35 +01:00
Luke Wilde
17fd08d752
LibJS: Implement Temporal.PlainTime.prototype.subtract()
...
a
2021-11-01 23:51:23 +01:00
Luke Wilde
4bf391ff4b
LibJS: Implement Temporal.PlainTime.prototype.add()
2021-11-01 23:51:23 +01:00
Linus Groh
97f6c6029f
LibJS: Implement Temporal.TimeZone.prototype.getInstantFor()
2021-11-01 21:39:45 +01:00
Idan Horowitz
2eaed880b1
LibJS: Remove old Native Functions
...
Now that all the usages were updated to the new ThrowCompletionOr based
version we can remove the legacy version.
2021-10-31 18:20:37 +02:00
Idan Horowitz
bcf168f771
LibJS: Use ThrowCompletionOr accessors in CreateMappedArgumentsObject
2021-10-31 18:20:37 +02:00
Timothy Flynn
e8f722fb27
LibJS: Convert %IteratorPrototype% to ThrowCompletionOr
2021-10-31 07:50:30 +02:00
Timothy Flynn
d1abf3d8ce
LibJS: Convert ObjectConstructor to ThrowCompletionOr
2021-10-31 07:50:30 +02:00
Timothy Flynn
0f224779aa
LibJS: Convert ObjectConstructor GetOwnPropertyKeys to ThrowCompletionOr
2021-10-31 07:50:30 +02:00
Timothy Flynn
e92d14d498
LibJS: Convert GlobalObject to ThrowCompletionOr
2021-10-31 07:50:30 +02:00
Timothy Flynn
875b563664
LibJS: Convert GlobalObject's Encode and Decode AOs to ThrowCompletionOr
2021-10-31 07:50:30 +02:00
Timothy Flynn
2a967fd107
LibJS: Convert Object.prototype to ThrowCompletionOr
2021-10-31 07:50:30 +02:00