API Reference
This section provides complete documentation for all classes, functions, and constants exported by the Nepali Date Library for Python.
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 |
| nepali_date_map | Complete date map for BS 1976-2100 |
Quick Import
python
from nepali_date_library 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,
# Date mapping
nepali_date_map
)