tOverlapHalf(ts1, ts2, presort=False)¶
Find overlapping elements in two lists of datetime objects
This is one-half of tOverlap, i.e. it finds only occurrences where ts2 exists within the bounds of ts1, or the second element returned by tOverlap.
first set of datetime object
- Set to use a faster algorithm which assumes ts1 and
ts2 are both sorted in ascending order. This speeds up the overlap comparison by about 50x, so it is worth sorting the list if one sort can be done for many calls to tOverlap
indices of ts2 within interval of ts1
note: Returns empty list if no overlap found