From f05d964f3bfdb6acabcdb478f8a0814186db54ae Mon Sep 17 00:00:00 2001 From: yeyang <746659424@qq.com> Date: Fri, 12 Apr 2024 20:40:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=B3=BB=E7=BB=9F=E6=97=B6=E9=97=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/formatDuration.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/formatDuration.js b/tools/formatDuration.js index f70d33b..4c81020 100644 --- a/tools/formatDuration.js +++ b/tools/formatDuration.js @@ -85,10 +85,10 @@ function formatTemplate(format, timeObj) { * @returns {{day: string, hour: string, minute: string, second: string}} - 包含天、小时、分钟和秒的时间对象。 */ function computeTimeObject(time, repair = true) { - const second = parseInt(time % 60, 10) - const minute = Math.floor(time / 60) - const hour = Math.floor(minute / 60) - const day = Math.floor(time / (24 * 60 * 60)) + const second = parseInt(time % 60) + const minute = parseInt((time / 60) % 60) + const hour = parseInt((time / (60 * 60)) % 24) + const day = parseInt(time / (24 * 60 * 60)) return { day,