update
This commit is contained in:
1 parent
7337905cbc
commit
dc347f8aa5
2 files changed
+15
-17
No files matched your search
@@ -67,11 +67,9 @@ export function duration(
|
||||
}
|
||||
|
||||
export function secondsToDuration(seconds: number): string {
|
||||
const epoch = new Date(0)
|
||||
const secondsAfterEpoch = new Date(seconds * 1000)
|
||||
const duration = intervalToDuration({
|
||||
start: epoch,
|
||||
end: secondsAfterEpoch,
|
||||
start: 0,
|
||||
end: seconds * 1000,
|
||||
})
|
||||
return [duration.hours, duration.minutes, duration.seconds].join(":")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user