MCPcopy Create free account

hub / github.com/harrisiirak/cron-parser / functions

Functions184 in github.com/harrisiirak/cron-parser

↓ 212 callersMethodnext
* Find the next scheduled date based on the cron expression. * @returns {CronDate} - The next scheduled date or an ES6 compatible iterator object.
src/CronExpression.ts:225
↓ 170 callersMethodparse
* Parses a cron expression and returns a CronExpression object. * @param {string} expression - The cron expression to parse. * @param {CronExpre
src/CronExpressionParser.ts:93
↓ 167 callersMethodgetDate
* Returns the day. * @returns {number}
src/CronDate.ts:260
↓ 121 callersMethodgetHours
* Returns the hour. * @returns {number}
src/CronDate.ts:293
↓ 94 callersMethodgetMinutes
* Returns the minutes. * @returns {number}
src/CronDate.ts:301
↓ 66 callersMethodgetMonth
* Returns the month. * @returns {number}
src/CronDate.ts:285
↓ 63 callersMethodtoISOString
* Returns the UTC milliseconds. * @returns {string | null}
src/CronDate.ts:414
↓ 53 callersMethodstringify
* Generate a string representation of the cron expression. * @param {boolean} [includeSeconds=false] - Whether to include the seconds field in the
src/CronExpression.ts:323
↓ 44 callersMethodgetSeconds
* Returns the seconds. * @returns {number}
src/CronDate.ts:309
↓ 36 callersMethodgetFullYear
* Returns the year. * @returns {number}
src/CronDate.ts:268
↓ 32 callersMethodgetDay
* Returns the day of the week. * @returns {number}
src/CronDate.ts:276
↓ 27 callersMethodprev
* Find the previous scheduled date based on the cron expression. * @returns {CronDate} - The previous scheduled date or an ES6 compatible iterator
src/CronExpression.ts:235
↓ 24 callersMethodfieldsToExpression
* Converts cron fields back to a CronExpression instance. * * @public * @param {Record<string, number[]>} fields - The input cron fields obje
src/CronExpression.ts:86
↓ 24 callersMethodtoString
* Returns the date as a string. * @returns {string}
src/CronDate.ts:494
↓ 21 callersMethodtoDate
* Returns the date as a Date object. * @returns {Date}
src/CronDate.ts:502
↓ 14 callersMethodincludesDate
* Check if the cron expression includes the given date * @param {Date|CronDate} date * @returns {boolean}
src/CronExpression.ts:332
↓ 13 callersMethodcompactField
* Returns a string representation of the cron fields. * @param {(number | CronChars)[]} input - The cron fields values * @static * @returns {
src/CronFieldCollection.ts:232
↓ 13 callersMethodtake
* Iterate over a specified number of steps and optionally execute a callback function for each step. * @param {number} steps - The number of steps
src/CronExpression.ts:284
↓ 12 callersMethodhasNext
* Check if there is a next scheduled date based on the current date and cron expression. * @returns {boolean} - Returns true if there is a next sch
src/CronExpression.ts:245
↓ 10 callersMethodgetTime
* Returns the time. * @returns {number}
src/CronDate.ts:349
↓ 9 callersMethodapplyDateOperation
* Primarily for internal use. * @param {DateMathOp} op - The operation to perform. * @param {TimeUnit} unit - The unit of time to use. * @par
src/CronDate.ts:549
↓ 9 callersMethodfrom
* Creates a new CronFieldCollection instance by partially overriding fields from an existing one. * @param {CronFieldCollection} base - The base Cr
src/CronFieldCollection.ts:87
↓ 8 callersMethodreset
* Reset the iterators current date to a new date or the initial date. * @param {Date | CronDate} [newDate] - Optional new date to reset to. If not
src/CronExpression.ts:312
↓ 7 callersMethod#getUTC
* Returns the UTC date. * @private * @returns {DateTime}
src/CronDate.ts:576
↓ 7 callersMethod#matchSchedule
* Checks if the given value matches any element in the sequence. * * @param {number} value - The value to be matched. * @param {number[]} seq
src/CronExpression.ts:99
↓ 7 callersMethodaddMinute
* Adds one minute to the current CronDate.
src/CronDate.ts:138
↓ 7 callersMethodaddUnit
* Adds a unit of time to the current CronDate. * @param {TimeUnit} unit
src/CronDate.ts:200
↓ 7 callersMethodsubtractUnit
* Subtracts a unit of time from the current CronDate. * @param {TimeUnit} unit
src/CronDate.ts:221
↓ 6 callersMethod#getMinOrMax
* Returns the minimum or maximum value from the given array of numbers. * * @param {number[]} values - An array of numbers. * @param {boolean
src/CronExpression.ts:110
↓ 6 callersMethod#parseField
* Parse a field from a cron expression. * @param {CronUnit} field - The field to parse. * @param {string} value - The value of the field. * @
src/CronExpressionParser.ts:187
↓ 6 callersMethodresolveField
* Resolves a field value, either using the provided CronField instance or creating a new one from raw values. * @param constructor - The constructo
src/CronFieldCollection.ts:106
↓ 6 callersMethodsetSeconds
* Sets the seconds. * @param s
src/CronDate.ts:478
↓ 6 callersMethodstringifyField
* Returns a string representation of the cron fields. * @param {CronField} field - The cron field to stringify * @static * @returns {string}
src/CronFieldCollection.ts:383
↓ 5 callersMethod#findSchedule
* Finds the next or previous schedule based on the cron expression. * * @param {boolean} [reverse=false] - If true, finds the previous schedule;
src/CronExpression.ts:512
↓ 5 callersFunctioncreateInterval
(pattern: string)
tests/CronExpression.test.ts:623
↓ 5 callersMethodisLastWeekdayOfMonth
* Returns true if the day is the last weekday of the month. * @returns {boolean}
src/CronDate.ts:527
↓ 4 callersMethodaddYear
* Adds one year to the current CronDate.
src/CronDate.ts:110
↓ 4 callersFunctionformatOps
(opsPerSecond: number)
benchmarks/runner.ts:55
↓ 4 callersFunctionformatPercentage
(value: number)
benchmarks/runner.ts:71
↓ 4 callersFunctionrunBenchmark
( expression: string, currentDate: Date, parser: ParseExpressionFn, iterations: number, )
benchmarks/runner.ts:214
↓ 4 callersFunctionseededRandom
(str?: string)
src/utils/random.ts:39
↓ 4 callersMethodsetMinutes
* Sets the minutes. * @param m
src/CronDate.ts:470
↓ 3 callersMethodaddDay
* Adds one day to the current CronDate.
src/CronDate.ts:124
↓ 3 callersMethodaddHour
* Adds one hour to the current CronDate.
src/CronDate.ts:131
↓ 3 callersMethodaddMonth
* Adds one month to the current CronDate.
src/CronDate.ts:117
↓ 3 callersMethodaddSecond
* Adds one second to the current CronDate.
src/CronDate.ts:145
↓ 3 callersMethodgetUTCDay
* Returns the UTC day of the week. * @returns {number}
src/CronDate.ts:373
↓ 3 callersMethodhasPrev
* Check if there is a previous scheduled date based on the current date and cron expression. * @returns {boolean} - Returns true if there is a prev
src/CronExpression.ts:264
↓ 3 callersMethodinvokeDateOperation
* Handles a math operation. * @param {DateMathOp} verb - {'add' | 'subtract'} * @param {TimeUnit} unit - {'year' | 'month' | 'day' | 'hour' | 'm
src/CronDate.ts:243
↓ 3 callersMethodparseFileSync
* Parse a crontab file synchronously * @param filePath Path to crontab file * @returns Parse results * @throws If file cannot be read
src/CronFileParser.ts:32
↓ 3 callersMethodsubtractDay
* Subtracts one day from the current CronDate. * If the day is 1, it will subtract one month instead.
src/CronDate.ts:168
↓ 3 callersMethodsubtractHour
* Subtracts one hour from the current CronDate. * If the hour is 0, it will subtract one day instead.
src/CronDate.ts:176
↓ 3 callersMethodsubtractMinute
* Subtracts one minute from the current CronDate. * If the minute is 0, it will subtract one hour instead.
src/CronDate.ts:184
↓ 3 callersMethodsubtractSecond
* Subtracts one second from the current CronDate. * If the second is 0, it will subtract one minute instead.
src/CronDate.ts:192
↓ 3 callersMethodsubtractYear
* Subtracts one year from the current CronDate.
src/CronDate.ts:152
↓ 2 callersMethod#isLeapYear
* Determines if the given year is a leap year. * @param {number} year - The year to check * @returns {boolean} - True if the year is a leap year
src/CronDate.ts:71
↓ 2 callersMethod#matchDayOfMonth
* Determines if the given date matches the cron expression's day of month and day of week fields. * * The function checks the following rules:
src/CronExpression.ts:384
↓ 2 callersMethod#parseContent
* Internal method to parse crontab file content * @private
src/CronFileParser.ts:43
↓ 2 callersMethod#parseRange
* Parse a range from a cron expression. * @param {CronUnit} field - The field to parse. * @param {string} val - The range to parse. * @param
src/CronExpressionParser.ts:414
↓ 2 callersFunctioncalculateStats
(times: number[])
benchmarks/runner.ts:41
↓ 2 callersFunctionformatTime
(ms: number)
benchmarks/runner.ts:51
↓ 2 callersFunctiongetChangeIndicator
(percentChange: number)
benchmarks/runner.ts:62
↓ 2 callersMethodgetMilliseconds
* Returns the milliseconds. * @returns {number}
src/CronDate.ts:317
↓ 2 callersMethodgetUTCDate
* Returns the UTC day. * @returns {number}
src/CronDate.ts:357
↓ 2 callersMethodgetUTCOffset
* Returns the timezone offset from UTC in minutes (e.g. UTC+2 => 120). * Useful for detecting DST transition days. * * @returns {number} UTC
src/CronDate.ts:327
↓ 2 callersMethodgetVersionDir
(version: string)
benchmarks/version-manager.ts:19
↓ 2 callersFunctioninitializeBenchmark
(version?: string)
benchmarks/runner.ts:26
↓ 2 callersMethodmax
()
src/fields/CronHour.ts:18
↓ 2 callersFunctionparseAndBenchMarkExpression
( expression: string, iterations = 10000, samples = 5, outputFile: string, )
benchmarks/runner.ts:230
↓ 2 callersMethodparseFile
* Parse a crontab file asynchronously * @param filePath Path to crontab file * @returns Promise resolving to parse results * @throws If file
src/CronFileParser.ts:20
↓ 2 callersMethodserialize
* Returns a serialized representation of the cron fields values. * @returns {SerializedCronFields} An object containing the cron field values
src/CronFieldCollection.ts:439
↓ 2 callersMethodsetHours
* Sets the hour. * @param h
src/CronDate.ts:462
↓ 1 callersMethod#checkDstTransition
* Checks whether the given date falls on a DST transition day in its timezone. * * This is used to disable certain “direct set” fast paths on DS
src/CronExpression.ts:125
↓ 1 callersMethod#createRange
* Create a range from a cron expression. * @param {CronUnit} field - The field to parse. * @param {number} min - The minimum value of the range.
src/CronExpressionParser.ts:392
↓ 1 callersMethod#getRawFields
* Get the raw fields from a cron expression. * @param {string} expression - The cron expression to parse. * @param {boolean} strict - If true, w
src/CronExpressionParser.ts:159
↓ 1 callersMethod#handleMultipleRanges
* Handles multiple ranges. * @param {FieldRange} range {start: number, end: number, step: number, count: number} The range to handle. * @param {
src/CronFieldCollection.ts:341
↓ 1 callersMethod#handleSingleRange
* Handles a single range. * @param {CronField} field - The cron field to stringify * @param {FieldRange} range {start: number, end: number, step
src/CronFieldCollection.ts:320
↓ 1 callersMethod#isLastWeekdayOfMonthMatch
* Determines if the current date matches the last specified weekday of the month. * * @param {Array<(number|string)>} expressions - An array of
src/CronExpression.ts:205
↓ 1 callersMethod#isValidConstraintChar
* Checks if a character is valid for a field. * @param {CronConstraints} constraints - The constraints for the field. * @param {string | number}
src/CronExpressionParser.ts:463
↓ 1 callersMethod#matchHour
* Determines if the current hour matches the cron expression. * * @param {CronDate} currentDate - The current date object. * @param {DateMath
src/CronExpression.ts:427
↓ 1 callersMethod#moveToNextMinute
* Moves the date to the next/previous allowed minute value and resets seconds to the min/max allowed. * If there is no remaining allowed minute wit
src/CronExpression.ts:177
↓ 1 callersMethod#moveToNextSecond
* Moves the date to the next/previous allowed second value. If there is no remaining allowed second * within the current minute, rolls to the next/
src/CronExpression.ts:152
↓ 1 callersMethod#parseEntry
* Parse a single crontab entry * @private
src/CronFileParser.ts:79
↓ 1 callersMethod#parseHashed
* Parse a hashed value from a cron expression. * @param {string} value - The value to parse. * @param {CronConstraints} constraints - The constr
src/CronExpressionParser.ts:227
↓ 1 callersMethod#parseNthDay
* Parse a cron expression. * @param {string} val - The cron expression to parse. * @private * @returns {string} The parsed cron expression.
src/CronExpressionParser.ts:438
↓ 1 callersMethod#parseRepeat
* Parse repeat from a cron expression. * @param {CronUnit} field - The field to parse. * @param {string} val - The repeat to parse. * @param
src/CronExpressionParser.ts:336
↓ 1 callersMethod#parseSequence
* Parse a sequence from a cron expression. * @param {CronUnit} field - The field to parse. * @param {string} val - The sequence to parse. * @
src/CronExpressionParser.ts:297
↓ 1 callersMethod#parseWildcard
* Parse a wildcard from a cron expression. * @param {string} value - The value to parse. * @param {CronConstraints} constraints - The constraint
src/CronExpressionParser.ts:216
↓ 1 callersMethod#validateRange
* Validate a cron range. * @param {number} min - The minimum value of the range. * @param {number} max - The maximum value of the range. * @p
src/CronExpressionParser.ts:360
↓ 1 callersMethod#validateRepeatInterval
* Validate a cron repeat interval. * @param {number} repeatInterval - The repeat interval to validate. * @private * @returns {void} * @thr
src/CronExpressionParser.ts:377
↓ 1 callersMethod#validateTimeSpan
* Validates the current date against the start and end dates of the cron expression. * If the current date is outside the specified time span, an e
src/CronExpression.ts:491
↓ 1 callersFunctioncharTest
(value: string)
src/fields/CronField.ts:233
↓ 1 callersMethoddownloadVersion
(version: string)
benchmarks/version-manager.ts:28
↓ 1 callersMethodensureVersionsDir
()
benchmarks/version-manager.ts:13
↓ 1 callersMethodgetLatestVersion
()
benchmarks/version-manager.ts:23
↓ 1 callersMethodgetPackageVersion
(requestedVersion?: string)
benchmarks/version-manager.ts:49
↓ 1 callersMethodgetUTCFullYear
* Returns the UTC year. * @returns {number}
src/CronDate.ts:365
↓ 1 callersMethodgetUTCHours
* Returns the UTC hour. * @returns {number}
src/CronDate.ts:390
↓ 1 callersMethodgetUTCMinutes
* Returns the UTC minutes. * @returns {number}
src/CronDate.ts:398
↓ 1 callersMethodgetUTCMonth
* Returns the UTC month. * @returns {number}
src/CronDate.ts:382
next →1–100 of 184, ranked by callers