1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 22:24:57 +00:00
serenity/Userland/Libraries/LibJS/Runtime/Temporal
Shannon Booth a7316d3641 LibJS: Update Temporal RoundDuration AO to some spec changes
This commit effectively just does a bulk update of this function to the
spec. Since there have been so many spec changes, no specific change was
made in mind, and many FIXMEs have been left for where we are still out
of date.

These changes also appear to include a normative change to the temporal
spec which was previously resulting in timeouts for some tests, and is
now resulting in a timeout.

Furthermore, this also resolves some crashes by protecting against
division by zero, instead throwing a RangeError. This can only happen
when a custom calender is provided which returns funky values. See:

https://github.com/tc39/proposal-temporal/commit/ed85e9

Diff Tests:
    +8     -4 💀    -4 💥
2024-01-14 16:08:52 -07:00
..
AbstractOperations.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
AbstractOperations.h LibJS: Inline fast case for Value::to_{boolean,number,numeric,primitive} 2023-10-07 07:13:52 +02:00
Calendar.cpp LibJS: Improve const-correctness of CalendarDateUntil 2024-01-14 16:08:52 -07:00
Calendar.h LibJS: Improve const-correctness of CalendarDateUntil 2024-01-14 16:08:52 -07:00
CalendarConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
CalendarConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
CalendarPrototype.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
CalendarPrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Duration.cpp LibJS: Update Temporal RoundDuration AO to some spec changes 2024-01-14 16:08:52 -07:00
Duration.h LibJS: Update Temporal RoundDuration AO to some spec changes 2024-01-14 16:08:52 -07:00
DurationConstructor.cpp LibJS+LibWeb: Add missing JS_DEFINE_ALLOCATOR() for a bunch of classes 2023-12-23 23:02:10 +01:00
DurationConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
DurationPrototype.cpp LibJS: Update Temporal RoundDuration AO to some spec changes 2024-01-14 16:08:52 -07:00
DurationPrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Instant.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Instant.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
InstantConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
InstantConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
InstantPrototype.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
InstantPrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
ISO8601.cpp LibJS/Temporal: Allow annotations after YYYY-MM and MM-DD 2023-02-11 18:42:32 +00:00
ISO8601.h LibJS/Temporal: Allow annotations after YYYY-MM and MM-DD 2023-02-11 18:42:32 +00:00
Now.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Now.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDate.cpp LibJS: Implement Temporal AO DifferenceDate 2024-01-14 16:08:52 -07:00
PlainDate.h LibJS: Implement Temporal AO DifferenceDate 2024-01-14 16:08:52 -07:00
PlainDateConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDateConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDatePrototype.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDatePrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDateTime.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDateTime.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDateTimeConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDateTimeConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDateTimePrototype.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainDateTimePrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainMonthDay.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainMonthDay.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainMonthDayConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainMonthDayConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainMonthDayPrototype.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainMonthDayPrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainTime.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainTime.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainTimeConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainTimeConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainTimePrototype.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainTimePrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainYearMonth.cpp LibJS: Catch up DifferenceTemporalPlainYearMonth somewhat to the spec 2024-01-14 16:08:52 -07:00
PlainYearMonth.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainYearMonthConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainYearMonthConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainYearMonthPrototype.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
PlainYearMonthPrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Temporal.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
Temporal.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
TimeZone.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
TimeZone.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
TimeZoneConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
TimeZoneConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
TimeZonePrototype.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
TimeZonePrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
ZonedDateTime.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
ZonedDateTime.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
ZonedDateTimeConstructor.cpp LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
ZonedDateTimeConstructor.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00
ZonedDateTimePrototype.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
ZonedDateTimePrototype.h LibJS: Segregate GC-allocated objects by type 2023-11-19 12:10:31 +01:00