Skip to content

Decimal values do not cause an error #291

@annybs

Description

@annybs

While testing some edge cases for our app, I have discovered that cron-validate allows values with decimals. Tested in Node v20 REPL:

> cron('0.5 1.5 2.5 3.5 4.5')
Valid {
  value: {
    seconds: undefined,
    minutes: '0.5',
    hours: '1.5',
    daysOfMonth: '2.5',
    months: '3.5',
    daysOfWeek: '4.5',
    years: undefined
  }
}

To my knowledge, this isn't valid cron syntax - at the very least I believe it would be non-standard?!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions