Skip to content

Bug in handling cronspecs with 31-day months #30

@bahmanrafatjoo

Description

@bahmanrafatjoo

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.

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