expandEventThrough

fun expandEventThrough(event: NepaliEvent, endYear: Int, endMonth: Int, endDayOfMonth: Int): Array<NepaliEvent>(source)

event repeated on each day from its own date through the given end date, both ends included, which is how a published holiday list or a leave request usually states a span.

const leave = createDetailedEvent(2082, 6, 17, 'Annual leave', 'observance', false, 'leave-42', null)
const days = expandEventThrough(leave, 2082, 6, 26)

Throws

if the end falls before event's own date, if it is not a day its month has, or if the span runs past the supported Bikram Sambat range.