-
Notifications
You must be signed in to change notification settings - Fork 156
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
Bug with interesting leap year pattern? #122
Comments
@DABH thanks for reporting? Can i ask which version of the library you're using? const parser = require('cron-parser');
const results = parser.parseExpression('0 2 29 2 0');
console.log(results.next().toDate()); // 2019-02-03T00:00:00.000Z
console.log(results.next().toDate()); // 2019-02-10T00:00:00.000Z |
@DABH +1 |
I'm not getting any errors with @DABH's code he posted in the original issue. That being said, I'm getting this error in the latest version (2.6.0) of this package, using the code I have attached below.
I'm running on Node.js version Below is the output I get when running the code above.
As you can see from this link the code above should print |
I have created a PR for this fix (#135). Let me know if you have any questions! |
I'm trying to parse a cron with the following pattern:
0 2 29 2 0
However, when I try, I get the error:
Invalid explicit day of month definition
This pattern should match all February 29th's that are on a Sunday (accounting for leap years in some reasonable way). This is enough of an edge case that I figure it might actually be a bug. Any ideas what's going on and how to fix this?
The text was updated successfully, but these errors were encountered: