Commit graph

6 commits

Author SHA1 Message Date
Timothy Flynn
c3fc8996bf LibJS: Refer to RFC 9557 instead of ISO 8601 where appropriate
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/9bb84b2
2025-01-17 10:08:06 +01:00
Timothy Flynn
0b59971ef9 LibJS: Reject ambiguous annotated time strings
This missing rejection will be caught by an upcoming Temporal.PlainTime
test.
2024-11-23 19:35:36 -05:00
Timothy Flynn
b3b968bed9 LibJS: Implement several more ISO8601 productions
This started with implementing TemporalMonthDayString. It turns out that
the facilities needed to parse that production includes nearly all the
helpers to parse each of:

    TemporalDateTimeString
    TemporalInstantString
    TemporalMonthDayString
    TemporalTimeString
    TemporalYearMonthString
    TemporalZonedDateTimeString

As most of these invoke the same helpers with different options. So,
all 6 of those productions are implemented here.
2024-11-21 19:24:25 -05:00
Timothy Flynn
5fe0d3352d LibJS: Implement the Temporal.Duration constructor
This also includes a stubbed Temporal.Duration.prototype.

Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.compare (and its invoked AOs) are left unimplemented.
2024-11-20 19:04:30 -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
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/ISO8601.cpp (Browse further)