(dateStr: string)
| 51 | |
| 52 | // Format date |
| 53 | export function formatDate(dateStr: string): string { |
| 54 | const date = new Date(dateStr); |
| 55 | return date.toLocaleDateString('zh-CN', { |
| 56 | month: 'short', |
| 57 | day: 'numeric', |
| 58 | hour: '2-digit', |
| 59 | minute: '2-digit', |
| 60 | }); |
| 61 | } |
| 62 | |
| 63 | // Format relative time |
| 64 | export function formatRelativeTime(dateStr: string): string { |
no outgoing calls
no test coverage detected