Represents a collection of time periods (cycles).
Cycles(periods: ZeitPeriod[])
Creates a new Cycles instance.
findAfter(zeit?: ZeitSchema): ZeitPeriod
Finds the nearest period after the given date.
findBefore(zeit?: ZeitSchema): ZeitPeriod
Finds the nearest period before the given date.
findPeriod(zeit?: ZeitSchema): ZeitPeriod
Finds the period that contains the given date.
getCurrentDateTime(): DateTime
Gets the current date and time in the timezone of the first period.
Retrieves the first period in this Cycles instance.
Retrieves the last period in this Cycles instance.
Gets the total number of periods in this Cycles instance.
getPeriods(): ZeitPeriod[]
Retrieves all periods in this Cycles instance.
getUserZeit(zeit: ZeitSchema): UserZeit
Converts a ZeitSchema to a UserZeit object.
fromPeriods(periods: ZeitPeriod[]): Cycles
Creates a new Cycles instance from an array of periods.