P4sca1 / cron-schedule

A zero-dependency cron parser and scheduler for Node.js, Deno and the browser.
MIT License
172 stars 14 forks source link

fix: correctly parse weekday ranges that include sunday #283

Closed sky0hunter closed 1 year ago

sky0hunter commented 1 year ago

This should solve the issue with parsing ranges like 6-7 for the weekday.

The tests are passing and with that small post processing of the weekdays element ( modulo + set -> remove duplicates and still have 0-6 ) it should do the exact same thing as before.

It should fix #282

P4sca1 commented 1 year ago

Thank you for the PR. I will look into it within the next days. I think the problem still persists when using aliases, e.g. sat-sun, right?

sky0hunter commented 1 year ago

I've added another commit which changes the sun alias to 7, so now these kind of ranges will work with them too.

P4sca1 commented 1 year ago

:tada: This PR is included in version 4.0.0-next.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

P4sca1 commented 1 year ago

:tada: This PR is included in version 4.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: