summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
diff options
context:
space:
mode:
authorBodilessSleeper <ralesarcevic@gmail.com>2023-01-06 03:31:29 +0100
committerLinus Groh <mail@linusgroh.de>2023-01-06 11:16:55 +0100
commit90b43712e6af774fa2ac73401dccc56034912cf7 (patch)
tree86c67631eb2dc681fd4a68b633b28c55a7c18ae5 /Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
parent18122c036836b7bf3db5b29e5dc9ba57955e9cd5 (diff)
downloadserenity-90b43712e6af774fa2ac73401dccc56034912cf7.zip
LibJS: Rename ToIntegerThrowOnInfinity to ToIntegerWithTruncation
This commit ticks away two of the boxes in #15525 Temporal commits: tc39/proposal-temporal@f274678 and tc39/proposal-temporal@a63a0fb
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
index f89a7433c3..1e65ade25d 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthConstructor.cpp
@@ -61,17 +61,17 @@ ThrowCompletionOr<NonnullGCPtr<Object>> PlainYearMonthConstructor::construct(Fun
reference_iso_day = Value(1);
}
- // 3. Let y be ? ToIntegerThrowOnInfinity(isoYear).
- auto y = TRY(to_integer_throw_on_infinity(vm, iso_year, ErrorType::TemporalInvalidPlainYearMonth));
+ // 3. Let y be ? ToIntegerWithTruncation(isoYear).
+ auto y = TRY(to_integer_with_truncation(vm, iso_year, ErrorType::TemporalInvalidPlainYearMonth));
- // 4. Let m be ? ToIntegerThrowOnInfinity(isoMonth).
- auto m = TRY(to_integer_throw_on_infinity(vm, iso_month, ErrorType::TemporalInvalidPlainYearMonth));
+ // 4. Let m be ? ToIntegerWithTruncation(isoMonth).
+ auto m = TRY(to_integer_with_truncation(vm, iso_month, ErrorType::TemporalInvalidPlainYearMonth));
// 5. Let calendar be ? ToTemporalCalendarWithISODefault(calendarLike).
auto* calendar = TRY(to_temporal_calendar_with_iso_default(vm, calendar_like));
- // 6. Let ref be ? ToIntegerThrowOnInfinity(referenceISODay).
- auto ref = TRY(to_integer_throw_on_infinity(vm, reference_iso_day, ErrorType::TemporalInvalidPlainYearMonth));
+ // 6. Let ref be ? ToIntegerWithTruncation(referenceISODay).
+ auto ref = TRY(to_integer_with_truncation(vm, reference_iso_day, ErrorType::TemporalInvalidPlainYearMonth));
// IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards.
// This does not change the exposed behavior as the call to CreateTemporalYearMonth will immediately check that these values are valid