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.
Gets the first period in this Cycles instance.
Gets the last period in this Cycles instance.
Gets the total number of periods in this Cycles instance.
getPeriodByIndex(index: number): ZeitPeriod
Gets the period at the specified index.
getPeriodByZeit(zeit: ZeitSchema): ZeitPeriod | undefined
Gets the period that contains the specified date.
getPeriods(): ZeitPeriod[]
Gets 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.