সূর্য ৩০°-এর রাশি-সীমা কখন অতিক্রম করেছে—এটি astronomy engine-এর প্রশ্ন। সেই মুহূর্তের পরে কোন স্থানীয় দিনে নতুন বাংলা মাসের ১ তারিখ বসবে—এটি calendar rule engine-এর প্রশ্ন। প্রথমটির precision বাড়ালেই দ্বিতীয়টির উত্তর স্বয়ংক্রিয়ভাবে পাওয়া যায় না।
সংক্রান্তির মুহূর্ত এবং মাসের প্রথম দিন এক বিষয় নয়
Saṅkrānti হলো নিরয়ণ সূর্যের ০°, ৩০°, ৬০°… longitude crossing। এটি একটি instant—Julian Day, TT বা UTC দিয়ে প্রকাশ করা যায়। কিন্তু মাসারম্ভ একটি assigned civil/Panchanga date। একই instant-এর উপর দুই ভিন্ন rule-set প্রয়োগ করলে সংক্রান্তির সময় একই থেকেও মাসের প্রথম দিন এবং মাসের দৈর্ঘ্য আলাদা হতে পারে। এতে astronomy engine অপরিহার্যভাবে ভুল প্রমাণিত হয় না।
এই distinction code-এ না রাখলে developer সাধারণত Saṅkrānti calculation-এর ভিতরেই date assignment বসিয়ে দেন। পরে Bangla Academy, Bagchi বা অন্য regional rule যোগ করতে গেলে পুরো astronomy engine বদলাতে হয়।
Civil Day এবং Panchanga Day
| দিনের ধরন | শুরু | শেষ | ব্যবহার |
|---|---|---|---|
| Civil day | স্থানীয় 00:00 | পরবর্তী 00:00 | Gregorian/Julian date, weekday ও clock label |
| Panchanga sunrise-day | স্থানীয় সূর্যোদয় | পরবর্তী সূর্যোদয় | দৈনিক তিথি, উৎসব ও sunrise-based assignment |
ধরা যাক Saṅkrānti রাত 1:00 AM-এ। Civil date বদলে গেছে, কিন্তু আগের sunrise-এ শুরু হওয়া Panchanga day তখনও শেষ হয়নি। শুধু sankrantiLocal.Date দেখলে rule-এর anchor ভুল হবে। Saṅkrānti-র আগে সর্বশেষ sunrise খুঁজে সেই sunrise-day-কে anchor করতে হবে।
Month-start সিদ্ধান্তের প্রয়োজনীয় Input
- Exact Saṅkrānti instant: unrounded Julian Day/UTC;
- Target solar ingress: মেষ, বৃষ… মীন;
- Location: latitude, longitude এবং elevation policy;
- Timezone: historical/DST-aware ID;
- Previous ও next sunrise: event-এর local sunrise interval;
- Midnight boundary: anchor sunrise-এর পরের স্থানীয় 00:00;
- Sunrise tithi ও exact end: special window-এর জন্য;
- Rule-set ID/version: যেমন
BagchiTraditionalFit-v1; - Calibration ID: classical বা
PrintedPanjikaModernFit-v1; - Display policy: modern Gregorian বা historical Julian/Gregorian dual date।
Rule service নিজে Saṅkrānti পুনর্গণনা করবে না। এটি verified event এবং day-boundary data গ্রহণ করবে। এতে astronomy ও calendar policy আলাদাভাবে পরীক্ষা করা যায়।
Anchor Sunrise-day কীভাবে নির্ধারণ করবেন?
Saṅkrānti instant S-এর জন্য এমন দুটি sunrise খুঁজুন:
Sunrise0 ≤ S < Sunrise1
Sunrise0 যে civil date-এ পড়ে সেটিই anchor civil date। এরপর:
Midnight = AnchorDate + 1 day at 00:00 local
NextDate = AnchorDate + 1 civil day
ThirdDate = AnchorDate + 2 civil days
উদাহরণ: anchor sunrise 14 April 05:20, Saṅkrānti 15 April 00:16 এবং next sunrise 15 April 05:19। AnchorDate এখনো 14 April। তাই NextDate = 15 April; ThirdDate = 16 April।
PM Bagchi-aligned Traditional Fit Specification
এই project-এর ঘোষিত research rule-set:
| Condition | Applied first day | Rule code |
|---|---|---|
| Anchor sunrise থেকে midnight-এর আগে Saṅkrānti | NextDate | BEFORE_MIDNIGHT_NEXT_DAY |
| Midnight থেকে next sunrise-এর আগে Saṅkrānti | ThirdDate | AFTER_MIDNIGHT_THIRD_DAY |
| Midnight-এর ±২৪ মিনিটে; sunrise-tithi Saṅkrānti পর্যন্ত থাকে | NextDate | WINDOW_TITHI_SURVIVES |
| Midnight-এর ±২৪ মিনিটে; sunrise-tithi আগে শেষ | ThirdDate | WINDOW_TITHI_ENDED |
| কর্কট সংক্রান্তি exception | NextDate | KARKATA_EXCEPTION |
| মকর সংক্রান্তি exception | ThirdDate | MAKARA_EXCEPTION |
এটি এই সফটওয়্যারের declared Traditional Fit—সমস্ত বাংলা পঞ্জিকা, সমস্ত অঞ্চল বা বাংলা একাডেমির fixed civil calendar-এর universal rule নয়। Public page-এ rule-set-এর নাম দেখালে ব্যবহারকারী ভিন্ন output-এর কারণ বুঝতে পারবেন।
Rule Precedence: কোন নিয়ম আগে চলবে?
একটি event special month এবং midnight-window—দুই condition-এই পড়তে পারে। Priority না লিখলে code path পরিবর্তনের সঙ্গে output বদলে যাবে। Recommended precedence:
- Input validation: event sunrise interval-এর ভিতরে কি না;
- Month exception: কর্কট বা মকর;
- ±২৪ মিনিট window: তিথি-end comparison;
- Generic before-midnight branch;
- Generic at/after-midnight branch;
- Audit trace এবং display conversion।
Precedence-টিও rule-set version-এর অংশ। নতুন printed evidence-এ অন্য precedence প্রমাণিত হলে নতুন version তৈরি করুন; পুরোনো export silently পরিবর্তন করবেন না।
মধ্যরাত্রির ±২৪ মিনিটের তিথি পরীক্ষা
WindowStart = Midnight − ২৪ মিনিট
WindowEnd = Midnight + ২৪ মিনিট
Saṅkrānti inclusiveভাবে এই interval-এর ভিতরে হলে anchor sunrise-এ চলমান তিথির exact end-time পরীক্ষা করুন:
যদি TithiEnd ≥ Saṅkrānti, তবে NextDate
যদি TithiEnd < Saṅkrānti, তবে ThirdDate
“তিথি আছে” বলতে sunrise label নয়; exact continuous tithi interval বোঝায়। Display text থেকে সময় parse করবেন না। SunriseTithiEndLocal calculation result থেকে নিতে হবে।
কর্কট ও মকর Exception
- কর্কট সংক্রান্তি: NextDate;
- মকর সংক্রান্তি: ThirdDate।
Code-এ Bengali month label-এর বদলে stable solar-ingress enum ব্যবহার করুন। মেষ সংক্রান্তি বৈশাখ শুরু করলেও sign index এবং Bengali month index-এর naming এক নয়। Localized string বদলালেও enum অপরিবর্তিত থাকে:
public enum SolarIngress
{
Mesha = 0, Vrishabha = 1, Mithuna = 2, Karkata = 3,
Simha = 4, Kanya = 5, Tula = 6, Vrischika = 7,
Dhanu = 8, Makara = 9, Kumbha = 10, Mina = 11
}
পাঁচটি Worked Example
সব উদাহরণে anchor sunrise 14 April 05:20, next sunrise 15 April 05:19 এবং midnight 15 April 00:00।
| Case | Saṅkrānti | অতিরিক্ত তথ্য | Result |
|---|---|---|---|
| A: সাধারণ before midnight | 14 Apr 20:10 | Window-এর বাইরে | 15 Apr, NextDate |
| B: সাধারণ after midnight | 15 Apr 01:05 | Window-এর বাইরে | 16 Apr, ThirdDate |
| C: window; তিথি থাকে | 14 Apr 23:50 | Tithi ends 15 Apr 00:08 | 15 Apr, NextDate |
| D: window; তিথি আগে শেষ | 15 Apr 00:12 | Tithi ended 14 Apr 23:58 | 16 Apr, ThirdDate |
| E: Karkata override | 15 Apr 01:05 | Generic result ThirdDate | 15 Apr, NextDate |
Makara হলে time before midnight হলেও declared exception অনুযায়ী ThirdDate হবে। Trace-এ generic এবং override উভয় সিদ্ধান্ত সংরক্ষণ করা যায়:
Generic result: NextDate (before midnight)
Override: MakaraException
Final result: ThirdDate
স্থান, Timezone ও DST-এর প্রভাব
Geocentric Saṅkrānti instant একই হলেও location-based assignment আলাদা হতে পারে:
- UTC instant ভিন্ন local civil date/time-এ পড়ে;
- প্রতিটি স্থানের sunrise আলাদা;
- anchor sunrise-day এবং midnight boundary আলাদা;
- New York-এর DST offset season অনুযায়ী −04:00 বা −05:00;
- historical timezone offset আধুনিক standard offset-এর মতো নাও হতে পারে।
কলকাতার month-start Dhaka বা New York-এর জন্য copy করা যাবে না। Saṅkrānti UTC reuse করা গেলেও local conversion, sunrise lookup, anchor-tithi এবং decision service প্রতিটি location-এর জন্য চালাতে হবে। Saṅkrānti প্রথমে UTC/Julian Day হিসেবে রাখুন; local clock text থেকে উল্টো UTC বানাবেন না।
Historical Julian/Gregorian Date-এ Rule
১৫৮২ বা ১৭৫২ সালের calendar reform display-এ কিছু civil date বাদ পড়ে, কিন্তু astronomical time continuous। নিরাপদ architecture:
- Julian Day-এ Saṅkrānti ও sunrise events রাখুন;
- continuous day scale-এ interval/order compare করুন;
- anchor-কে internal day number হিসেবে রাখুন;
- month-start decision সম্পন্ন করুন;
- শেষ ধাপে Julian/Gregorian dual label তৈরি করুন।
Historical display date-এ সরাসরি DateTime.AddDays করে reform gap অনুকরণ করলে ভুল sequence আসতে পারে। Internal continuous day এবং displayed civil label পৃথক রাখলে 4 October → 15 October-এর মতো historical reform-ও পরিষ্কারভাবে দেখানো যায়।
Recommended Software Architecture
| Component | দায়িত্ব | যা করবে না |
|---|---|---|
ISankrantiCalculator | Exact solar ingress instant | Month-start assign নয় |
ILocalDayBoundaryService | Timezone, sunrise ও midnight | Ayanāṃśa নির্বাচন নয় |
ITithiIntervalService | Anchor sunrise-এর tithi/end | Final date নয় |
IBengaliMonthStartRule | Versioned decision policy | Planet longitude mutate নয় |
IHistoricalCalendarDisplay | Julian/Gregorian labels | Internal ordering নয় |
ISankrantiCalibration | Scope-limited ModernFit | Tithi/nakṣatra/planets পরিবর্তন নয় |
এই separation একই Saṅkrānti-তে Bagchi Traditional Fit, Bangla Academy civil calendar এবং research alternative পাশাপাশি চালাতে দেয়।
C# Decision Service
public enum MonthStartRuleCode
{
BeforeMidnightNextDay,
AfterMidnightThirdDay,
WindowTithiSurvives,
WindowTithiEnded,
KarkataException,
MakaraException
}
public sealed class MonthStartContext
{
public SolarIngress Ingress { get; set; }
public DateTime SankrantiLocal { get; set; }
public DateTime PreviousSunriseLocal { get; set; }
public DateTime NextSunriseLocal { get; set; }
public DateTime? SunriseTithiEndLocal { get; set; }
public string TimeZoneId { get; set; }
public string AstronomyModelId { get; set; }
public string CalibrationId { get; set; }
}
public sealed class MonthStartDecision
{
public DateTime AppliedCivilDate { get; set; }
public MonthStartRuleCode RuleCode { get; set; }
public DateTime AnchorCivilDate { get; set; }
public DateTime MidnightBoundaryLocal { get; set; }
public string Trace { get; set; }
}
Rule implementation
public sealed class BagchiTraditionalFitRule
{
public MonthStartDecision Decide(MonthStartContext c)
{
if (c == null) throw new ArgumentNullException("c");
if (!(c.PreviousSunriseLocal <= c.SankrantiLocal &&
c.SankrantiLocal < c.NextSunriseLocal))
throw new ArgumentException(
"Sankranti must be inside the supplied sunrise interval.");
DateTime anchorDate = c.PreviousSunriseLocal.Date;
DateTime midnight = anchorDate.AddDays(1);
DateTime nextDate = anchorDate.AddDays(1);
DateTime thirdDate = anchorDate.AddDays(2);
if (c.Ingress == SolarIngress.Karkata)
return Build(c, anchorDate, midnight, nextDate,
MonthStartRuleCode.KarkataException,
"Karkata override: NextDate");
if (c.Ingress == SolarIngress.Makara)
return Build(c, anchorDate, midnight, thirdDate,
MonthStartRuleCode.MakaraException,
"Makara override: ThirdDate");
double minutes = Math.Abs(
(c.SankrantiLocal - midnight).TotalMinutes);
if (minutes <= 24.0)
{
if (!c.SunriseTithiEndLocal.HasValue)
throw new InvalidOperationException(
"Sunrise-tithi end is required inside the window.");
if (c.SunriseTithiEndLocal.Value >= c.SankrantiLocal)
return Build(c, anchorDate, midnight, nextDate,
MonthStartRuleCode.WindowTithiSurvives,
"Window; sunrise-tithi survives Sankranti");
return Build(c, anchorDate, midnight, thirdDate,
MonthStartRuleCode.WindowTithiEnded,
"Window; sunrise-tithi ended before Sankranti");
}
if (c.SankrantiLocal < midnight)
return Build(c, anchorDate, midnight, nextDate,
MonthStartRuleCode.BeforeMidnightNextDay,
"Before midnight: NextDate");
return Build(c, anchorDate, midnight, thirdDate,
MonthStartRuleCode.AfterMidnightThirdDay,
"At/after midnight: ThirdDate");
}
static MonthStartDecision Build(
MonthStartContext c, DateTime anchor, DateTime midnight,
DateTime applied, MonthStartRuleCode rule, string reason)
{
return new MonthStartDecision
{
AnchorCivilDate = anchor,
MidnightBoundaryLocal = midnight,
AppliedCivilDate = applied,
RuleCode = rule,
Trace = reason +
"; model=" + c.AstronomyModelId +
"; calibration=" + c.CalibrationId +
"; zone=" + c.TimeZoneId
};
}
}
DateTime.Kind মিশিয়ে comparison করবেন না। ভালো নকশায় local boundaries-এর সঙ্গে corresponding UTC instant বা DateTimeOffset রাখুন। উপরের compact code existing desktop model-এর reference; DST-aware production implementation-এ boundary service validated instants সরবরাহ করবে।
মানুষ-পাঠ্য Applied-rule Trace
সংক্রান্তি: 15 Apr 2027, 12:12:00 AM Asia/Kolkata
Anchor sunrise: 14 Apr 2027, 05:20:11 AM
Next sunrise: 15 Apr 2027, 05:19:28 AM
Midnight: 15 Apr 2027, 12:00:00 AM
Distance from midnight: +12 minutes
Sunrise-tithi end: 14 Apr 2027, 11:58:00 PM
Rule: WINDOW_TITHI_ENDED
Applied first day: 16 Apr 2027
Astronomy: SuryaSiddhantaTraditional-v...
Calibration: PrintedPanjikaModernFit-v1
Public page-এ সংক্ষিপ্ত Bengali explanation এবং research page-এ full trace দিন। XML/API-তে ruleSet, ruleCode, anchor sunrise, midnight, tithi-end, model ও calibration আলাদা fields রাখুন।
Minimum Test Matrix
| Test | Input | Expected |
|---|---|---|
| Ordinary afternoon | 14:00 | NextDate |
| Late evening outside window | 23:20 | NextDate |
| Window lower edge | 23:36 exactly | Tithi branch |
| Window upper edge | 00:24 exactly | Tithi branch |
| Just outside edges | ±২৪ মিনিটের ১ ms বাইরে | Generic branch |
| Tithi ends at event | End == Saṅkrānti | Survives → NextDate |
| Missing tithi in window | null | Explicit exception |
| Karkata after midnight | 01:00 | NextDate override |
| Makara before midnight | 20:00 | ThirdDate override |
| Invalid interval | event outside sunrises | Input exception |
| 1946/1947 boundary | adjacent years | Calibration off/on |
| Correction leakage | ModernFit toggled | Tithi/nakṣatra/planets unchanged |
| Location | Kolkata/Dhaka/New York | Independent local results |
| Historical reform | 1582/1752 | Continuous order; dual labels |
Decision unrounded instant-এ চালিয়ে পরে display round করুন। Exactly-at-boundary convention—যেমন TithiEnd == Sankranti-কে “তিথি থাকে” ধরা—specification-এ লিখে test করুন।
সাধারণ Implementation ভুল
Event-এর civil date-কে anchor করা
Midnight-এর পরে Saṅkrānti হলে preceding sunrise আগের civil date-এ। Event date anchor করলে third-day result এক দিন বেশি হতে পারে।
Formatted time string compare করা
Bengali clock text parse না করে instant compare করুন। Locale এবং 12/24-hour formatting error এড়ানো যাবে।
Window-তে tithi না দেখে generic branch চালানো
এতে special rule নিষ্ক্রিয় হয়ে যায়। Window-তে tithi-end mandatory input করুন।
ModernFit দিয়ে final date সরাসরি ±১ করা
Correction থেকে নতুন Saṅkrānti instant solve করুন, তারপর একই rule engine চালান। Final date manually সরালে audit trail ভেঙে যায়।
Bangla Academy ও Traditional Fit মেশানো
Bangla Academy civil calendar এবং traditional astronomical month-start আলাদা method। UI-তে method name স্পষ্ট রাখুন।
Publication Checklist
- Rule unrounded Saṅkrānti-তে চালানো হয়েছে?
- Location ও timezone প্রকাশিত?
- Previous/next sunrise একই definition-এ গণিত?
- Anchor previous sunrise থেকে নির্ধারিত?
- ±২৪ মিনিট inclusive policy লিখিত?
- Tithi-end equality convention test করা?
- Karkata/Makara precedence versioned?
- Traditional Fit ও Bangla Academy আলাদা label?
- ModernFit 1947 cutoff ও scope প্রকাশিত?
- Historical internal day ও display calendar পৃথক?
- HTML/XML/API-তে rule code ও model IDs আছে?
- Batch export-এ একই rule version frozen?
উপসংহার
সংক্রান্তি থেকে বাংলা মাসের প্রথম দিন নির্ধারণ একটি দুই-স্তরের কাজ: প্রথমে precise astronomy, তারপর explicit calendar policy। এই project-এর PM Bagchi-aligned Traditional Fit-এ sunrise-day anchor, midnight split, ±২৪ মিনিটের তিথি পরীক্ষা এবং কর্কট-মকর exception—সবগুলোকে versioned decision tree হিসেবে দেখতে হবে।
সবচেয়ে গুরুত্বপূর্ণ implementation সিদ্ধান্ত হলো preceding sunrise থেকে anchor date নির্ধারণ। Astronomy model, ModernFit calibration, local boundaries, month-start rule এবং historical display আলাদা services হলে ফল printed Panjika-ঘনিষ্ঠ, testable ও গবেষণাযোগ্য থাকে।
এই প্রবন্ধের মাধ্যমে অয়নাংশ–সংক্রান্তি–বাংলা মাসারম্ভ ধারাটি সম্পূর্ণ হলো। পরবর্তী প্রবন্ধ থেকে আমরা সূর্যসিদ্ধান্তের মূল পাঠে ফিরব: শ্লোক বা বর্ণনামূলক নিয়মকে কীভাবে quantity, unit, algebraic formula, numerical algorithm এবং C# code-এ রূপান্তর করা হয়।
প্রাথমিক পাঠ ও তথ্যসূত্র
- সূর্য সিদ্ধান্ত পঞ্জিকা গবেষণা প্রকল্প—PM Bagchi comparison notes, sunrise–midnight observations, ±২৪ মিনিট tithi rule এবং Karkata/Makara exception specification।
- সূর্য সিদ্ধান্ত পঞ্জিকা গবেষণা প্রকল্প—
PrintedPanjikaModernFit-v1month-wise Saṅkrānti correction এবং Gregorian 1947 cutoff policy। - Swiss Ephemeris Programmer's Documentation; Julian Day, longitude, rise/set এবং event-time interfaces।
- Swiss Ephemeris General Documentation; sidereal calculation, ayanāṃśa ও historical conventions।
- Ebenezer Burgess, Translation of the Sûrya-Siddhânta: A Text-book of Hindu Astronomy, 1860; traditional solar motion, time units ও rāśi framework।
- Report of the Calendar Reform Committee, Government of India, 1955; Indian calendar reform ও sidereal-reference context।
পাঠকের কণ্ঠ
প্রশ্ন ও আলোচনা 0
যেকোনো মন্তব্য বা উত্তরে আবার উত্তর দিন। প্রতিটি উত্তর তার মূল আলোচনার সঙ্গে থাকবে।
আলোচনাটি আপনিই শুরু করুন
এই প্রবন্ধ নিয়ে আপনার প্রশ্ন বা মতামত লিখুন।
আলোচনায় যোগ দিন
আপনার প্রশ্ন বা মতামত