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

For timespan? #108

Open
buhtz opened this issue Jun 7, 2021 · 1 comment
Open

For timespan? #108

buhtz opened this issue Jun 7, 2021 · 1 comment

Comments

@buhtz
Copy link

buhtz commented Jun 7, 2021

I am not sure what an "Intervall Tree" is and for what this is usefull.

But I wonder if your intervall tree is usefull to for datetime.datetime objects, to find overlapping time spans.

Am I right at this point?

This question is not about how, just if your package is the right answer for this. I will try.

@yakovkeselman
Copy link

from dateutil.parser import parse
from intervaltree import IntervalTree
d1 = parse('2020-03-20')
d2 = parse('2020-03-22')
t = IntervalTree()
t[d1:d2] = 0

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