chaimleib/intervaltree

For timespan?

buhtz opened this issue · 1 comments

buhtz commented

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.

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