nepali_kit_core library
Pure Dart library entry point for nepali_kit.
Contains zero dependencies on Flutter. Safe to import in backend servers (Dart Frog, Serverpod), command-line tools, and pure Dart scripts.
Classes
- BsAdConverter
- Core bidirectional converter between Bikram Sambat (BS) and Gregorian (AD) dates.
- BsCalendarData
- Verified month days count table from BS 1975 to BS 2099.
- CalendarEvent
- Represents an immutable calendar event associated with a Bikram Sambat date.
- CalendarEventCollection
- A lightweight, immutable registry and query helper for CalendarEvents.
- HolidayData
- Preloaded official gazetted public holidays for Bikram Sambat years.
- HolidayProvider
- Pluggable interface for custom or dynamic holiday providers.
- NepaliCalendarConstants
- Constants defining the verified boundaries and epochs of the calendar system.
- NepaliDate
- An immutable date-only representation in the Bikram Sambat (BS) calendar.
- NepaliDateFormat
- Formatter and parser for NepaliDateTime and NepaliDate supporting standard ICU tokens.
- NepaliDateRange
- An immutable representation of a date range in the Bikram Sambat calendar.
- NepaliDateTime
- An immutable representation of an instant in time in the Bikram Sambat (BS) calendar.
- NepaliDigits
- Utilities for converting between ASCII digits (0-9) and Nepali Devanagari numerals (०-९).
- NepaliFiscalQuarter
- Represents a specific financial quarter in a Nepali fiscal year.
- NepaliFiscalYear
- Represents a Nepal Government Fiscal Year (आर्थिक वर्ष).
- NepaliHoliday
- Represents an immutable holiday in Nepal.
- NepaliHolidayService
- Query, lookup, and registration service for Nepali holidays.
- NepaliMoment
- Formatter for relative timestamps ("time ago", "just now", and future relative moments).
- NepaliNumberFormat
-
Formatter for Nepali numbers supporting South Asian comma grouping (
12,34,567.89) and currency formatting with symbol (रु/Rs.). - NepaliNumberToWords
-
Converts numbers to Nepali words (e.g.
१२३४->एक हजार दुई सय चौंतीस). - NepaliUnicode
- Production-ready Romanized Nepali (English literal) to Nepali Unicode converter.
Enums
- CalendarEventType
- Categories/types of calendar events.
- FiscalQuarterIndex
- The 4 standard quarters of a Nepal Government fiscal year.
- HolidayCategory
- Categories of holidays in Nepal.
- Language
- Language option for localization throughout the package.
- NepaliMonth
- Representation of the 12 months in the Bikram Sambat calendar.
- NepaliWeekday
- Representation of the 7 weekdays in the Nepali calendar.
Extensions
- GregorianDateTimeExtensions on NepaliDateTime
- Extension methods on NepaliDateTime for formatting, moments, Gregorian conversions, fiscal calculations, and holidays.
- NepaliDateFiscalExtensions on NepaliDate
- Extension methods on NepaliDate for formatting, moments, fiscal calculations, and holidays.
- NepaliDateTimeExtensions on DateTime
- Extension methods on standard Dart DateTime for easy Bikram Sambat conversions and fiscal calculations.
Exceptions / Errors
- ConversionOutOfBoundsException
- Thrown when date conversion is attempted outside supported calendar bounds.
- NepaliDateException
- Thrown when an invalid Bikram Sambat date is encountered or constructed.
- NepaliDateParseException
- Thrown when a string fails to parse into a valid Nepali date or number.
- NepaliKitException
-
Base exception for all errors thrown within the
nepali_kitpackage.