PHP code example of vittix / panchang
1. Go to this page and download the library: Download vittix/panchang library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vittix / panchang example snippets
declare(strict_types=1);
use DateTimeImmutable;
use DateTimeZone;
use Vittix\Panchang\Panchang;
use Vittix\Panchang\ValueObject\GeoLocation;
$panchang = Panchang::createDefault();
$date = new DateTimeImmutable('2026-08-04', new DateTimeZone('Asia/Kolkata'));
$location = new GeoLocation(latitude: 28.6139, longitude: 77.2090);
$day = $panchang->day($date, $location);
echo $day->tithiAtSunrise->nameEnglish();