aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
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 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