From 513f62a1cf62d91186a1bb43a2767ea1a085835b Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Thu, 9 Jun 2022 23:21:55 +0200 Subject: [PATCH] Parse to float instead of parse to int --- util/timer/parseTime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/timer/parseTime.js b/util/timer/parseTime.js index 0984b30..b8f3ac3 100644 --- a/util/timer/parseTime.js +++ b/util/timer/parseTime.js @@ -1,7 +1,7 @@ module.exports = function(time){ - let timeInSeconds = parseInt(time.slice(0, time.length - 1)) + let timeInSeconds = parseFloat(time.slice(0, time.length - 1)) let letter = time.slice(time.length - 1) - if(!isNaN(letter)) return parseInt(time) * 60; + if(!isNaN(letter)) return parseFloat(time) * 60; switch (letter.toUpperCase()) { case "H": timeInSeconds = timeInSeconds * 3600; // 3 600 000