From 17fb40bc42f76cf4c6aacde2b5236711ae2b2ae6 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 3 May 2022 21:23:57 +0200 Subject: [PATCH] LibJS: Fix type confusion in msFromTime This is an editorial change in the ECMA-262 spec. See: https://github.com/tc39/ecma262/commit/8e572b6 --- Userland/Libraries/LibJS/Runtime/Date.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Date.cpp b/Userland/Libraries/LibJS/Runtime/Date.cpp index a92d9105ac..f2319752ed 100644 --- a/Userland/Libraries/LibJS/Runtime/Date.cpp +++ b/Userland/Libraries/LibJS/Runtime/Date.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, Linus Groh + * Copyright (c) 2020-2022, Linus Groh * Copyright (c) 2022, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause @@ -251,7 +251,7 @@ u16 ms_from_time(double t) if (!Value(t).is_finite_number()) return 0; - // 𝔽(ℝ(t) modulo msPerSecond) + // 𝔽(ℝ(t) modulo ℝ(msPerSecond)) return static_cast(modulo(t, Date::ms_per_second)); }