Nepali Date Library

Work with Bikram Sambat Dates using Clean, Standardized Code

Fast, verified Nepali Date (Bikram Sambat / BS) converter and zero-dependency library ecosystem. Convert bidirectionally between BS and AD, calculate dates, and manage Nepal fiscal years with unified APIs across TypeScript, Python, and PHP.

Quick Install
$npm install nepali-date-library
Ecosystem:TypeScriptNode.jsPythonPHPBrowser
1976 – 2100 BS
Supported Calendar Range
AD ↔ BS
Bidirectional Conversion
Node, Python, PHP
Multi-Language Ecosystem
Fiscal Year
Quarter & Fiscal Logic

Unified API, Multi-Language Parity

Enjoy a consistent developer experience across NodeJS/TypeScript, Python, and PHP with standardized methods.

import { NepaliDate } from "nepali-date-library";

// 1. Current Nepali Date
const date = new NepaliDate();
console.log(date.format("YYYY-MM-DD")); // e.g. 2081-06-29

// 2. Conversion from Gregorian (AD)
const bsDate = NepaliDate.fromAD(new Date("2024-10-15"));
console.log(bsDate.format("DD MMMM YYYY")); // 29 Ashwin 2081

// 3. Date Arithmetic & Manipulation
bsDate.addDays(30);
console.log("Future date:", bsDate.format("YYYY-MM-DD"));

// 4. Fiscal Year Calculation
const fiscalYear = bsDate.getFiscalYear();
console.log("Fiscal Year:", fiscalYear); // 2081/82

How Nepali Date Works

A straightforward workflow to handle Bikram Sambat calendar conversions and calculations.

01Package Registry

Install Your Package

Get started in seconds using npm for Node.js/TypeScript, pip for Python, or composer for PHP applications.

02Bidirectional Engine

Parse & Convert

Convert accurately between Bikram Sambat (BS) and Gregorian (AD) calendars using pre-computed historical tables.

03Date Arithmetic

Manipulate & Calculate

Add or subtract days, months, and years, calculate intervals, and compute Nepali fiscal years and quarters.

04Localization

Format & Localize

Render formatted date strings using intuitive tokens like YYYY-MM-DD or full Devanagari and Nepali month names.

Engineered for Precision & Performance

Accurate calendar math, fiscal year modeling, and zero runtime bloat.

Date Converter

Bikram Sambat Date Converter (BS ↔ AD)

Instant bidirectional conversion between Bikram Sambat (BS) and Gregorian (AD) calendars with live age calculation and date difference tools.

Annual Verification

Annual Official Calendar Audits

Verified up to the current active year. Each year in Ashwin (Ashoj), when the Nepal Government releases the official calendar, our mapping tables are updated with exact astronomical corrections.

Universal API

Consistent Multi-Language API

Write identical logic across NodeJS/TypeScript, Python, and PHP projects with standardized method names and return types.

Smart Arithmetic

Date Arithmetic & Manipulation

Easily add or subtract days, months, and years with automatic edge-case handling for varying Nepali month lengths.

Fiscal Logic

Nepali Fiscal Year Support

Built-in logic for Government of Nepal fiscal years (Shrawan to Ashadh) and automatic quarter calculations.

Zero Bloat

Zero Dependencies & Lightweight

Zero runtime bloat. Extremely fast execution and minimal footprint designed for high-concurrency servers and web apps.

Advertisement