MCPcopy Create free account
hub / github.com/Effect-TS/effect / gatherForward

Function gatherForward

packages/effect/test/Cron.test.ts:511–521  ·  view source on GitHub ↗
(cron: Cron.Cron, lower: Date, upper: Date)

Source from the content-addressed store, hash-verified

509 ] as const
510
511 const gatherForward = (cron: Cron.Cron, lower: Date, upper: Date) => {
512 const dates: Array<Date> = []
513 let current = lower
514 while (true) {
515 current = Cron.next(cron, current)
516 if (current >= upper) {
517 return dates
518 }
519 dates.push(current)
520 }
521 }
522
523 const gatherReverse = (cron: Cron.Cron, lower: Date, upper: Date) => {
524 const dates: Array<Date> = []

Callers 1

Cron.test.tsFile · 0.85

Calls 2

pushMethod · 0.80
nextMethod · 0.65

Tested by

no test coverage detected