(value: Date | string | number)
| 10 | } |
| 11 | |
| 12 | export function toIsoDate(value: Date | string | number): string { |
| 13 | if (value instanceof Date) return value.toISOString() |
| 14 | return new Date(value).toISOString() |
| 15 | } |
| 16 | |
| 17 | export function byDateDesc<T extends { date: string }>(a: T, b: T) { |
| 18 | return new Date(b.date).getTime() - new Date(a.date).getTime() |
no outgoing calls
no test coverage detected