(timestamp: string)
| 22 | * @returns Formatted date string (e.g., "Jan 15, 2024 10:30 AM") |
| 23 | */ |
| 24 | export function formatTimestamp(timestamp: string): string { |
| 25 | const date = new Date(timestamp); |
| 26 | |
| 27 | return date.toLocaleString('en-US', { |
| 28 | month: 'short', |
| 29 | day: 'numeric', |
| 30 | year: 'numeric', |
| 31 | hour: 'numeric', |
| 32 | minute: '2-digit', |
| 33 | hour12: true, |
| 34 | }); |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Calculate download progress percentage |
no outgoing calls
no test coverage detected