effect-io-ai

Package: effect
Module: Cron

Cron.prev

Returns the previous scheduled date/time for the given Cron instance.

When to use

Use to find the most recent occurrence of a cron schedule before a specific date/time or before the current time.

Details

When no date/time is provided, the search starts from the current time.

Gotchas

The search is strict: if the supplied date/time already matches the schedule, the result is the earlier occurrence.

See

Signature

declare const prev: (cron: Cron, now?: DateTime.DateTime.Input) => Date

Source

Since v3.20.0