summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Temporal
diff options
context:
space:
mode:
authorBodilessSleeper <ralesarcevic@gmail.com>2023-01-06 02:35:12 +0100
committerLinus Groh <mail@linusgroh.de>2023-01-06 11:16:55 +0100
commit18122c036836b7bf3db5b29e5dc9ba57955e9cd5 (patch)
treeb10b2d689e7134724ddd31af41783c5e06169f96 /Userland/Libraries/LibJS/Runtime/Temporal
parent3d87445c823e5b49ace4cb2a51b53353fc6e766d (diff)
downloadserenity-18122c036836b7bf3db5b29e5dc9ba57955e9cd5.zip
LibJS: Replace "is not zero" language in Temporal comments
This commit ticks away one of the boxes in #15525 Temporal commit: tc39/proposal-temporal@9cd448a
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp18
2 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
index 11cbad9dc8..af56b1e760 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
@@ -309,7 +309,7 @@ ThrowCompletionOr<u64> to_temporal_rounding_increment(VM& vm, Object const& norm
// 7. Set increment to floor(ℝ(increment)).
auto floored_increment = static_cast<u64>(increment);
- // 8. If dividend is not undefined and dividend modulo increment is not zero, then
+ // 8. If dividend is not undefined and dividend modulo increment ≠ 0, then
if (dividend.has_value() && static_cast<u64>(*dividend) % floored_increment != 0)
// a. Throw a RangeError exception.
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, increment, "roundingIncrement");
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
index 008baf14c6..c26559bb6c 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp
@@ -259,39 +259,39 @@ bool is_valid_duration(double years, double months, double weeks, double days, d
// 7.5.12 DefaultTemporalLargestUnit ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds ), https://tc39.es/proposal-temporal/#sec-temporal-defaulttemporallargestunit
StringView default_temporal_largest_unit(double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds)
{
- // 1. If years is not zero, return "year".
+ // 1. If years ≠ 0, return "year".
if (years != 0)
return "year"sv;
- // 2. If months is not zero, return "month".
+ // 2. If months ≠ 0, return "month".
if (months != 0)
return "month"sv;
- // 3. If weeks is not zero, return "week".
+ // 3. If weeks ≠ 0, return "week".
if (weeks != 0)
return "week"sv;
- // 4. If days is not zero, return "day".
+ // 4. If days ≠ 0, return "day".
if (days != 0)
return "day"sv;
- // 5. If hours is not zero, return "hour".
+ // 5. If hours ≠ 0, return "hour".
if (hours != 0)
return "hour"sv;
- // 6. If minutes is not zero, return "minute".
+ // 6. If minutes ≠ 0, return "minute".
if (minutes != 0)
return "minute"sv;
- // 7. If seconds is not zero, return "second".
+ // 7. If seconds ≠ 0, return "second".
if (seconds != 0)
return "second"sv;
- // 8. If milliseconds is not zero, return "millisecond".
+ // 8. If milliseconds ≠ 0, return "millisecond".
if (milliseconds != 0)
return "millisecond"sv;
- // 9. If microseconds is not zero, return "microsecond".
+ // 9. If microseconds ≠ 0, return "microsecond".
if (microseconds != 0)
return "microsecond"sv;