overnight

fun overnight(startDay: DayOfWeek, startHour: Int, startMinute: Int, endHour: Int, endMinute: Int): Map<DayOfWeek, List<DndTimeWindow>>

Creates a DND schedule that crosses midnight, splitting into two entries.

Splits by total minutes: if startHour60+startMinute endHour60+endMinute, produces startDay startHour:startMinute-23:59 and startDay+1 00:00-endHour:endMinute. Otherwise returns a single entry on startDay.

Example: overnight(MONDAY, 22, 0, 7, 0){MONDAY: [22:00-23:59], TUESDAY: [00:00-07:00]}

Since

4.35.0