(date: Date | string)
| 40 | * Formats a date as a date-only string (no time component). |
| 41 | */ |
| 42 | export function formatDateOnly(date: Date | string): string { |
| 43 | const dateObj = typeof date === 'string' ? new Date(date) : date; |
| 44 | return new Intl.DateTimeFormat('en-US', { |
| 45 | year: 'numeric', |
| 46 | month: 'short', |
| 47 | day: 'numeric', |
| 48 | }).format(dateObj); |
| 49 | } |
| 50 | |
| 51 | export function getPaymentMethodBadgeVariant( |
| 52 | status?: PaymentMethodStatus |
no outgoing calls
no test coverage detected