This page explains how Bengali Calendar Now builds the monthly grid and how we source observance dates. When there is any conflict, we follow our primary source.
IST shift in code:
date.setTime(date.getTime() + (date.getTimezoneOffset() + 330) * 60 * 1000)
Sourced from Benimadhav Shil Ful Panjika
Computed in the app
29.530588853
days2451549.5
(near 2000-01-06)365.2587564814815
days1938094.4629
1938094.483733333
(not active)Function: ModernDate_to_Julianeday(y, m, d)
This produces a tithi name inside each calendar cell. It is for context only. Official observance comes from the Panjika.
daysSinceNewMoon = JD − 2451549.5
. If negative, add whole synodic months until positive.tithiLength = 29.530588853 / 30
.tithiNumber = floor(daysSinceNewMoon / tithiLength) + 1
, then wrap to 1..30 with ((tithiNumber − 1) % 30) + 1
.Limits
Used to print the Bengali day number and the two Bengali month names shown in the header.
Constants
1938094.4629
365.2587564814815
daysmas_len
(days from year start):index: 1 2 3 4 5 6
value: 30.93, 62.63, 94.00, 125.48, 156.49, 186.92
index: 7 8 9 10 11 12
value: 216.81, 246.32, 275.64, 305.09, 334.91, 365.26
Steps
nJD
.jddiff = nJD − startjd
.lastYearCount = floor(jddiff / 365.2587564814815)
.mesh = startjd + lastYearCount * 365.2587564814815
.i
such that nJD
is in [ps, floor(ns) + 1.75]
, where ps = mesh + mas_len[i]
and ns = mesh + mas_len[i+1]
.floor(nJD − ps) + 1
, month = i + 1
, year = lastYearCount + 1
.The +1.75
day tolerance helps align month edges with common practice.
If you find an error, contact us with the date, location, and the relevant Panjika reference if possible. We check the report against the Panjika and correct confirmed issues. Important fixes go into a simple change log.
For questions or corrections, email us at Coinsmudra@gmail.com.