NepaliDayStatus

data class NepaliDayStatus(val isWeeklyOff: Boolean, val events: List<NepaliCalendarEvent>)(source)

What one day is, as far as a NepaliCalendarPolicy is concerned: whether the week makes it a day off, and what is named on it.

The two are kept apart because they answer different questions. A weekly off day repeats fifty-two times a year and carries no name worth drawing; an event is a fact about that date alone. A day can be both, and a day that is both is still one day off, so isNonWorking is a single answer rather than a count.

Constructors

Link copied to clipboard
constructor(isWeeklyOff: Boolean, events: List<NepaliCalendarEvent>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The events that actually shut the institution, which is the subset the arithmetic counts.

Link copied to clipboard

everything named on the day, strongest NepaliEventKind first. Empty when the day carries nothing, which is the usual case even for a weekly off day.

Link copied to clipboard

True when the institution is shut, whether the week says so or an event does.

Link copied to clipboard

whether the day falls on one of the policy's weekly off days.

Link copied to clipboard

The names of the day's events, strongest first, for whatever the app draws or announces.

Link copied to clipboard

The kind that describes the day best, or null when nothing is named on it. A day that is only a weekly off day has no kind, which is what separates "it is Saturday" from "it is Dashain, which happens to be a Saturday".