UNPKG

@lou.codes/cron

Version:

⏲️ Cron Quartz and Cron UNIX expression parser

19 lines (18 loc) 588 B
import type { CronObject } from "./CronObject.js"; import type { CronString } from "./CronString.js"; /** * Get next ISO date string for the given date and the given cron expression. * * @category Util * @example * ```typescript * nextDate(new Date("1989-10-13T10:15:00.000"))("* * * * *"); // Date("1989-10-13T10:16:00.000") * ``` * @param date Base date to get the next date from. * @returns Curried function with date set. */ export declare const nextDate: ( date: Readonly<Date>, ) => ( cron: CronString | Partial<CronObject>, ) => import("@lou.codes/types").Maybe<Date>;