PHPackages                             zachweix/php-zmanim - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zachweix/php-zmanim

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zachweix/php-zmanim
===================

Port of KosherJava to PHP

v3.0.1(9mo ago)1810.2k↑1288.5%LGPL-2.1-onlyPHPCI passing

Since Apr 8Pushed 6d ago2 watchersCompare

[ Source](https://github.com/zachweix/PhpZmanim)[ Packagist](https://packagist.org/packages/zachweix/php-zmanim)[ RSS](/packages/zachweix-php-zmanim/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (2)Versions (23)Used By (0)

PhpZmanim
=========

[](#phpzmanim)

[![Latest Stable Version](https://camo.githubusercontent.com/a085e077b3f8163e0ccca1df700902fe8b7d54ae76693922e144a66ce0f1b1ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a616368776569782f7068702d7a6d616e696d2e737667)](https://packagist.org/packages/zachweix/php-zmanim)[![Tests](https://github.com/zachweix/PhpZmanim/actions/workflows/tests.yml/badge.svg)](https://github.com/zachweix/PhpZmanim/actions/workflows/tests.yml)

A PHP port of the [KosherJava Zmanim API](https://kosherjava.com) by Eliyahu Hershfeld (source at the [KosherJava Zmanim project](https://github.com/KosherJava/zmanim)). It calculates halachic times (*zmanim*) for any date and location, and provides a full Jewish calendar (dates, holidays, parsha, daf yomi, molad, and more).

Because this is a port, the [KosherJava documentation](https://kosherjava.com) remains the canonical reference for the meaning of every zman and calendar method. This README is the quick start; see [docs/USAGE.md](docs/USAGE.md) for detailed usage.

> **Upgrading from v3?** v4 renames and reorganizes much of the API. See the [v3 → v4 upgrade guide](docs/UPGRADING.md).

```
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();      // ט״ו תשרי תשפ״ד
```

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- [Carbon](https://carbon.nesbot.com/) 2 or 3 (`^2.0 || ^3.0`)

Installation (with Composer)
----------------------------

[](#installation-with-composer)

```
$ composer require zachweix/php-zmanim

```

```
{
    "require": {
        "zachweix/php-zmanim": "^4.0"
    }
}
```

Setup
-----

[](#setup)

```
