(targetMonthIndex: number)
| 635 | const currentMonth = current.getUTCMonth() + 1 |
| 636 | const nextMonth = table.month[currentMonth] |
| 637 | const clampBoundaryDay = (targetMonthIndex: number): number => { |
| 638 | if (cron.days.size !== 0 && cron.weekdays.size === 0) { |
| 639 | return boundary.day |
| 640 | } |
| 641 | const maxDayInMonth = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), targetMonthIndex, 1))) |
| 642 | return prev ? maxDayInMonth : 1 |
| 643 | } |
| 644 | if (nextMonth === undefined) { |
| 645 | current.setUTCFullYear(current.getUTCFullYear() + tick) |
| 646 | current.setUTCMonth(boundary.month, clampBoundaryDay(boundary.month)) |
no test coverage detected