woom.iters.Cycle

woom.iters.Cycle#

class woom.iters.Cycle(begin_date, end_date=None)[source]#

Container for a time cycle

__init__(begin_date, end_date=None)[source]#

Attributes

begin_date

Begin date (WoomDate)

date

Same as begin_date

is_interval

Whether it is an interval or a single date (bool)

is_first

Whether it is the first cycle (bool)

is_last

Whether it is the last cycle (bool)

end_date

End date (WoomDate or None) defaults to None

duration

Interval duration (Timedelta or None)

label

String used for for printing and based on the ISO 8601 format (str)

token

String used in file and directory names and based on the ISO 8601 format (str)

next

Next cycle (Cycle or None)

prev

Previous cycle (Cycle or None)

Methods

describe()

get_env_vars([suffix])

Export a dict of WOOM environment variables about this cycle

get_params([suffix])

Export a dict of substitution parameters about this cycle