cronstrue

  • Version 2.50.0
  • Published
  • 1.14 MB
  • No dependencies
  • MIT license

Install

npm i cronstrue
yarn add cronstrue
pnpm add cronstrue

Overview

Convert cron expressions into human readable descriptions

Index

Variables

variable toString

let toString: (
expression: string,
{
throwExceptionOnParseError,
verbose,
dayOfWeekStartIndexZero,
monthStartIndexZero,
use24HourTimeFormat,
locale,
tzOffset,
}?: Options
) => string;

    Classes

    class ExpressionDescriptor

    class ExpressionDescriptor {}

      constructor

      constructor(expression: string, options: Options);

        property defaultLocale

        static defaultLocale: string;

          property expression

          expression: string;

            property expressionParts

            expressionParts: string[];

              property i18n

              i18n: Locale;

                property locales

                static locales: { [name: string]: Locale };

                  property options

                  options: Options;

                    property specialCharacters

                    static specialCharacters: string[];

                      method formatTime

                      protected formatTime: (
                      hourExpression: string,
                      minuteExpression: string,
                      secondExpression: string
                      ) => string;

                        method generateRangeSegmentDescription

                        protected generateRangeSegmentDescription: (
                        rangeExpression: string,
                        getRangeDescriptionFormat: (t: string) => string,
                        getSingleItemDescription: (t: string, form?: number) => string
                        ) => string;

                          method getDayOfMonthDescription

                          protected getDayOfMonthDescription: () => string | null;

                            method getDayOfWeekDescription

                            protected getDayOfWeekDescription: () => string;

                              method getFullDescription

                              protected getFullDescription: () => string;

                                method getHoursDescription

                                protected getHoursDescription: () => string;

                                  method getMinutesDescription

                                  protected getMinutesDescription: () => string;

                                    method getMonthDescription

                                    protected getMonthDescription: () => string;

                                      method getSecondsDescription

                                      protected getSecondsDescription: () => string;

                                        method getSegmentDescription

                                        protected getSegmentDescription: (
                                        expression: string,
                                        allDescription: string,
                                        getSingleItemDescription: (t: string, form?: number) => string,
                                        getIncrementDescriptionFormat: (t: string) => string,
                                        getRangeDescriptionFormat: (t: string) => string,
                                        getDescriptionFormat: (t: string) => string
                                        ) => string | null;

                                          method getTimeOfDayDescription

                                          protected getTimeOfDayDescription: () => string;

                                            method getYearDescription

                                            protected getYearDescription: () => string;

                                              method initialize

                                              static initialize: (localesLoader: LocaleLoader, defaultLocale?: string) => void;

                                                method toString

                                                static toString: (
                                                expression: string,
                                                {
                                                throwExceptionOnParseError,
                                                verbose,
                                                dayOfWeekStartIndexZero,
                                                monthStartIndexZero,
                                                use24HourTimeFormat,
                                                locale,
                                                tzOffset,
                                                }?: Options
                                                ) => string;

                                                  method transformVerbosity

                                                  protected transformVerbosity: (
                                                  description: string,
                                                  useVerboseFormat: boolean
                                                  ) => string;

                                                    Package Files (2)

                                                    Dependencies (0)

                                                    No dependencies.

                                                    Dev Dependencies (15)

                                                    Peer Dependencies (0)

                                                    No peer dependencies.

                                                    Badge

                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/cronstrue.

                                                    • Markdown
                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/cronstrue)
                                                    • HTML
                                                      <a href="https://www.jsdocs.io/package/cronstrue"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>