Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 188x 188x 188x 188x 188x 188x 188x 188x 830x 830x 830x 1472x 934x 934x 934x 908x 872x 872x 624x 624x 624x | export function formatDateTime(dateStr: string | null | undefined): string { I if (!dateStr) return '\u2014' const d = new Date(dateStr) const year = d.getFullYear() const month = String(d.getMonth() + 1).padStart(2, '0') const day = String(d.getDate()).padStart(2, '0') const hours = String(d.getHours()).padStart(2, '0') const minutes = String(d.getMinutes()).padStart(2, '0') return `${year}-${month}-${day} ${hours}:${minutes}` } eIxport function abbreviateNumber(n: number | undefined | null): string { I if (n == null) return '\u2014' E if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M` if (n >= 1_000) return `${(n / 1_000).toFixed(1)}K` return String(n) } export function formatRelativeTime(dateStr: string | null | undefined): string { if (!dateStr) return 'Never' const diff = Date.now() - new Date(dateStr).getTime() const mins = Math.floor(diff / 60000) if (mins < 1) return 'now' if (mins < 60) return `${mins} min ago` const hours = Math.floor(mins / 60) I if (hours < 24) return `${hours}h ago` const days = Math.floor(hours / 24) if (days < 7) return `${days}d ago` return new Date(dateStr).toLocaleDateString() } |