সংক্রান্তি থেকে বাংলা মাসারম্ভ: সূর্যোদয়, মধ্যরাত্রি ও Traditional Fit rule-এর ধাপে ধাপে প্রয়োগ

Exact সংক্রান্তির মুহূর্ত থেকে PM Bagchi-aligned Traditional Fit-এ বাংলা মাসের প্রথম দিন নির্ধারণ: sunrise-day, midnight, ±২৪ মিনিটের তিথি পরীক্ষা, কর্কট-মকর exception ও C# implementation।

সূর্য ৩০°-এর রাশি-সীমা কখন অতিক্রম করেছে—এটি 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:00Gregorian/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

  1. Exact Saṅkrānti instant: unrounded Julian Day/UTC;
  2. Target solar ingress: মেষ, বৃষ… মীন;
  3. Location: latitude, longitude এবং elevation policy;
  4. Timezone: historical/DST-aware ID;
  5. Previous ও next sunrise: event-এর local sunrise interval;
  6. Midnight boundary: anchor sunrise-এর পরের স্থানীয় 00:00;
  7. Sunrise tithi ও exact end: special window-এর জন্য;
  8. Rule-set ID/version: যেমন BagchiTraditionalFit-v1;
  9. Calibration ID: classical বা PrintedPanjikaModernFit-v1;
  10. 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:

ConditionApplied first dayRule code
Anchor sunrise থেকে midnight-এর আগে SaṅkrāntiNextDateBEFORE_MIDNIGHT_NEXT_DAY
Midnight থেকে next sunrise-এর আগে SaṅkrāntiThirdDateAFTER_MIDNIGHT_THIRD_DAY
Midnight-এর ±২৪ মিনিটে; sunrise-tithi Saṅkrānti পর্যন্ত থাকেNextDateWINDOW_TITHI_SURVIVES
Midnight-এর ±২৪ মিনিটে; sunrise-tithi আগে শেষThirdDateWINDOW_TITHI_ENDED
কর্কট সংক্রান্তি exceptionNextDateKARKATA_EXCEPTION
মকর সংক্রান্তি exceptionThirdDateMAKARA_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:

  1. Input validation: event sunrise interval-এর ভিতরে কি না;
  2. Month exception: কর্কট বা মকর;
  3. ±২৪ মিনিট window: তিথি-end comparison;
  4. Generic before-midnight branch;
  5. Generic at/after-midnight branch;
  6. 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।

CaseSaṅkrāntiঅতিরিক্ত তথ্যResult
A: সাধারণ before midnight14 Apr 20:10Window-এর বাইরে15 Apr, NextDate
B: সাধারণ after midnight15 Apr 01:05Window-এর বাইরে16 Apr, ThirdDate
C: window; তিথি থাকে14 Apr 23:50Tithi ends 15 Apr 00:0815 Apr, NextDate
D: window; তিথি আগে শেষ15 Apr 00:12Tithi ended 14 Apr 23:5816 Apr, ThirdDate
E: Karkata override15 Apr 01:05Generic result ThirdDate15 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:

  1. Julian Day-এ Saṅkrānti ও sunrise events রাখুন;
  2. continuous day scale-এ interval/order compare করুন;
  3. anchor-কে internal day number হিসেবে রাখুন;
  4. month-start decision সম্পন্ন করুন;
  5. শেষ ধাপে 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দায়িত্বযা করবে না
ISankrantiCalculatorExact solar ingress instantMonth-start assign নয়
ILocalDayBoundaryServiceTimezone, sunrise ও midnightAyanāṃśa নির্বাচন নয়
ITithiIntervalServiceAnchor sunrise-এর tithi/endFinal date নয়
IBengaliMonthStartRuleVersioned decision policyPlanet longitude mutate নয়
IHistoricalCalendarDisplayJulian/Gregorian labelsInternal ordering নয়
ISankrantiCalibrationScope-limited ModernFitTithi/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

TestInputExpected
Ordinary afternoon14:00NextDate
Late evening outside window23:20NextDate
Window lower edge23:36 exactlyTithi branch
Window upper edge00:24 exactlyTithi branch
Just outside edges±২৪ মিনিটের ১ ms বাইরেGeneric branch
Tithi ends at eventEnd == SaṅkrāntiSurvives → NextDate
Missing tithi in windownullExplicit exception
Karkata after midnight01:00NextDate override
Makara before midnight20:00ThirdDate override
Invalid intervalevent outside sunrisesInput exception
1946/1947 boundaryadjacent yearsCalibration off/on
Correction leakageModernFit toggledTithi/nakṣatra/planets unchanged
LocationKolkata/Dhaka/New YorkIndependent local results
Historical reform1582/1752Continuous 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

  1. Rule unrounded Saṅkrānti-তে চালানো হয়েছে?
  2. Location ও timezone প্রকাশিত?
  3. Previous/next sunrise একই definition-এ গণিত?
  4. Anchor previous sunrise থেকে নির্ধারিত?
  5. ±২৪ মিনিট inclusive policy লিখিত?
  6. Tithi-end equality convention test করা?
  7. Karkata/Makara precedence versioned?
  8. Traditional Fit ও Bangla Academy আলাদা label?
  9. ModernFit 1947 cutoff ও scope প্রকাশিত?
  10. Historical internal day ও display calendar পৃথক?
  11. HTML/XML/API-তে rule code ও model IDs আছে?
  12. 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-এ রূপান্তর করা হয়।

প্রাথমিক পাঠ ও তথ্যসূত্র

  1. সূর্য সিদ্ধান্ত পঞ্জিকা গবেষণা প্রকল্প—PM Bagchi comparison notes, sunrise–midnight observations, ±২৪ মিনিট tithi rule এবং Karkata/Makara exception specification।
  2. সূর্য সিদ্ধান্ত পঞ্জিকা গবেষণা প্রকল্প—PrintedPanjikaModernFit-v1 month-wise Saṅkrānti correction এবং Gregorian 1947 cutoff policy।
  3. Swiss Ephemeris Programmer's Documentation; Julian Day, longitude, rise/set এবং event-time interfaces।
  4. Swiss Ephemeris General Documentation; sidereal calculation, ayanāṃśa ও historical conventions।
  5. Ebenezer Burgess, Translation of the Sûrya-Siddhânta: A Text-book of Hindu Astronomy, 1860; traditional solar motion, time units ও rāśi framework।
  6. Report of the Calendar Reform Committee, Government of India, 1955; Indian calendar reform ও sidereal-reference context।

পাঠকের কণ্ঠ

প্রশ্ন ও আলোচনা 0

যেকোনো মন্তব্য বা উত্তরে আবার উত্তর দিন। প্রতিটি উত্তর তার মূল আলোচনার সঙ্গে থাকবে।

আলোচনাটি আপনিই শুরু করুন

এই প্রবন্ধ নিয়ে আপনার প্রশ্ন বা মতামত লিখুন।

আলোচনায় যোগ দিন

আপনার প্রশ্ন বা মতামত

সম্পাদকের অনুমোদনের পর আপনার মন্তব্য প্রকাশিত হবে।