UNPKG

nepali-date-converter-np

Version:

A lightweight TypeScript/JavaScript package for converting dates between Gregorian (AD) and Bikram Sambat (BS) calendar systems with Nepali and English formatting support.

17 lines (16 loc) 699 B
"use strict"; // Minimal BS/AD mapping data for proof of concept // Each year contains the number of days in each month for that BS year // Real implementation should extend this data for full range Object.defineProperty(exports, "__esModule", { value: true }); exports.bsEpoch = exports.bsMonthData = void 0; exports.bsMonthData = { 2000: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2001: [31, 31, 32, 31, 32, 31, 29, 30, 30, 29, 30, 30], 2002: [31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 29, 31], }; // The AD date corresponding to the start of BS 2000 (Baisakh 1, 2000 BS) exports.bsEpoch = { bs: { year: 2000, month: 1, day: 1 }, ad: { year: 1943, month: 4, day: 14 }, };