mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
fix hour display
This commit is contained in:
parent
40fa60fdc2
commit
6e1a5f1cdb
1 changed files with 3 additions and 1 deletions
|
@ -7,11 +7,13 @@ const { Permissions } = require("detritus-client/lib/constants");
|
|||
const { OPEN_SOURCE_REPOSITORY_URL } = require('../../../labscore/constants');
|
||||
|
||||
function format(seconds){
|
||||
|
||||
function pad(s){
|
||||
return (s < 10 ? '0' : '') + s;
|
||||
}
|
||||
|
||||
var days = Math.floor(seconds / (60*60*24));
|
||||
var hours = Math.floor(seconds / (60*60*24) / (60*60));
|
||||
var hours = Math.floor(seconds % (60*60*24) / (60*60));
|
||||
var minutes = Math.floor(seconds % (60*60) / 60);
|
||||
var seconds = Math.floor(seconds % 60);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue