mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 14:06:36 +08:00
16 lines
348 B
TypeScript
16 lines
348 B
TypeScript
export {
|
|
calculateNiceAxisMax,
|
|
formatBytes,
|
|
formatBytesPerSecond,
|
|
formatCompactNumber,
|
|
formatPercent,
|
|
} from '@/lib/utils/metrics';
|
|
|
|
export function formatTrendHour(value: string) {
|
|
const date = new Date(value);
|
|
if (Number.isNaN(date.getTime())) {
|
|
return '—';
|
|
}
|
|
return `${date.getHours().toString().padStart(2, '0')}:00`;
|
|
}
|