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

Check if date interval overlaps the rule #92

Open
haiderali22 opened this issue Dec 11, 2020 · 4 comments
Open

Check if date interval overlaps the rule #92

haiderali22 opened this issue Dec 11, 2020 · 4 comments

Comments

@haiderali22
Copy link

Hi, I want to check if my start and end date overlaps the rule. Is there any method avilble which i can use for my scenario?

@dmfs
Copy link
Owner

dmfs commented Dec 11, 2020

Can you be more specific with what you want to accomplish?
At present we don't have any code to intersect rules and dates. Depending on what you're planning it may not be that hard though.

@haiderali22
Copy link
Author

I am developing a resource management tool in which there is a need to check if resource is available on that slot. I have start and end datetime of both the rule and new task. Now i wanted to check if both these dates overlaps or not.

@dmfs
Copy link
Owner

dmfs commented Dec 12, 2020

Ok and by "overlap the rule" do you mean, overlap any of the generated instances or just the overall time range of the rule? I.e. would you consider a pair of start and end to "overlap a rule" if it falls between two of the instances generated by the rule?

@haiderali22
Copy link
Author

What i neant was to overlaps any of the generated instance. This is what i tried, i generted rule next date by specifying the start date(time of the rule and date part from the new event date) and then checked if the generated overlaps the date specified its seems to be working fine. I think i will rephrase the initial question as check if two rules overlap or not?

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

2 participants