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

Bug in handling cronspecs with 31-day months #30

Open
bahmanrafatjoo opened this issue Sep 23, 2022 · 1 comment
Open

Bug in handling cronspecs with 31-day months #30

bahmanrafatjoo opened this issue Sep 23, 2022 · 1 comment

Comments

@bahmanrafatjoo
Copy link

Looks like there's a bug with handing cronspecs with some 31-day months. The tests don't fail for every 31-day month but where they do the failure is different depending on the input. I'm fairly sure I've the correct input format.

Passing test:

check_next("0 25 23 31 10 ?", "2011-09-22 14:20:00", "2011-10-31 23:25:00");

Failing test 1:

check_next("0 25 23 31 7 ?", "2011-09-22 14:20:00", "2012-07-31 23:25:00");

image

Failing test 2:

check_next("0 25 23 31 8 ?", "2011-09-22 14:20:00", "2012-08-31 23:25:00");

image

I'll try and go through the code to see if I can identify the cause but thought I'd post this in case some wiser heads can assist.

bahmanrafatjoo pushed a commit to bahmanrafatjoo/croncpp that referenced this issue Nov 18, 2022
@bahmanrafatjoo
Copy link
Author

I have a proposed fix which I'll submit as a PR.

mariusbancila added a commit that referenced this issue Mar 30, 2023
Fix for Bug in handling cronspecs with 31-day months #30
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

1 participant