Package-level declarations

Immutable calendar models (CustomCalendar, SimpleDate, SimpleTime, NepaliMonthCalendar), locale (NepaliDateLocale), digit scripts, and the NepaliDateFormatter contract that drives locale-aware rendering.

Types

Link copied to clipboard
data class CustomCalendar(val year: Int, val month: Int, val dayOfMonth: Int, val era: Int, val firstDayOfMonth: Int, val lastDayOfMonth: Int, val totalDaysInMonth: Int, val dayOfWeekInMonth: Int = -1, val dayOfWeek: Int = -1, val dayOfYear: Int = -1, val weekOfMonth: Int = -1, val weekOfYear: Int = -1)

Represents a date in a custom calendar system with detailed information.

Link copied to clipboard
data class CustomDateTime(val customCalendar: CustomCalendar, val simpleTime: SimpleTime)

A data holder representing a CustomCalendar and SimpleTime.

Link copied to clipboard

Numeral script used when rendering digits in localized dates / times.

Link copied to clipboard

Represents the format for displaying names (e.g., weekdays or months).

Link copied to clipboard

Represents different styles for formatting Nepali dates.

Link copied to clipboard

Parse and format SimpleDate for short numeric text-field input.

Link copied to clipboard
data class NepaliDateLocale(val language: NepaliDatePickerLang = NepaliDatePickerLang.ENGLISH, val dateFormat: NepaliDateFormatStyle = NepaliDateFormatStyle.LONG, val weekDayName: NameFormat = NameFormat.FULL, val monthName: NameFormat = NameFormat.FULL, val digitScript: DigitScript? = null)

Represents locale settings for Nepali date display and formatting.

Link copied to clipboard

Represents the language used for Nepali date pickers.

Link copied to clipboard
data class NepaliMonthCalendar(val year: Int, val month: Int, val totalDaysInMonth: Int, val firstDayOfMonth: Int, val lastDayOfMonth: Int, val daysFromStartOfWeekToFirstOfMonth: Int = firstDayOfMonth - 1)

Represents a calendar month in the Nepali calendar system.

Link copied to clipboard
data class NepaliMonthName(val short: String, val full: String)

Represents the name of a month in the Nepali calendar.

Link copied to clipboard
data class NepaliWeekdayName(val short: String, val medium: String, val full: String)

Represents the name of a weekday in the Nepali calendar.

Link copied to clipboard
data class ReferenceDate(val englishDate: CustomCalendar, val nepaliDate: CustomCalendar)
Link copied to clipboard
data class SimpleDate(val year: Int, val month: Int, val dayOfMonth: Int = 1) : Comparable<SimpleDate>

Represents a simple date with year, month, and day of the month.

Link copied to clipboard
data class SimpleTime(val hour: Int, val minute: Int, val second: Int, val nanosecond: Int)

Represents a 24Hrs format time of day (hour, minute, second, nanosecond). Strictly adjusted to the Asia/Kathmandu TimeZone.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Reverse lookup. If this char is a digit in any supported non-Latin script (Devanagari today), return the matching ASCII '0'..'9'. If it is already an ASCII digit, return it unchanged. Otherwise return null.

Link copied to clipboard

Converts a CustomCalendar object to a SimpleDate object.