Skip to content

Commit

Permalink
fix formatSeconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikescher committed Mar 20, 2021
1 parent a3a774f commit ae296ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion staticfiles/script_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function formatSeconds(sec) {
const ohou = Math.floor(sec / (60 * 60));
sec -= ohou * 60 * 60;
const omin = Math.floor(sec / 60);
sec -= ohou * 60;
sec -= omin * 60;
const osec = Math.floor(sec);
if (ohou > 0)
return ohou + 'h ' + omin + 'min ' + osec + 's';
Expand Down
2 changes: 1 addition & 1 deletion staticfiles/script_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function formatSeconds(sec: number): string
sec -= ohou*60*60;

const omin = Math.floor(sec/60);
sec -= ohou*60;
sec -= omin*60;

const osec = Math.floor(sec);

Expand Down

0 comments on commit ae296ee

Please sign in to comment.