(date)
| 1 | import { getMonthDays } from './GetMonthDays' |
| 2 | |
| 3 | function checkDate(date) { |
| 4 | if (date.day < 1 || date.day > getMonthDays(date.month, date.year)) { |
| 5 | throw new Error('Invalid day value.') |
| 6 | } |
| 7 | } |
| 8 | |
| 9 | function parseDate(dateString) { |
| 10 | const regex = /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/ |
no test coverage detected