High-precision Hindu Panchang calculation engine for PHP 8.3+, powered by the JPL Moshier Ephemeris FFI wrapper.
It calculates Panchanga limbs, festivals, Muhurta windows, Karmakala timings, Chogadiya, Hora, Lagna tables, direction/Vaasa checks, eclipse visibility, and localized JSON outputs.
composer require jayeshmepani/panchang-coreRequirements:
- PHP 8.3+
- PHP FFI extension enabled
jayeshmepani/jpl-moshier-ephemeris-php2.0.0 or later in the 2.x seriesnesbot/carbon
Enable FFI in php.ini:
extension=ffi
ffi.enable=1<?php
require 'vendor/autoload.php';
use Carbon\CarbonImmutable;
use JayeshMepani\PanchangCore\Traits\CliBootstrap;
CliBootstrap::init(__DIR__);
$panchang = CliBootstrap::makePanchangService();
$details = $panchang->getDayDetails(
date: CarbonImmutable::parse('2026-05-29'),
lat: 23.2472446,
lon: 69.668339,
tz: 'Asia/Kolkata'
);
echo $details['Current_Tithi_At_Input_Now']['name'] . PHP_EOL;
echo $details['Tithi_At_Sunrise']['name'] . PHP_EOL;
echo $details['Current_Karana_At_Input_Now']['name'] . PHP_EOL;
echo $details['Nakshatra']['name'] . PHP_EOL;Laravel facade usage:
use Carbon\CarbonImmutable;
use JayeshMepani\PanchangCore\Facades\Panchang;
$details = Panchang::getDayDetails(
date: CarbonImmutable::parse('2026-05-29'),
lat: 23.2472446,
lon: 69.668339,
tz: 'Asia/Kolkata'
);
$festivals = $details['Festivals'];Full documentation, including output semantics, configuration, Bārhaspatya Saṃvatsara models, Ṣaṇṇavati Śrāddha, CLI exporters, and release notes: docs/index.html
- Coverage matrix: PACKAGE_COVERAGE.md
- Traditional source attribution: docs/TRADITIONAL_TEXT_SOURCES.md
- Muhurta text source classification: docs/MUHURTA_TEXT_SOURCES.md
- Festival and vrat identity catalog: docs/FESTIVAL_VRAT_IDENTITIES.md
MIT. See LICENSE.
The dependency jpl-moshier-ephemeris-php ships native runtime binaries under MIT AND CeCILL-B (CALCEPH); if you redistribute those binaries, keep that package's LICENSE, LICENSES/ and THIRD_PARTY_NOTICES.md.
Built by Jayesh Mepani (Jayesh Patel). Astronomy runs on JPL Moshier Ephemeris (JME); full third-party credits: JME THIRD_PARTY_NOTICES.md.