पात्रोमा जानुहोस्

How BS ↔ AD conversion works

Bikram Sambat is a sidereal solar calendar. A month begins when the Sun enters the next 30-degree sign, so BS months run 29 to 32 days and the year begins in mid-April rather than in January.

There is no formula: the month lengths are published year by year, and conversion is a day count against that published table.

Why BS dates cannot be calculated

A Gregorian month length follows a rule you can write down. A Bikram Sambat month length does not: it depends on how long the Sun spends in a sign that year, which varies. The lengths are determined and published annually by the Nepal Panchanga Nirnayak Samiti, and every Nepali calendar — printed or digital — works from that published table.

Baishakh 31, Jestha 31, Aashadha 32, Shrawan 31, Bhadra 31, Ashwin 31, Kartik 30, Mangsir 29, Paush 30, Magh 29, Falgun 30, Chaitra 30 — the twelve month lengths of 2083 BS. Another year has a different set.

How this calendar converts

  1. The table anchors at BS 2000-01-01, which is 1943-04-14.
  2. Any BS date is turned into a day count by summing the published month lengths before it.
  3. That day count is added to the anchor to give the Gregorian date; the reverse runs the same way backwards.
  4. Both directions use one implementation. Nothing in the application does its own date arithmetic, so the converter and the calendar grid cannot disagree.

How it is checked

  • All 36,891 days are converted in both directions and compared against the published calendar. A single disagreement fails the build.
  • The dataset is checked for duplicate dates, missing dates, impossible month lengths, malformed metadata and broken search-index entries.
  • Round-trip properties are tested: converting BS → AD → BS, and AD → BS → AD, must return the original date for every date in the table.
  • Years whose length a solar year cannot have are reported as warnings rather than silently corrected — BS 2087 and BS 2096 are projections, and this calendar reproduces them as published.

Questions

How does BS to AD conversion work?
Bikram Sambat is a sidereal solar calendar: a month begins when the Sun enters the next 30-degree sign, so its months run between 29 and 32 days with no formula behind the pattern. Conversion therefore cannot be calculated — it is a lookup against the published month lengths. This calendar counts days from BS 2000-01-01, which is 14 April 1943 AD, using the lengths published for each year, and every one of its 36,891 days is checked against the source in both directions.
How many months are in the Nepali calendar?
Twelve: Baishakh, Jestha, Aashadha, Shrawan, Bhadra, Ashwin, Kartik, Mangsir, Paush, Magh, Falgun, Chaitra. Each runs 29 to 32 days, and a Bikram Sambat year is usually 365 or 366 days long. The year begins on Baishakh 1, which falls in mid-April.
Which dates can this calendar convert?
Every date from BS 2000–2100 (1943-04-14 to 2044-04-13 AD). Dates outside that range are refused rather than estimated, because the month lengths that make conversion possible are published year by year and do not exist beyond it.