diff options
author | Linus Groh <mail@linusgroh.de> | 2022-05-03 21:26:04 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-05-03 22:49:31 +0200 |
commit | ede932287f82d3b19720405cd2aecaf4ac9ccf6c (patch) | |
tree | 98c477d9b6c2f59cd8635a9bf8f50598c7946f6e /Userland/Libraries/LibJS/Runtime | |
parent | 257375f54ca01b85b1e2a1f9c2b1ce6f9337b3db (diff) | |
download | serenity-ede932287f82d3b19720405cd2aecaf4ac9ccf6c.zip |
LibJS: Update spec comments to avoid = comparisons with signed zero
This is an editorial change in the ECMA-262 spec.
See: https://github.com/tc39/ecma262/commit/b7348e5
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/DatePrototype.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp index 12c2f03962..9001779457 100644 --- a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp @@ -1111,7 +1111,7 @@ String date_string(double time) // 4. Let yv be YearFromTime(tv). auto year = year_from_time(time); - // 5. If yv ≥ +0𝔽, let yearSign be the empty String; otherwise, let yearSign be "-". + // 5. If yv is +0𝔽 or yv > +0𝔽, let yearSign be the empty String; otherwise, let yearSign be "-". auto year_sign = year >= 0 ? ""sv : "-"sv; // 6. Let paddedYear be ToZeroPaddedDecimalString(abs(ℝ(yv)), 4). @@ -1127,7 +1127,7 @@ String time_zone_string(double time) StringView offset_sign; - // 2. If offset ≥ +0𝔽, then + // 2. If offset is +0𝔽 or offset > +0𝔽, then if (offset >= 0) { // a. Let offsetSign be "+". offset_sign = "+"sv; @@ -1228,7 +1228,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_utc_string) // 7. Let yv be YearFromTime(tv). auto year = year_from_time(time.as_double()); - // 8. If yv ≥ +0𝔽, let yearSign be the empty String; otherwise, let yearSign be "-". + // 8. If yv is +0𝔽 or yv > +0𝔽, let yearSign be the empty String; otherwise, let yearSign be "-". auto year_sign = year >= 0 ? ""sv : "-"sv; // 9. Let paddedYear be ToZeroPaddedDecimalString(abs(ℝ(yv)), 4). |