(ts)
return ts[-1][0] - ts[0][0]
Calculates the time span of the timeseries.

    Args:
        ts: A timeseries list of [time, value].

    Returns:
        The time span of the timeseries.
Calculates the time span of the timeseries.
Calculates the time span of the timeseries .
def timespan(ts):
    """Calculates the time span of the timeseries.

    Args:
        ts: A timeseries list of [time, value].

    Returns:
        The time span of the timeseries.
    """
    return ts[-1][0] - ts[0][0]
def timespan ( ts ) : return ts [ - 1 ] [ 0 ] - ts [ 0 ] [ 0 ]