1. Go to this page and download the library: Download zachweix/php-zmanim 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/ */
zachweix / php-zmanim example snippets
use PhpZmanim\Zman;
use PhpZmanim\JewishDate;
// Zmanim for a date and location
$zman = Zman::create(2019, 2, 22, 40.0721087, -74.2400243, 39.57, 'America/New_York');
$zman->getSunrise()->format('Y-m-d\TH:i:sP'); // 2019-02-22T06:39:45-05:00
$zman->getTzais72Minutes()->format('Y-m-d\TH:i:sP'); // 2019-02-22T18:52:39-05:00
// The Jewish calendar
$jewishDate = JewishDate::createFromDate(2023, 9, 30); // from a Gregorian date
$jewishDate = JewishDate::create(5784, 7, 15); // or from a Jewish date
$jewishDate->isSuccos(); // true
$jewishDate->isRoshHashana(); // false
// Formatting, in English or Hebrew
$jewishDate->format()->english()->yomTov(); // Succos
$jewishDate->format()->hebrew()->date(); // ט״ו תשרי תשפ״ד
use PhpZmanim\Calculator\MeeusCalculator;
$zman = Zman::create(2019, 2, 22, 40.0721087, -74.2400243, 39.57, 'America/New_York', MeeusCalculator::create());
// or on an existing object:
$zman->setAstronomicalCalculator(MeeusCalculator::create());
$jewishDate = JewishDate::createFromDate(2023, 9, 30); // Gregorian year, month, day
$jewishDate = JewishDate::create(5784, 7, 15); // Jewish year, month, day
$jewishDate->isSuccos(); // true
$jewishDate->getJewishYear(); // 5784
$jewishDate->getDafYomiBavli(); // a Daf value object