mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 10:33:01 +00:00
display work time in issue detail pane
This commit is contained in:
@@ -40,3 +40,13 @@ export function getServerURL() {
|
||||
}
|
||||
return serverURL;
|
||||
}
|
||||
|
||||
export function formatTime(ms: number): string {
|
||||
const totalSeconds = Math.floor(ms / 1000);
|
||||
const hours = Math.floor(totalSeconds / 3600);
|
||||
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
||||
const seconds = totalSeconds % 60;
|
||||
return `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}:${seconds
|
||||
.toString()
|
||||
.padStart(2, "0")}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user