Commit graph

21 commits

Author SHA1 Message Date
Timothy Flynn
ea52952774 LibJS: Update Date AOs to use Temporal
Neglected to do this after the Temporal rewrite. This lets us eliminate
the duplicated GetUTCEpochNanoseconds definition in Temporal.
2025-03-01 14:49:20 +01:00
Timothy Flynn
6b8acc0af5 LibJS: Ensure DifferenceISODateTime receives valid ISO date-times
This is an editorial change in the Temporal proposal. See:
b5da334
2024-12-06 11:13:10 -05:00
Timothy Flynn
6dfa6993e5 LibJS: Add workaround for invalid ISODateTimes in DifferenceISODateTime
The assertions can be hit when Temporal.Duration.prototype.round / total
are provided a PlainDate at the very limits of valid date-times. Tests
were recently added to test262 which trip these assertions, thus we are
now crashing in those tests. Let's throw a RangeError instead, as this
is the behavior expected by the tests.
2024-12-05 15:29:08 -05:00
Timothy Flynn
0e81092685 LibJS: Make CombineDateAndTimeDuration infallible
This is an editorial change in the Temporal proposal. See:
794960c
2024-12-05 15:29:08 -05:00
Timothy Flynn
4f07cddb2d LibJS: Mark TemporalDurationFromInternal as infallible in difference AOs
This is an editorial change in the Temporal proposal. See:
76c6612
2024-12-05 15:29:08 -05:00
Timothy Flynn
5c0c1e507c LibJS: Reverse date comparison in DifferenceISODateTime
This is an editorial change in the Temporal proposal. See:
4a8cdb5
2024-12-05 15:29:08 -05:00
Timothy Flynn
16aebef4f4 LibJS: Make DifferenceISODateTime infallible
This is an editorial change in the Temporal proposal. See:
df74f7f
2024-12-05 15:29:08 -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
3e6133cc09 LibJS: Handle ZonedDateTime in the various Temporal factories 2024-11-26 11:00:56 +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
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
d0149d8fc0 LibJS: Begin implementing the relativeTo option of Duration.total 2024-11-23 14:46:00 +01:00
Timothy Flynn
70ad66d3c0 LibJS: Begin implementing the relativeTo option of Duration.round 2024-11-23 14:46:00 +01:00
Timothy Flynn
06593b1894 LibJS: Implement most of GetTemporalRelativeToOption
Now that we have the Temporal.PlainDate object, we can flesh out this AO
for such relative-to objects.
2024-11-23 14:46:00 +01:00
Timothy Flynn
cb5d1b5086 LibJS: Implement Temporal.PlainYearMonth.prototype.until/since 2024-11-22 19:55:24 +01:00
Timothy Flynn
1a386e78c3 LibJS: Implement the Temporal.PlainMonthDay constructor
And the simple Temporal.PlainMonthDay.prototype getters, so that the
constructed Temporal.PlainMonthDay may actually be validated.
2024-11-21 19:24:25 -05:00
Timothy Flynn
f7517c5b8d LibJS: Remove our existing Temporal implementation
Our Temporal implementation is woefully out of date. The spec has been
so vastly rewritten that it is unfortunately not practical to update our
implementation in-place. Even just removing Temporal objects that were
removed from the spec, or updating any of the simpler remaining objects,
has proven to be a mess in previous attempts.

So, this removes our Temporal implementation. AOs used by other specs
are left intact.
2024-11-20 19:04:30 -05:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp (Browse further)