Skip to content

About

High-precision Vedic Panchang engine for PHP/Laravel with JPL Ephemeris, festivals, muhurta, eclipses, and raw JSON export.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

199 Commits

Folders and files

Repository files navigation

Panchang Core

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.

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.

About

High-precision Vedic Panchang engine for PHP/Laravel with JPL Ephemeris, festivals, muhurta, eclipses, and raw JSON export.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages