mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
Update format.ts
This commit is contained in:
parent
ce4a386415
commit
8159d90535
1 changed files with 0 additions and 9 deletions
|
|
@ -16,15 +16,6 @@ export function parseTime(val: number) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatTime(val: number) {
|
|
||||||
const { hours, minutes, seconds } = parseTime(val);
|
|
||||||
const h = hours > 0 ? `${hours}:` : '';
|
|
||||||
const m = hours > 0 ? minutes.toString().padStart(2, '0') : minutes;
|
|
||||||
const s = seconds.toString().padStart(2, '0');
|
|
||||||
|
|
||||||
return `${h}${m}:${s}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function formatShortTime(
|
export function formatShortTime(
|
||||||
intl: IntlShape,
|
intl: IntlShape,
|
||||||
useMessages: any,
|
useMessages: any,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue