Timothy Flynn
0d635100c4
LibJS: Port Date.parse string arguments to String
2024-11-26 15:02:07 -05:00
Timothy Flynn
fc6155cf2c
LibJS: Differentiate between failed ISO8601 parsing and invalid values
...
If we were able to parse an ISO8601 Date string, but the parse results
in an invalid date (e.g. out of the min/max range), we should abort
parsing immediately.
2024-11-26 15:02:07 -05:00
Timothy Flynn
511029807a
LibJS: Implement Date.prototype.toTemporalInstant
2024-11-26 15:02:07 -05:00
Timothy Flynn
8e8c133db5
LibJS: Use Temporal for the Date constructor and Date.now()
2024-11-26 15:02:07 -05:00
Timothy Flynn
7aee254708
LibJS: Use correct epoch offset in InterpretISODateTimeOffset
2024-11-26 15:02:00 -05:00
Timothy Flynn
a93d32a306
LibJS: Alphabetically sort property keys and error types
...
And make ErrorType definitions use a better hanging-indent style, to
make it easier to maintain going forward.
i.e. instead of:
M(VeryLongErrorNameHere, "very long error "
"message across multiple "
"lines"
We now have:
M(VeryLongErrorNameHere,
"very long error message across multiple "
"lines")
2024-11-26 11:35:15 -05:00
Timothy Flynn
6a9aec29d5
LibJS: Remove unused property names and error types
...
Held off on this during the Temporal rewrite in favor of just removing
these all in one go.
2024-11-26 11:35:15 -05:00
Timothy Flynn
ade510fe17
LibJS: Pass ISO types by value vs. const-reference more correctly
...
We were passing types like ISODate by reference so that they could be
used as forward-declarations. But after commit 021a5f4ded
, we now have
their full definitions anywhere they're needed. So let's pass ISODate by
value everywhere consistently - it is only 8 bytes.
2024-11-26 11:35:15 -05:00
Timothy Flynn
2d9405e5d7
LibJS: Use the TimeDuration alias a bit less in Temporal
...
It was a bit of a semantic mistake too use this alias too eagerly.
Namely, it should not be used to refer to epoch nanoseconds. We now only
use the TimeDuration alias where the spec refers to a value as a time
duration.
2024-11-26 11:35:15 -05:00
Jelle Raaijmakers
872a214f80
LibJS: Make FunctionPrototype's name empty per the spec
2024-11-26 12:44:05 +00:00
Jelle Raaijmakers
74614a10d1
LibJS: Correct spec table number for FunctionObject
2024-11-26 12:44:05 +00:00
Timothy Flynn
58828ffd62
LibJS: Implement Temporal.ZonedDateTime.prototype.to*
...
Includes:
Temporal.ZonedDateTime.prototype.toInstant
Temporal.ZonedDateTime.prototype.toPlainDate
Temporal.ZonedDateTime.prototype.toPlainTime
Temporal.ZonedDateTime.prototype.toPlainDateTime
2024-11-26 11:00:56 +01:00
Timothy Flynn
b95528d7b5
LibJS: Stub out Temporal.ZonedDateTime.prototype.getTimeZoneTransition
...
We will have to add facilities to determine next/previous time zone
transitions. Ideally, ICU can provide this.
2024-11-26 11:00:56 +01:00
Timothy Flynn
6d78f1327e
LibJS: Implement Temporal.ZonedDateTime.prototype.startOfDay
2024-11-26 11:00:56 +01:00
Timothy Flynn
3d0f384e01
LibJS: Implement Temporal.ZonedDateTime.prototype.with*
...
Includes:
Temporal.ZonedDateTime.prototype.with
Temporal.ZonedDateTime.prototype.withPlainTime
Temporal.ZonedDateTime.prototype.withCalendar
Temporal.ZonedDateTime.prototype.withTimeZone
2024-11-26 11:00:56 +01:00
Timothy Flynn
f2ab9e1aa9
LibJS: Implement Temporal.ZonedDateTime.prototype.round
2024-11-26 11:00:56 +01:00
Timothy Flynn
eadd0c40c9
LibJS: Implement Temporal.ZonedDateTime.prototype.since/until
2024-11-26 11:00:56 +01:00
Timothy Flynn
336efa5e3f
LibJS: Implement Temporal.ZonedDateTime.prototype.add/subtract/equals
2024-11-26 11:00:56 +01:00
Timothy Flynn
4ef21614e9
LibJS: Implement stringification Temporal.ZonedDateTime prototypes
2024-11-26 11:00:56 +01:00
Timothy Flynn
c0150acc5e
LibJS: Implement Temporal.*.prototype.toZonedDateTimeISO and friends
2024-11-26 11:00:56 +01:00
Timothy Flynn
18f95434bc
LibJS: Implement the Temporal.Duration relative-to ZonedDateTime options
2024-11-26 11:00:56 +01:00
Timothy Flynn
3e6133cc09
LibJS: Handle ZonedDateTime in the various Temporal factories
2024-11-26 11:00:56 +01:00
Timothy Flynn
8c73cae2b8
LibJS: Implement the Temporal.ZonedDateTime constructor
...
And the simple Temporal.ZonedDateTime.prototype getters, so that the
constructed Temporal.ZonedDateTime may actually be validated.
2024-11-26 11:00:56 +01:00
Timothy Flynn
8ab765a3eb
LibJS: Invoke CalendarDateToISO recursively correctly
...
Copy-paste mistake that becomes apparent in Temporal.ZonedDateTime
tests.
2024-11-26 11:00:56 +01:00
Pavel Shliak
4ae3a0dcba
LibJS: Make a __JS_ENUMERATE comment more informative
2024-11-25 13:17:03 -07:00
Timothy Flynn
f2c19f96f8
LibJS: Implement Temporal.Now
2024-11-25 13:32:58 +01:00
Timothy Flynn
f1c3e3d71a
LibJS: Implement Temporal.Instant.prototype.round
2024-11-25 13:32:58 +01:00
Timothy Flynn
477f00aced
LibJS: Implement Temporal.Instant.prototype.until/since
2024-11-25 13:32:58 +01:00
Timothy Flynn
1d67f28e72
LibJS: Implement Temporal.Instant.prototype.add/subtract/equals
2024-11-25 13:32:58 +01:00
Timothy Flynn
615ad70030
LibJS: Implement stringification Temporal.Instant prototypes
2024-11-25 13:32:58 +01:00
Timothy Flynn
90820873a2
LibJS: Implement the Temporal.Instant constructor
...
And the simple Temporal.Instant.prototype getters, so that the
constructed Temporal.Instant may actually be validated.
2024-11-25 13:32:58 +01:00
Timothy Flynn
1675f40e29
LibJS: Return a GC::Ref from the NumberToBigInt AO
...
All callers currently handle this without needing any further changes.
2024-11-25 13:32:58 +01:00
Timothy Flynn
82b540e501
LibJS: Implement Temporal.PlainDate.prototype.toPlainDateTime
2024-11-24 11:43:59 +01:00
Timothy Flynn
d22ea4db4c
LibJS: Implement Temporal.PlainDateTime.prototype.valueOf
2024-11-24 11:43:59 +01:00
Timothy Flynn
649328fed2
LibJS: Implement Temporal.PlainDateTime.prototype.toPlainDate/Time
2024-11-24 11:43:59 +01:00
Timothy Flynn
990daaf63a
LibJS: Implement Temporal.PlainDateTime.prototype.with* methods
...
Includes with, withCalendar, and withPlainTime.
2024-11-24 11:43:59 +01:00
Timothy Flynn
e3082b5bed
LibJS: Implement Temporal.PlainDateTime.prototype.round
2024-11-24 11:43:59 +01:00
Timothy Flynn
906d951104
LibJS: Implement Temporal.PlainDateTime.prototype.since/until
2024-11-24 11:43:59 +01:00
Timothy Flynn
85ffacacde
LibJS: Implement Temporal.PlainDateTime.prototype.add/subtract/equals
2024-11-24 11:43:59 +01:00
Timothy Flynn
d314fcce7a
LibJS: Implement stringification Temporal.PlainDateTime prototypes
2024-11-24 11:43:59 +01:00
Timothy Flynn
1a80161011
LibJS: Fix Temporal.PlainMonthDay.prototype.calendarId references
...
Small mistake porting old Temporal tests to the new spec. This getter
was `.calendar` in the old Temporal spec.
2024-11-24 11:43:59 +01:00
Timothy Flynn
029b6ad1a8
LibJS: Implement the Temporal.PlainDateTime constructor
...
And the simple Temporal.PlainDateTime.prototype getters, so that the
constructed Temporal.PlainDateTime may actually be validated.
2024-11-24 11:43:59 +01:00
Timothy Flynn
e37c9eaeff
LibJS: Implement Temporal.PlainTime.prototype.valueOf
2024-11-23 19:35:36 -05:00
Timothy Flynn
d639e9429f
LibJS: Implement Temporal.PlainTime.prototype.round/equals
2024-11-23 19:35:36 -05:00
Timothy Flynn
a0df194528
LibJS: Implement Temporal.PlainTime.prototype.with
2024-11-23 19:35:36 -05:00
Timothy Flynn
85eef698b9
LibJS: Implement Temporal.PlainTime.prototype.since/until
2024-11-23 19:35:36 -05:00
Timothy Flynn
1c22011ed6
LibJS: Implement Temporal.PlainTime.prototype.add/subtract
2024-11-23 19:35:36 -05:00
Timothy Flynn
ab3c825fa8
LibJS: Implement stringification Temporal.PlainTime prototypes
2024-11-23 19:35:36 -05:00
Timothy Flynn
66365fef57
LibJS: Implement the Temporal.PlainTime constructor
...
And the simple Temporal.PlainTime.prototype getters, so that the
constructed Temporal.PlainTime may actually be validated.
2024-11-23 19:35:36 -05:00
Timothy Flynn
971f794127
LibJS: Add and use a BigInt-aware override of BalanceTime
...
With Temporal.PlainTime, we will need precise results for extremely
large values.
2024-11-23 19:35:36 -05:00