From f1eb200c8367a62ee215fd2e4aa2e8d739aa744a Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sun, 12 Dec 2021 15:21:02 +0800 Subject: Added guild event thing for sbg --- utils/numberUtils.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'utils') diff --git a/utils/numberUtils.js b/utils/numberUtils.js index 63240de..1258d90 100644 --- a/utils/numberUtils.js +++ b/utils/numberUtils.js @@ -75,5 +75,12 @@ module.exports = { } return interval + '' + intervalType; + }, + timeNumber: function(time){ + let mins = Math.floor(time/1000/60) + let secs = Math.floor(time/1000)%60 + + if(mins === 0) return secs + "s" + return `${mins}m ${secs}s` } } \ No newline at end of file -- cgit From 243403b0274956c2e781392d07a785386354f1c5 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sun, 12 Dec 2021 19:02:53 +0800 Subject: fix incorrect rank changing calculations --- utils/numberUtils.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'utils') diff --git a/utils/numberUtils.js b/utils/numberUtils.js index 1258d90..96a6b74 100644 --- a/utils/numberUtils.js +++ b/utils/numberUtils.js @@ -82,5 +82,12 @@ module.exports = { if(mins === 0) return secs + "s" return `${mins}m ${secs}s` + }, + timeNumber2: function(time){ + let hours = Math.floor(time/1000/60/60) + let mins = Math.floor(time/1000/60)%60 + + if(hours === 0) return mins + "m" + return `${hours}h ${mins}m` } } \ No newline at end of file -- cgit