Minutes

when_exactly.Minutes

Bases: when_exactly.core.custom_collection.CustomCollection[when_exactly._api.Minute]

A collection of Minute intervals.

Example
>>> import when_exactly as wnx
>>> minutes = wnx.Minutes([
...     wnx.Minute(2020, 1, 1, 0, 0),
...     wnx.Minute(2020, 1, 1, 0, 30),
... ])
>>> len(minutes)
2
>>> minutes[0]
Minute(2020, 1, 1, 0, 0)

values property

Get the sorted list of unique intervals in this collection.

Returns:

Type Description
list[when_exactly.core.collection.CollectionT]

A sorted list of intervals.

__init__(values)

Initialize a Collection with the given intervals.

Parameters:

Name Type Description Default
values typing.Iterable[when_exactly.core.collection.CollectionT]

An iterable of intervals. Duplicates will be removed and the intervals will be sorted.

required