Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
123456789101112131415161718export function formatDate(value?: string): string | null { if (!value) return null; const date = new Date(value); if (isNaN(date.getTime())) return null; return new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short", year: "numeric", }).format(date);}
export function formatDuration(ms: number): string { const total = Math.round(ms / 1000); const minutes = Math.floor(total / 60); const seconds = total % 60; return minutes === 0 ? `${seconds}s` : `${minutes}m ${seconds}s`;}