Skip to content

API Reference ​

This section provides complete documentation for all classes, functions, and constants exported by the Nepali Date Library for Python.

Main Exports ​

Classes ​

ClassDescription
NepaliDateMain class for working with Nepali dates

Functions ​

FunctionDescription
ADtoBSConvert AD (Gregorian) date to BS (Nepali)
BStoADConvert BS (Nepali) date to AD (Gregorian)

Constants ​

ConstantDescription
month_enEnglish month names
month_npNepali month names
month_short_enShort English month names
month_short_npShort Nepali month names
week_enEnglish weekday names
week_npNepali weekday names
week_short_enShort English weekday names
week_short_npShort Nepali weekday names
nepali_date_mapComplete 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
)

Detailed Reference ​

Released under the MIT License.