(targetMonthIndex: number)
| 966 | const currentMonth = current.getUTCMonth() + 1 |
| 967 | const nextMonth = table.month[currentMonth] |
| 968 | const clampBoundaryDay = (targetMonthIndex: number): number => { |
| 969 | const maxDayInMonth = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), targetMonthIndex + 1, 0))) |
| 970 | if (cron.days.size !== 0 && cron.weekdays.size === 0) { |
| 971 | return reverse ? table.day[maxDayInMonth] ?? maxDayInMonth : boundary.day |
| 972 | } |
| 973 | return reverse ? maxDayInMonth : 1 |
| 974 | } |
| 975 | if (nextMonth === undefined) { |
| 976 | current.setUTCFullYear(current.getUTCFullYear() + tick) |
| 977 | current.setUTCMonth(boundary.month, clampBoundaryDay(boundary.month)) |
no test coverage detected