(
date?: Date
)
| 83 | * Outputs a date object in YYYY-MM-DD format, suitable for use in props |
| 84 | */ |
| 85 | export function dateAsStr( |
| 86 | date?: Date |
| 87 | ): `${string}-${string}-${string}` | undefined { |
| 88 | if (!date) { |
| 89 | return undefined; |
| 90 | } |
| 91 | return formatDate(date, 'YYYY-MM-DD') as `${string}-${string}-${string}`; |
| 92 | } |
| 93 | |
| 94 | export function strAsDate( |
| 95 | dateStr?: string, |
no test coverage detected
searching dependent graphs…