NepaliCalendarPolicyInfo

One institution's closed days: the weekdays it never opens plus the holidays it keeps.

Build one with createCalendarPolicy. Every method that resolves a day of the week goes through the conversion table, so a date outside the supported Bikram Sambat range throws, exactly as the conversion functions do.

Properties

Link copied to clipboard

The weekdays this policy closes, 1 for Sunday through 7 for Saturday.

Functions

Link copied to clipboard
fun addWorkingDays(year: Int, month: Int, dayOfMonth: Int, days: Int): NepaliDate

The date days working days away, with Excel WORKDAY semantics: 0 stays put, a positive count lands strictly after, a negative one strictly before.

Link copied to clipboard
fun eventsIn(year: Int, month: Int): Array<NepaliEvent>

Every holiday in one Bikram Sambat month, in date order, for a wall-calendar list.

Link copied to clipboard
fun eventsOn(year: Int, month: Int, dayOfMonth: Int): Array<NepaliEvent>

The holidays on one Bikram Sambat date, strongest kind first, empty when there are none.

Link copied to clipboard
fun isNonWorkingDay(year: Int, month: Int, dayOfMonth: Int): Boolean

Whether the institution is closed on the given date, for either reason.

Link copied to clipboard
fun isWeeklyOff(dayOfWeek: Int): Boolean

Whether dayOfWeek (1 = Sunday) is one of the weekly off days.

Link copied to clipboard

Every day of one Bikram Sambat month, in day order: index 0 is day 1.

Link copied to clipboard
fun nextWorkingDay(year: Int, month: Int, dayOfMonth: Int): NepaliDate

The first working day at or after the given date, which may be that date itself.

Link copied to clipboard
fun statusOf(year: Int, month: Int, dayOfMonth: Int): NepaliDayStatusInfo

What the given Bikram Sambat date is: closed by the week, by a holiday, by both, or neither.

Link copied to clipboard
fun workingDaysBetween(startYear: Int, startMonth: Int, startDay: Int, endYear: Int, endMonth: Int, endDay: Int): Int

Working days in the half-open range [start, end). Add 1 to include the end date.