NEPALI_DATE_MAP
Historical calendar mapping table storing verified day counts for every Bikram Sambat month between 1976 and 2100 BS.
The NEPALI_DATE_MAP data structure contains the calendar matrix for the Bikram Sambat system spanning years 1976 through 2100 BS. Because Bikram Sambat months have variable day counts determined by astronomical solar calculations rather than fixed rules, this mapping table provides the definitive source of truth for conversions, day calculations, and month lengths.
[!NOTE] Dates up to the active calendar year are verified against official publications from the Nepal Panchanga Nirnayak Samiti (नेपाल पञ्चाङ्ग निर्णायक समिति). Every year around the month of Ashwin (Ashoj), when the official government calendar is gazetted for the subsequent year, this mapping table is audited and updated with exact solar ingress corrections.
Import
import { NEPALI_DATE_MAP } from "nepali-date-library";Type Definition
export const NEPALI_DATE_MAP: {
year: number;
days: number[];
totalDays: number;
daysTillNow: number;
}[];Object Schema
Each entry in the array represents one Bikram Sambat year and adheres to the following structure:
| Field | Type | Description |
|---|---|---|
year | number | The Bikram Sambat year (e.g. 2081). |
days | number[] | An array of 12 integers representing the day count of each month from Baisakh (index 0) to Chaitra (index 11). |
totalDays | number | Total number of days in that Bikram Sambat year (typically 365 or 366). |
daysTillNow | number | Cumulative count of days elapsed from calendar epoch up to the end of this year. |
Range and Epoch
- Start Year:
1976BS (Gregorian equivalent: April 13, 1919) - End Year:
2100BS - Total Entries: 125 historical and future astronomical calendar tables.
Examples
Accessing Year Metadata
import { NEPALI_DATE_MAP } from "nepali-date-library";
// Find data for year 2081 BS
const year2081 = NEPALI_DATE_MAP.find((item) => item.year === 2081);
console.log(year2081?.year); // 2081
console.log(year2081?.days); // [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30]
console.log(year2081?.totalDays); // 365Inspecting Specific Month Length
import { NEPALI_DATE_MAP } from "nepali-date-library";
// 2081 Baisakh (index 0) has 31 days
const baisakhDays = NEPALI_DATE_MAP[2081 - 1976].days[0];
console.log(`2081 Baisakh has ${baisakhDays} days.`);Related
NepaliDate.minimum(): Lower calendar limit.NepaliDate.maximum(): Upper calendar limit.date.daysInMonth(): Query days in a month.
BStoAD()
Pure helper function to convert Bikram Sambat date strings into Gregorian calendar date strings.
NUMBER_NP
Array containing Devanagari numeral glyphs for digits zero through nine used for Nepali number localization.