Settings rework...
This commit is contained in:
parent
74b233798d
commit
fb68300746
63 changed files with 7139 additions and 1026 deletions
18
Helpers/Time.js
Normal file
18
Helpers/Time.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
function formatVagueHumanReadableTime(totalSeconds) {
|
||||
const hours = Math.floor(totalSeconds / 3600);
|
||||
const minutes = Math.floor((totalSeconds - (hours * 3600)) / 60);
|
||||
const seconds = totalSeconds - (hours * 3600) - (minutes * 60);
|
||||
|
||||
var str = "";
|
||||
if (hours) {
|
||||
str += hours.toString() + "h";
|
||||
}
|
||||
if (minutes) {
|
||||
str += minutes.toString() + "m";
|
||||
}
|
||||
if (!hours && !minutes) {
|
||||
str += seconds.toString() + "s";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue