( startDate: Date | number | string | null | undefined, endDate?: Date | number | string | null | undefined, )
| 386 | }); |
| 387 | |
| 388 | export const formatDateRange = ( |
| 389 | startDate: Date | number | string | null | undefined, |
| 390 | endDate?: Date | number | string | null | undefined, |
| 391 | ): string => { |
| 392 | const parts: string[] = []; |
| 393 | |
| 394 | if (startDate) { |
| 395 | parts.push(format(new Date(startDate), 'MMM yyyy')); |
| 396 | } |
| 397 | |
| 398 | if (endDate) { |
| 399 | parts.push(format(new Date(endDate), 'MMM yyyy')); |
| 400 | } |
| 401 | |
| 402 | return parts.join(' - '); |
| 403 | }; |
no test coverage detected