uataq.timerange.TimeRange#

class uataq.timerange.TimeRange(time_range=None, start=None, stop=None)[source]#

TimeRange class to represent a time range with start and stop times.

__init__(time_range=None, start=None, stop=None)[source]#

Initialize a TimeRange object with the specified time range.

Raises:

ValueError – If time_range is given together with start or stop, or it is not a string, a pair, a slice or a TimeRange.

Attributes

start

Start of the range, or None when unbounded.

stop

End of the range, or None when unbounded.

total_seconds

Length of the range in seconds.

Methods

parse_iso(string[, inclusive])

Parse an ISO 8601 time string into a datetime.