Search by

jayeshmepani / panchang-core

jayeshmepani

Authentic Vedic Panchanga calculation engine powered by the JPL Moshier Ephemeris FFI wrapper

11.6.0 2026-10-21 10:58 UTC

README

Latest Version on Packagist Total Downloads PHP Version Require License: MIT

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.

Current catalogue coverage

The current observance identity catalogue defines 354 festival identities and 126 vrat identities. These are year-independent catalogue totals, not the number of dated observances emitted for a particular year or calendar system.

The package also exposes a separate 96-category Ṣaṇṇavatī Śrāddha taxonomy. Those nominal ritual categories are not added to the festival or vrat totals.

Inventory Current count Meaning
Festival identities 354 Unique catalogue identities after the documented identity and weekday-expansion rules
Vrat identities 126 Unique fasting/vrat identities after the documented identity and weekday-expansion rules
Ṣaṇṇavatī Śrāddha categories 96 Separate nominal ritual-membership taxonomy

See Festival and Vrat Identities for the canonical identity lists and counting rules, and Package Coverage for the full calculation surface.

Install

composer require jayeshmepani/panchang-core

Requirements:

  • PHP 8.3+
  • PHP FFI extension enabled
  • jayeshmepani/jpl-moshier-ephemeris-php 2.0.0 or later in the 2.x series
  • nesbot/carbon

Enable FFI in php.ini:

extension=ffi
ffi.enable=1

Quick Usage

<?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'];

Documentation

Full documentation, including output semantics, configuration, Bārhaspatya Saṃvatsara models, Ṣaṇṇavati Śrāddha, CLI exporters, and release notes: docs/index.html

License

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.

Credits

Built by Jayesh Mepani (Jayesh Patel). Astronomy runs on JPL Moshier Ephemeris (JME); full third-party credits: JME THIRD_PARTY_NOTICES.md.