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

Added union to DateTimeRange class #34

Open atoaster opened 4 years ago

atoaster commented 4 years ago

Returns the timedelta of the total union of two DateTimeRange's

thombashi commented 3 years ago

@atoaster Thank you for your PR.

The method looks like useful for some use cases. What concerns me is that the method name deviates from what the method does. The method return value is not returning a union of DateTimeRange but timedelta. I think that union_timedelta or something would be more suitable name for the method.