/** * Cron expression parser with timezone support * * Features: * - Standard cron expression parsing (5 or 6 fields) * - Timezone-aware scheduling * - Human-readable descriptions * - Next/previous occurrence calculation * - Validation and error reporting */ /** * Cron field descriptor */ interface CronField { name: string; min: number; max: number; aliases?: Record; } declare const CRON_FIELDS: CronField[]; /** * Common cron presets */ export declare const CRON_PRESETS: Record; /** * Parsed cron expression result */ export interface ParsedCron { expression: string; fields: { second?: number[]; minute: number[]; hour: number[]; dayOfMonth: number[]; month: number[]; dayOfWeek: number[]; }; hasSeconds: boolean; timezone?: string; } /** * Cron iterator options */ export interface CronIteratorOptions { currentDate?: Date; startDate?: Date; endDate?: Date; timezone?: string; iterator?: boolean; } /** * Validate a cron expression */ export declare function validateCronExpression(expression: string): { valid: boolean; error?: string; normalized?: string; }; /** * Parse a cron expression */ export declare function parseCronExpression(expression: string, timezone?: string): ParsedCron; /** * Get the next occurrence of a cron expression */ export declare function getNextCronOccurrence(expression: string, options?: CronIteratorOptions): Date; /** * Get the previous occurrence of a cron expression */ export declare function getPreviousCronOccurrence(expression: string, options?: CronIteratorOptions): Date; /** * Get next N occurrences of a cron expression */ export declare function getNextCronOccurrences(expression: string, count: number, options?: CronIteratorOptions): Date[]; /** * Check if a cron expression matches a given date */ export declare function cronMatchesDate(expression: string, date: Date, timezone?: string): boolean; /** * Calculate milliseconds until next occurrence */ export declare function msUntilNextCronOccurrence(expression: string, options?: CronIteratorOptions): number; /** * Get human-readable description of a cron expression */ export declare function describeCronExpression(expression: string): string; /** * Create a cron iterator */ export declare function createCronIterator(expression: string, options?: CronIteratorOptions): { next: () => Date | null; prev: () => Date | null; hasNext: () => boolean; hasPrev: () => boolean; reset: (date?: Date) => void; }; /** * Check if cron expression is valid */ export declare function isValidCronExpression(expression: string): boolean; /** * Get all supported timezones */ export declare function getSupportedTimezones(): string[]; /** * Check if timezone is valid */ export declare function isValidTimezone(timezone: string): boolean; export { CRON_FIELDS }; //# sourceMappingURL=cron-parser.d.ts.map