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

Croniter skip month with 30 days when using "31,L" as day_of_month #89

Open
wilson-jw opened this issue Aug 12, 2024 · 0 comments
Open

Comments

@wilson-jw
Copy link

Test snippet:

expr = '0 0 31,L * *'
base = datetime.now()
_iter = croniter(expr, base)
for _ in range(12):
    print(_iter.get_next(datetime))

Result:

2024-08-31 00:00:00
2024-10-31 00:00:00
2024-12-31 00:00:00
2025-01-31 00:00:00
2025-03-31 00:00:00
2025-05-31 00:00:00
2025-07-31 00:00:00
2025-08-31 00:00:00
2025-10-31 00:00:00
2025-12-31 00:00:00
2026-01-31 00:00:00
2026-03-31 00:00:00

You can see that the above output not contains months with only 30 days, such as 2024-09-30. The 30th is the last day of September.

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