(weekdayStr, parsedInput, config)
| 2447 | } |
| 2448 | |
| 2449 | function checkWeekday(weekdayStr, parsedInput, config) { |
| 2450 | if (weekdayStr) { |
| 2451 | // TODO: Replace the vanilla JS Date object with an independent day-of-week check. |
| 2452 | var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), |
| 2453 | weekdayActual = new Date( |
| 2454 | parsedInput[0], |
| 2455 | parsedInput[1], |
| 2456 | parsedInput[2] |
| 2457 | ).getDay(); |
| 2458 | if (weekdayProvided !== weekdayActual) { |
| 2459 | getParsingFlags(config).weekdayMismatch = true; |
| 2460 | config._isValid = false; |
| 2461 | return false; |
| 2462 | } |
| 2463 | } |
| 2464 | return true; |
| 2465 | } |
| 2466 | |
| 2467 | function calculateOffset(obsOffset, militaryOffset, numOffset) { |
| 2468 | if (obsOffset) { |
no test coverage detected