UNPKG

cronstrue

Version:

Convert cron expressions into human readable descriptions

49 lines (48 loc) • 2.21 kB
import { Options } from "./options"; import { Locale } from "./i18n/locale"; import { LocaleLoader } from "./i18n/localeLoader"; interface SegmentDescribers { all: string; single: (t: string, form?: number) => string; increment: (t: string) => string; range: (t: string) => string; format: (t: string) => string; bounds?: { min: number; max: number; }; } export declare class ExpressionDescriptor { static locales: { [name: string]: Locale; }; static defaultLocale: string; static specialCharacters: string[]; private static readonly ordinals; expression: string; expressionParts: string[]; options: Options; i18n: Locale; static toString(expression: string, { throwExceptionOnParseError, verbose, dayOfWeekStartIndexZero, monthStartIndexZero, use24HourTimeFormat, trimHoursLeadingZero, locale, logicalAndDayFields, }?: Options): string; static initialize(localesLoader: LocaleLoader, defaultLocale?: string): void; constructor(expression: string, options: Options); protected getFullDescription(): string; protected getTimeOfDayDescription(): string; protected getSecondsDescription(): string; protected getMinutesDescription(): string; protected getHoursDescription(): string; protected getDayOfWeekDescription(dayOfWeekExpression?: string): string | null; protected getMonthDescription(): string; private getAndPrefix; private static removeLeadingComma; private static hasLeadingComma; protected getDayOfMonthDescription(dayOfMonthExpression?: string): string | null; protected getYearDescription(): string; protected getSegmentDescription(expression: string, describers: SegmentDescribers): string | null; protected getWrappingIncrementDescription(expression: string, describers: SegmentDescribers): string; protected generateRangeSegmentDescription(rangeExpression: string, describers: SegmentDescribers): string; protected formatTime(hourExpression: string, minuteExpression: string, secondExpression: string): string; protected transformVerbosity(description: string, useVerboseFormat: boolean): string; private getPeriod; } export {};