(date: Date, type: 'date' | 'month')
| 191 | } |
| 192 | |
| 193 | function formatDateForInput(date: Date, type: 'date' | 'month'): string { |
| 194 | const year = date.getUTCFullYear(); |
| 195 | const month = String(date.getUTCMonth() + 1).padStart(2, '0'); |
| 196 | |
| 197 | if (type === 'month') { |
| 198 | return `${year}-${month}`; |
| 199 | } |
| 200 | const day = String(date.getUTCDate()).padStart(2, '0'); |
| 201 | return `${year}-${month}-${day}`; |
| 202 | } |
| 203 | |
| 204 | export function formatDateForMinMax(name: string, value: unknown, type: string): unknown { |
| 205 | if ( |
no outgoing calls
no test coverage detected