@northguild/gmt
Version:
Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.
13 lines • 725 B
TypeScript
import { CronExpression } from "../types/cron.js";
/**
* Read the text of a crontab schedule: one lower-case nickname, or five fields separated by
* blanks (minute, hour, day of month, month, day of week). Returns `null` outside the grammar.
*/
export declare function readCronExpression(text: string): CronExpression | null;
/**
* Check a caller-built expression against the rules the parser guarantees: every field has a
* non-empty, strictly ascending array of integers inside the field's range, and a boolean
* `star`. Day of week holds `IsoWeekday` 1–7, so cron's `0` is refused. Returns a fresh frozen
* record, or `null`.
*/
export declare function checkCronExpression(value: unknown): CronExpression | null;