NepaliCalendarEvent

data class NepaliCalendarEvent(val date: SimpleDate, val name: String, val kind: NepaliEventKind, val closesOffices: Boolean = kind.closesOfficesByDefault, val id: String? = null, val payload: String? = null)(source)

Something that happens on one Bikram Sambat day: a public holiday, a festival, a school programme, a deadline, a birthday.

A holiday is an event like any other. What separates them is closesOffices, not the name: two days can both be called Dashain and only one of them close the school. That is why the flag lives here rather than on kind, where a taxonomy would have to decide for every institution at once.

Constructors

Link copied to clipboard
constructor(date: SimpleDate, name: String, kind: NepaliEventKind, closesOffices: Boolean = kind.closesOfficesByDefault, id: String? = null, payload: String? = null)

Properties

Link copied to clipboard

Whether the institution is shut for this. Defaults to what kind usually means, so a GovernmentPublic entry closes the day and an Observance does not, and either can be overridden: a regional holiday closes one district and not the next, and a school programme closes nothing at all.

Link copied to clipboard

Bikram Sambat date the event falls on. One day per entry, so a ten-day festival is ten entries, which spanningDays and spanningThrough build from one.

Link copied to clipboard
val id: String?

An identifier the app can correlate back to its own record, carried through untouched. The library never reads it.

Link copied to clipboard

Category, which is what a calendar colors by. See NepaliEventKind.

Link copied to clipboard

Display name, for example "Dashain - Vijaya Dashami" or "Sprint review".

Link copied to clipboard

Anything else the app wants back when the day is tapped, as an opaque string: JSON, a URL, an identifier list. The library never parses it, which is what keeps :core free of a JSON dependency and able to compile on every target.

Functions

Link copied to clipboard

This event on each of days consecutive days, starting on its own date, for a festival or a leave that runs longer than one day.

Link copied to clipboard

This event on each day from its own date through end, both ends included, which is the shape published holiday lists and leave requests usually state a span in.