API Reference
This section provides complete documentation for all classes, functions, and constants exported by the Nepali Date Library.
Main Exports
Classes
| Class | Description |
|---|---|
| NepaliDate | Main class for working with Nepali dates |
Functions
| Function | Description |
|---|---|
| ADtoBS | Convert AD (Gregorian) date to BS (Nepali) |
| BStoAD | Convert BS (Nepali) date to AD (Gregorian) |
Constants
| Constant | Description |
|---|---|
| MONTH_EN | English month names |
| MONTH_NP | Nepali month names |
| MONTH_SHORT_EN | Short English month names |
| MONTH_SHORT_NP | Short Nepali month names |
| WEEK_EN | English weekday names |
| WEEK_NP | Nepali weekday names |
| WEEK_SHORT_EN | Short English weekday names |
| WEEK_SHORT_NP | Short Nepali weekday names |
| NUMBER_NP | Nepali digits (०-९) |
| NEPALI_DATE_MAP | Complete date map for BS 2000-2100 |
Quick Import
typescript
import {
// Main class
NepaliDate,
// Conversion functions
ADtoBS,
BStoAD,
// Month constants
MONTH_EN,
MONTH_NP,
MONTH_SHORT_EN,
MONTH_SHORT_NP,
// Week constants
WEEK_EN,
WEEK_NP,
WEEK_SHORT_EN,
WEEK_SHORT_NP,
// Other constants
NUMBER_NP,
NEPALI_DATE_MAP,
} from "nepali-date-library";