Package-level declarations
Serializers for the core calendar models. Register or reference these when persisting or transmitting Nepali Date Picker types through a kotlinx-serialization format.
NepaliDatePickerSerializersModule binds every published type: SimpleDate, SimpleTime, CustomCalendar, NepaliMonthCalendar, MonthCalendar, CalendarSystem, and the event types NepaliCalendarEvent, NepaliEventKind and NepaliDayStatus. A CalendarSystem is written as its era number, which is the form CustomCalendarSerializer already uses and is stable against reordering the enum.
An event is written as {"date", "name", "kind"}, with closesOffices added only when it disagrees with what its kind usually means and id / payload only when set, so a cached holiday list stays compact. A NepaliEventKind is written as its name rather than its ordinal, so adding a kind later cannot silently rewrite what a stored file means; an unknown name fails rather than being guessed.
Types
KSerializer for CalendarSystem, written as its era number (1 = Gregorian, 2 = Bikram Sambat).
KSerializer for CustomCalendar - full struct form. All eleven fields are serialized; defaults from the data class are honored on the way back in so older payloads missing dayOfWeekInMonth / dayOfWeek / dayOfYear / weekOfMonth / weekOfYear still decode (those fields default to -1).
KSerializer for MonthCalendar - struct form with the five geometry fields plus the calendar the month is expressed in, written as an era number through CalendarSystemSerializer.
KSerializer for NepaliCalendarEvent, written as {"date": "2082-01-01", "name": "...", "kind": "..."}.
KSerializer for NepaliDayStatus, written as {"isWeeklyOff": false, "events": [...]}.
KSerializer for NepaliEventKind, written as its name, for example "GovernmentPublic".
KSerializer for NepaliMonthCalendar - struct form with five required fields and one optional (daysFromStartOfWeekToFirstOfMonth, which defaults to firstDayOfMonth - 1).
Default KSerializer for SimpleDate - encodes as the string "YYYY-MM-DD".
Alternative KSerializer for SimpleDate - encodes as a JSON object {"year": …, "month": …, "dayOfMonth": …}.
Default KSerializer for SimpleTime - encodes as the string "HH:mm:ss.NNNNNNNNN", always in Asia/Kathmandu (the timezone all SimpleTimes in this library are anchored to). The nanosecond fractional part is omitted when nanosecond == 0 to keep wire payloads small.
Properties
Ready-to-register SerializersModule for every data type the library publishes.