jmrozanec / cron-utils

Cron utils for parsing, validations and human readable descriptions as well as date/time interoperability.
http://cron-utils.com
Apache License 2.0
1.13k stars 263 forks source link

Test for cron expressions overlap #476

Open jmrozanec opened 3 years ago

jmrozanec commented 3 years ago

Given the following expressions:

cron1 = "0 0 10 1/1 ? "; //everyday at 10am
cron2 = "0 0 10 ? MON "; //every monday at 10am

We would ideally want to test cron1.overlap(cron2) -> true

diegoramosb commented 2 years ago

Hi @jmrozanec! I'd like to work on this issue. Just to check if I understood the feature correctly, the overlap method would be declared in the Cron interface and would check the overlap between two objects that implement Cron, is that correct?

jmrozanec commented 2 years ago

@diegoramosb that is correct! 😄 We look forward to your PR! Greetings to Bogotá!

diegoramosb commented 2 years ago

Hey there! I just wanted to let you know that I'm still working on this issue. I've made progress on completing it, but it's way more complicated than I initially thought and I haven't been able to work on it for the last week or so.

jmrozanec commented 2 years ago

@diegoramosb we appreciate the status! 😄 Just send the PR when done, and we will be glad to merge and release a new version!

jiachengzhang1 commented 9 months ago

@jmrozanec has this feature been completed yet? I implemented something similar for work, I'd like to continue contributing on this if help is still needed.

jmrozanec commented 9 months ago

@jiachengzhang1 please, go ahead! The contribution is welcome! 😄