Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect next date when using legacy mode #64

Closed
undsoft opened this issue Mar 4, 2022 · 2 comments
Closed

Incorrect next date when using legacy mode #64

undsoft opened this issue Mar 4, 2022 · 2 comments

Comments

@undsoft
Copy link

undsoft commented Mar 4, 2022

const cron = new Cron('15 9 * * mon', {
  legacyMode: true,
});
const borked = cron.next(new Date('2022-02-28 23:59:00'));
console.log(borked);

Expected: Something in March.
Actual: Mon Feb 28 2022 09:15:00

@Hexagon
Copy link
Owner

Hexagon commented Mar 4, 2022

Oh, will add more tests for legacyMode, and hopefully a fix, asap. Thanks!

@Hexagon Hexagon closed this as completed in 562fc04 Mar 4, 2022
@Hexagon
Copy link
Owner

Hexagon commented Mar 4, 2022

Resolved in 4.2.2

Hexagon added a commit that referenced this issue Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants