Constants::$NEPALI_DATE_MAP
Historical calendar mapping table storing verified day counts for every Bikram Sambat month between 1976 and 2100 BS.
The Constants::$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
use NepaliDateLibrary\Helper\Constants;Structure
class Constants
{
/**
* @var array<int, array{year:int, days:int[], totalDays:int, daysTillNow:int}>
*/
public static $NEPALI_DATE_MAP;
}Field Reference
| Field | Type | Description |
|---|---|---|
year | int | The Bikram Sambat year integer between 1976 and 2100 BS. |
days | int[] | Twelve integers specifying the exact day counts for each month from Baisakh to Chaitra. |
totalDays | int | Total cumulative days in that specific calendar year. |
daysTillNow | int | Cumulative day offset since the calendar epoch. |
Example Usage
use NepaliDateLibrary\Helper\Constants;
// Retrieve month day counts for year 2081 BS
$year2081 = null;
foreach (Constants::$NEPALI_DATE_MAP as $entry) {
if ($entry['year'] === 2081) {
$year2081 = $entry;
break;
}
}
echo "Days in Baisakh 2081: " . $year2081['days'][0]; // 31Related
date->daysInMonth(): Query total days in a given month.NepaliDate::isValid(): Statically validate calendar coordinates.
BStoAD()
Pure helper function to convert Bikram Sambat date strings into Gregorian calendar date strings.
Constants::$NUMBER_NP
Array containing Devanagari numeral glyphs for digits zero through nine used for Nepali number localization.