(
date: Date,
options?: { locale?: Intl.LocalesArgument } & Intl.DateTimeFormatOptions,
)
| 58 | }; |
| 59 | |
| 60 | export function formatDate( |
| 61 | date: Date, |
| 62 | options?: { locale?: Intl.LocalesArgument } & Intl.DateTimeFormatOptions, |
| 63 | ) { |
| 64 | return date.toLocaleDateString(options?.locale, { |
| 65 | ...defaultDateLocaleOptions, |
| 66 | ...options, |
| 67 | }); |
| 68 | } |
| 69 | |
| 70 | // Duration functions |
| 71 | export function humanDuration(durationInMs: number) { |
no outgoing calls
no test coverage detected