Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: harrisiirak/cron-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.4
Choose a base ref
...
head repository: harrisiirak/cron-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.0.5
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 17, 2025

  1. Restore 4.x compatibility and use the current timezone for currentDat…

    …e instead of setting it to UTC. Fixes #370
    harrisiirak committed Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    38a8458 View commit details
  2. Bump version

    harrisiirak committed Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    be707be View commit details
Showing with 3 additions and 3 deletions.
  1. +1 −1 package-lock.json
  2. +1 −1 package.json
  3. +1 −1 src/CronExpressionParser.ts
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cron-parser",
"version": "5.0.4",
"version": "5.0.5",
"description": "Node.js library for parsing crontab instructions",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
2 changes: 1 addition & 1 deletion src/CronExpressionParser.ts
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ export class CronExpressionParser {
*/
static parse(expression: string, options: CronExpressionOptions = {}): CronExpression {
const { strict = false } = options;
const currentDate = options.currentDate || new CronDate(undefined, 'UTC');
const currentDate = options.currentDate || new CronDate();

expression = PredefinedExpressions[expression as keyof typeof PredefinedExpressions] || expression;
const rawFields = CronExpressionParser.#getRawFields(expression, strict);