Created
March 19, 2021 08:48
-
-
Save jickoo/edf34a6a63c48766d5673e14e2b00b26 to your computer and use it in GitHub Desktop.
javascript changeTimeFormat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const changeTimeFormat = (seconds: number) => { | |
var hour = parseInt('' + seconds/3600); | |
var min = parseInt('' + (seconds%3600)/60); | |
var sec = Math.floor(seconds%60); | |
return `${hour}:${min}:${sec}`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment