Closed momocow closed 4 years ago
@momocow Thank you for your feedback.
You can get a datetime.timedelta
instance of the range by timedelta
property from a DateTimeRange
instance:
https://datetimerange.readthedocs.io/en/latest/pages/reference/datetimerange.html#datetimerange.DateTimeRange.timedelta
Or you can get total seconds by get_timedelta_second
method:
https://datetimerange.readthedocs.io/en/latest/pages/reference/datetimerange.html#datetimerange.DateTimeRange.get_timedelta_second
Is this what you would expect?
Oops, yes! I must miss reading this part of the API, I should check it out more carefully.
Thank you for the links and also a nice library that fits my requirements!
Maybe a method that returns a
timedelta
is enough to represent the length of the range.