Range

data class Range(val years: List<YearsSelector>? = null, val months: List<MonthsOrDateSelector>? = null, val weeks: List<WeeksSelector>? = null, val text: String? = null, val useSeparatorForReadability: Boolean? = null, val weekdays: List<WeekdaysSelector>? = null, val holidays: List<HolidaySelector>? = null, val isRestrictedByHolidays: Boolean = false, val times: List<TimesSelector>? = null) : Selector(source)

At a certain time of year(s), months, weeks, weekdays, times.

text can be set instead of years, months and weeks to define a wide range in prose, for example "'during Ramadan': Mo-Fr 20:00-22:00".

If isRestrictedByHolidays is true, it means its only those weekdays on the given holidays, e.g. Mondays that are school holidays. If false, it's on those weekdays and holidays, e.g. Sundays and public holidays.

Constructors

Link copied to clipboard
constructor(years: List<YearsSelector>? = null, months: List<MonthsOrDateSelector>? = null, weeks: List<WeeksSelector>? = null, text: String? = null, useSeparatorForReadability: Boolean? = null, weekdays: List<WeekdaysSelector>? = null, holidays: List<HolidaySelector>? = null, isRestrictedByHolidays: Boolean = false, times: List<TimesSelector>? = null)
constructor(weekdays: List<WeekdaysSelector>, times: List<TimesSelector>)

Convenience constructor for weekdays plus times

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val text: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun containsTimePoints(): Boolean

Whether this selector contains points in time, e.g.Mo-Fr 08:00

Link copied to clipboard
open override fun containsTimeSpans(): Boolean

Whether this selector contains time spans, e.g.Mo-Fr 08:00-12:00 or e.g. Jan-Feb

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open override fun toString(): String