spanningDays

This event on each of days consecutive days, starting on its own date, for a festival or a leave that runs longer than one day.

A NepaliCalendarEvent covers a single day, so a span is a list of entries rather than a range. Every entry keeps this event's name, kind, closesOffices, id and payload, and differs only in its date. A span running out of Chaitra into Baisakh yields entries in both years, so each one is reported by the year a NepaliEventProvider is asked for.

Give the event an id first when the days have to be recognized as one thing again: eventsIn(year, month).distinctBy { it.id } is then a single agenda row for the whole span. Nepal's published holiday lists name each day separately, so prefer real per-day names where they exist and keep this for a span an app owns.

NepaliCalendarEvent(
date = SimpleDate(2082, 6, 17),
name = "Dashain",
kind = NepaliEventKind.Religious,
id = "dashain-2082"
).spanningDays(10)

The event's own date is taken as stated, the way every other call here treats it, so only the length of the span is checked.

Parameters

days

how many days the span covers, counting the first. 1 returns this event alone.

Throws