addWorkingDays

fun NepaliDateConverter.addWorkingDays(from: SimpleDate, days: Int, provider: NepaliEventProvider, weekend: Set<Int> = NepaliWeekend.Default): SimpleDate(source)

Returns the date that is days working days from from, skipping weekend and the closures provider reports. Follows Excel WORKDAY semantics:

  • days == 0 returns from unchanged.

  • days > 0 returns the days-th working day strictly after from.

  • days < 0 returns the |days|-th working day strictly before from.

Note that this means addWorkingDays(from, 0) is not the same as nextWorkingDay(from): use the latter explicitly if you want adjustment.

Throws

if more than ~2 years of scanning fails to find the requested day.


The date days working days from from for the institution policy describes, with the Excel WORKDAY semantics of the provider overload.