aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-12 19:02:53 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-12 19:02:53 +0800
commit243403b0274956c2e781392d07a785386354f1c5 (patch)
tree72bfc65a809c6b8babc78bc3c5d03c4cdf2ccb40 /utils
parent03d36c785965434556b9c8e060de8758900f5004 (diff)
downloadSoopyV2-243403b0274956c2e781392d07a785386354f1c5.tar.gz
SoopyV2-243403b0274956c2e781392d07a785386354f1c5.tar.bz2
SoopyV2-243403b0274956c2e781392d07a785386354f1c5.zip
fix incorrect rank changing calculations
Diffstat (limited to 'utils')
-rw-r--r--utils/numberUtils.js7
1 files changed, 7 insertions, 0 deletions
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