NepaliEventKind

What kind of thing an event is, which is what a calendar colors by.

Deliberately narrow, because adding a case is a breaking change. An app with its own taxonomy picks the closest kind and keeps its own category in NepaliCalendarEvent.payload; whether the day is worked is NepaliCalendarEvent.closesOffices's job either way.

Entries

Link copied to clipboard

Bank / government office is closed. Sarkari bida.

Link copied to clipboard

Religious or cultural, Dashain, Tihar, Holi, Id, Christmas, and the like.

Link copied to clipboard

Province- or district-level, not nationally observed.

Link copied to clipboard

Recognized but ordinarily worked: World Health Day, a school programme, a meeting.

Properties

Link copied to clipboard

Whether an event of this kind usually shuts the institution, and so what NepaliCalendarEvent.closesOffices defaults to. Only a starting point: the event itself has the final say, because the same kind closes one place and not another.

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int
Link copied to clipboard

How strongly a kind describes a day when several land on it, lowest first. A day the offices close is called that before anything else it also happens to be, and an observance yields to everything. Sorting and color resolution both read this, so the two never disagree.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.