Skip to content

[BUG] 2-0 week expression error #654

@CodFrm

Description

@CodFrm

Description

If the current time is not Tuesday, cron.send will return the time of Tuesday of the next week

let cron = new CronTime("*/5 10-16 * * 2-0");
console.log(cron.sendAt().toFormat("yyyy-MM-dd HH:mm:ss"));

image

But the current time is Tuesday, the returned result is correct

The following takes the current time (Wednesday) as an example

let cron = new CronTime("*/5 10-16 * * 3-0");
console.log(cron.sendAt().toFormat("yyyy-MM-dd HH:mm:ss"));

image

Screenshots

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions