( expr: ParsedCronExpression, years: number, fromMs: number, )
| 216 | * will later refuse to compute). |
| 217 | */ |
| 218 | export function hasFireWithinYears( |
| 219 | expr: ParsedCronExpression, |
| 220 | years: number, |
| 221 | fromMs: number, |
| 222 | ): boolean { |
| 223 | const cap = Math.max(1, Math.floor(years * 366 * 24 * 60)); |
| 224 | return nextRunWithinMinutes(expr, fromMs, cap) !== null; |
| 225 | } |
| 226 | |
| 227 | function nextRunWithinMinutes( |
| 228 | expr: ParsedCronExpression, |
no test coverage detected