Package-level declarations

Holiday SPI. NepaliHolidayProvider and the working-day helpers let a consumer plug in holiday data; no holiday dataset ships with the library by design.

Types

Link copied to clipboard
data class HolidayEntry(val date: SimpleDate, val name: String, val kind: HolidayKind)

A single holiday in the Nepali (Bikram Sambat) calendar.

Link copied to clipboard

Categorization for HolidayEntry. Use this to filter or style holidays in your UI (e.g. render GovernmentPublic in red, Observance in muted gray).

Link copied to clipboard

Service-provider interface for supplying holiday data to the picker.

Link copied to clipboard

Day-of-week conventions.

Link copied to clipboard

No-op provider. Use as a default when the consumer wants the holiday-aware APIs but has not (yet) wired a real data source. Behaves as if no day is a holiday.

Functions

Link copied to clipboard
fun NepaliDateConverter.addWorkingDays(from: SimpleDate, days: Int, provider: NepaliHolidayProvider, weekend: Set<Int> = NepaliWeekend.Default): SimpleDate

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

Link copied to clipboard

Returns a NepaliSelectableDates that delegates to this one but additionally rejects any date marked as a holiday by provider.

Link copied to clipboard
fun NepaliSelectableDates.excludingWeekends(weekend: Set<Int> = NepaliWeekend.Default): NepaliSelectableDates

Returns a NepaliSelectableDates that delegates to this one but additionally rejects weekend days as defined by weekend (default: Saturday only).

Link copied to clipboard
fun NepaliDateConverter.nextWorkingDay(from: SimpleDate, provider: NepaliHolidayProvider, weekend: Set<Int> = NepaliWeekend.Default): SimpleDate

First working day at or after from, skipping both weekend days and dates flagged by provider.

Link copied to clipboard
fun NepaliDateConverter.workingDaysBetween(start: SimpleDate, end: SimpleDate, provider: NepaliHolidayProvider, weekend: Set<Int> = NepaliWeekend.Default): Int

Number of working days in the half-open range [start, end), skipping both weekend days and dates flagged by provider.