pyinterp.core.period.PeriodList.duration

pyinterp.core.period.PeriodList.duration#

PeriodList.duration(self) → object#

Calculate the total duration covered by the periods in the list.

Returns:

The total duration as an integer representing the number of time units.

Note

The algorithm assumes that periods are sorted, otherwise the result may be incorrect.