Timothy Flynn
54b9ddcc80
LibJS: Use relative date in NudgeToCalendarUnit when comparing durations
...
This is a normative change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/17e12be
The test added here would previously crash.
2025-11-20 08:28:51 -05:00
Timothy Flynn
019c529c07
Meta: Increase the line length enforced by prettier to 120
...
This matches our coding style recommendation in CodingStyle.md, and
matches our python formatting.
2025-10-31 19:55:50 -04:00
Timothy Flynn
cb6ca85564
LibJS: Handle relativeTo ZDTs that fall within second DST wallclock time
...
This is a normative change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/1a089eb
2025-09-28 11:33:43 -04:00
Timothy Flynn
2fa6655dcb
LibJS: Ensure NudgeToCalendarUnit is given a non-zero duration sign
...
Otherwise, we trip internal Temporal spec assertions.
This is an editorial change in the Temporal spec. See:
https://github.com/tc39/proposal-temporal/commit/30f8575
2025-08-29 01:14:20 +02:00
Timothy Flynn
8145572180
LibJS+LibUnicode: Support ambiguous time zone transitions
...
For example, time zone transitions can result in repeated or skipped
wall times. Temporal wants us to handle these transitions.
2025-06-03 09:09:21 +12:00
Timothy Flynn
c8b4dc4847
LibJS: Require strict matching with a precise ZonedDateTime offset
...
This is a normative change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/1117eaf
2025-06-03 09:09:21 +12:00
Timothy Flynn
080d32c7d0
LibJS: Use Intl.DurationFormat for Temporal.Duration.p.toLocaleString
...
This is an normative change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/ffb4fb5
2025-03-01 14:49:20 +01:00
Timothy Flynn
59162c8155
LibJS: Adjust ad-hoc clamping behavior in RegulateISODate
...
Instead of clamping to the limits allowed by ISOYearMonthWithinLimits,
clamp to the limits allowed by the type we are converting to (i32). This
allows some callers to then reject years outside that range.
2025-01-17 10:08:06 +01: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
7aee254708
LibJS: Use correct epoch offset in InterpretISODateTimeOffset
2024-11-26 15:02:00 -05:00
Timothy Flynn
18f95434bc
LibJS: Implement the Temporal.Duration relative-to ZonedDateTime options
2024-11-26 11:00:56 +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
0befd52725
LibJS: Begin implementing the relativeTo option of Duration.compare
2024-11-23 14:46:00 +01:00
Timothy Flynn
f57ff63432
LibJS: Implement Temporal.Duration.prototype.valueOf
2024-11-20 19:04:30 -05:00
Timothy Flynn
c715711f88
LibJS: Implement Temporal.Duration.prototype.total
...
Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.prototype.total (and its invoked AOs) are left
unimplemented.
2024-11-20 19:04:30 -05:00
Timothy Flynn
5689621c2b
LibJS: Implement Temporal.Duration.prototype.round
...
Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.prototype.round (and its invoked AOs) are left
unimplemented.
2024-11-20 19:04:30 -05:00
Timothy Flynn
4742775262
LibJS: Implement stringification Temporal.Duration prototypes
2024-11-20 19:04:30 -05:00
Timothy Flynn
a80523be18
LibJS: Implement mathematical Temporal.Duration prototypes
...
Includes:
Temporal.Duration.prototype.negated
Temporal.Duration.prototype.abs
Temporal.Duration.prototype.add
Temporal.Duration.prototype.subtract
2024-11-20 19:04:30 -05:00
Timothy Flynn
55c81482b0
LibJS: Implement Temporal.Duration.prototype.with
2024-11-20 19:04:30 -05:00
Timothy Flynn
dfaa3bf649
LibJS: Implement Temporal.Duration.prototype.sign/blank
2024-11-20 19:04:30 -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