DateRange.overlap
time.DateRange.overlap(time_frame)
Compute a new DateRange that represents the subset of dates in this range that are also in the given TimeFrame.
Parameters
time_frame: TimeFrame
-
The time frame to overlap.
Returns
DateRange | None
-
The subset DateRange, or None if that subset would be empty – when there’s no overlap between this DateRange and the time frame.