EventSpan

sealed interface EventSpan

Temporal extent of a CalendarEvent.

Making the span a sealed hierarchy prevents illegal combinations such as an all-day event with a start time or a timed event missing one endpoint.

Inheritors

Types

Link copied to clipboard
data class AllDay(val startDate: LocalDate, val endDate: LocalDate = startDate) : EventSpan

All-day or multi-day banner event spanning startDate..endDate inclusive.

Link copied to clipboard
data class Timed(val start: LocalDateTime, val end: LocalDateTime) : EventSpan

Timed event spanning start..end (supports same-day and overnight spans).

Properties

Link copied to clipboard
abstract val endDate: LocalDate
Link copied to clipboard
abstract val startDate: LocalDate