Panchang Core: A High-Precision Vedic Calendar Engine for PHP and Laravel
Building a proper Panchang system is not just about calculating dates.
It is about handling tradition, astronomy, regional variations, festival logic, and time-based rules with accuracy.
That is why I built panchang-core — a PHP package for Vedic Panchanga calculations, powered by Swiss Ephemeris precision, and designed for both PHP and Laravel applications.
What is Panchang?
A Panchang is the traditional Vedic calendar framework built around five main limbs:
- Tithi
- Vara
- Nakshatra
- Yoga
- Karana
These are used in Hindu calendrical and astrological systems for daily timekeeping, festivals, and auspicious timing.
Why this package exists
Most calendar libraries stop at basic date output.
But real Panchang systems need much more:
- Accurate astronomical data
- Traditional rule handling
- Regional calendar variations
- Festival resolution logic
- Muhurta calculations
- Multiple samvat systems
- Eclipse data
- Human-readable and machine-readable output
This package was built to cover that broader domain.
What Panchang Core provides
Panchang Core supports:
- Full Panchanga calculations
- Tithi, Vara, Nakshatra, Yoga, and Karana
- 30 named Muhurtas
- Choghadiya, Hora, and Prahara
- Rahu Kala, Gulika, and Yamaganda
- Abhijit Muhurta and Brahma Muhurta
- Festival calculations with regional rules
- Eclipse lookup by year and location
- Sunrise, sunset, moonrise, and moonset-related data
- Multiple samvat systems
- Raw JSON export for programmatic use
A package built on astronomy, not guesswork
One of the biggest strengths of Panchang Core is that it is built on precise astronomical calculation rather than fixed tables alone.
That matters because Panchang values can vary depending on:
- Location
- Time zone
- Ayanamsa
- Calendar tradition
- Regional observance rules
A serious Panchang engine has to account for those differences.
Traditional accuracy matters
Panchang is not just a computational problem. It is also a cultural and traditional one.
This package is designed to support:
- Smarta and Vaishnava distinctions
- North and South Indian month systems
- Regional festival rules
- Classical time divisions
- Different observance traditions
That makes it more useful for real-world calendrical applications.
Example usage
$details = $panchang->getDayDetails(
date: CarbonImmutable::parse('2026-03-24'),
lat: 23.2472446,
lon: 69.668339,
tz: 'Asia/Kolkata'
);
echo $details['Tithi']['name'];
echo $details['Nakshatra']['name'];
This kind of output is useful for:
- Web apps
- API endpoints
- Mobile apps
- Festival calendars
- Astrology dashboards
- Panchang viewers
Festival support
One of the most interesting parts of Panchang Core is the festival engine.
The package includes support for a large set of Hindu festivals and regional variants, so the output is not limited to a single calendar style.
That is important because festival dates often depend on the exact tradition and the exact observance logic.
Muhurta and time divisions
Panchang Core also includes classical time divisions such as:
- Muhurta
- Choghadiya
- Hora
- Prahara
- Rahu Kala
- Gulika
- Yamaganda
These are useful for auspicious timing calculations and for applications that present daily religious or astrological information.
Laravel integration
The package is also built with Laravel use cases in mind.
That means you can integrate Panchang Core into a framework-based application and expose the calculations through controllers, services, or APIs.
Getting started
composer require jayeshmepani/panchang-core
Why this package is useful
Panchang Core is a practical solution for developers building:
- Hindu calendar applications
- Festival lookup systems
- Muhurta calculators
- Astrology platforms
- API-backed Panchang services
- Regional observance tools
Closing thoughts
Panchang calculation is one of those areas where accuracy, tradition, and usability all matter at the same time.
I built Panchang Core to provide a structured, extensible, and culturally aware way to bring Panchang data into PHP and Laravel projects.
If you are building software for Vedic calendar use cases, this package is meant to be the foundation.
Top comments (0)