thombashi / DateTimeRange

DateTimeRange is a Python library to handle a time range. e.g. check whether a time is within the time range, get the intersection of time ranges, truncate a time range, iterate through a time range, and so forth.
https://datetimerange.rtfd.io/
MIT License
106 stars 16 forks source link

Subtract: Remove the intersection of two ranges #36

Closed bramski closed 3 years ago

bramski commented 3 years ago

Subtracting two ranges will result in an array of ranges: empty set -- the second range is equal or greater than the first single set -- the second set overlaps the beginning or end of the first or does not intersect at all two ranges -- the second set is within the first and slices it into two new pieces

thombashi commented 3 years ago

Please apply code formatter. You can do that as follows:

make setup
make fmt
bramski commented 3 years ago

@thombashi looks like the test failures are due to python 3.5. This is all passing locally.

thombashi commented 3 years ago

@thombashi looks like the test failures are due to python 3.5. This is all passing locally.

I'll fix CI.