mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
refactor: consistent time formatting for 12h mode
This commit is contained in:
committed by
Carlos Valente
parent
50c91f976b
commit
0e3b3bcf9a
@@ -112,7 +112,7 @@ export const formatTime = (
|
||||
export function formatDuration(duration: number, hideSeconds = true): string {
|
||||
// durations should never be negative, we handle it here to flag if there is an issue in future
|
||||
if (duration <= 0) {
|
||||
return '0h 0m';
|
||||
return '0m';
|
||||
}
|
||||
|
||||
const hours = Math.floor(duration / MILLIS_PER_HOUR);
|
||||
|
||||
Reference in New Issue
Block a user