PHPackages                             ivy47/hebcal-api - 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. [API Development](/categories/api)
4. /
5. ivy47/hebcal-api

ActiveLibrary[API Development](/categories/api)

ivy47/hebcal-api
================

Simple API implementation of Hebcal.com Jewish holiday calendars for Laravel

v4.2(4y ago)177MITPHP

Since May 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ivy47/hebcal-api)[ Packagist](https://packagist.org/packages/ivy47/hebcal-api)[ RSS](/packages/ivy47-hebcal-api/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (5)Versions (9)Used By (0)

Laravel Hebcal Api Package
--------------------------

[](#laravel-hebcal-api-package)

Simple API implementation of [Hebcal.com](https://www.hebcal.com/) Jewish holiday calendars for Laravel

This package implements:

- Jewish calendar REST API
- Hebrew Date Converter REST API
- Shabbat times REST API
- Zmanim (halachic times) API
- Yahrzeit + Anniversary API

Installation
------------

[](#installation)

`composer require ivy47/hebcal-api`

or add it to your composer.json and run `composer update ivy47/hebcal-api`

Publish Config File
-------------------

[](#publish-config-file)

The `vendor:publish` commmand will publish a file named hebcal.php within your laravel project config folder config/hebcal.php.

`php artisan vendor:publish --provider="Ivy47\HebcalApi\HebcalServiceProvider"`

Published Config File Contents

```
/*
     * Base Hebcal REST API uri
     * */
    'base_uri' => 'https://www.hebcal.com',

    /*
     * Jewish calendar REST API uri's
     * */
    'hebcal_uri' => '/hebcal/',
    'converter_uri' => '/converter/',
    'shabbat_uri' => '/shabbat/',
    'zmanim_uri' => '/zmanim/',
    'yahrzeit_uri' => '/yahrzeit/',

    /*
     * Use laravel cache
     * */
    'use_cache' => false,

    /*
     * Cache store driver
     * Check cache configuration file at config/cache.php to see posible options
     * */
    'cache_store' => 'file'

```

To enable hebcal api requests cache - change `use_cache` value to true. Also, you can set the cache store driver. For more details check Laravel [driver-prerequisites](https://laravel.com/docs/8.x/cache#driver-prerequisites) documentation

Usage
-----

[](#usage)

### Jewish calendar

[](#jewish-calendar)

Use HebcalApi Facade. To get the holidays use the `HebcalApi` method `getHolidays($params)`

```
use Ivy47\HebcalApi\Facades\HebcalApiFacade as HebcalApi;

$params = [
            'v' => 1,
            'maj' => 'on',
            'min' => 'on',
            'mod' => 'on',
            'nx' => 'on',
            'month' => 'x',
            'ss' => 'on',
            'mf' => 'on',
            'c' => 'on',
            ...
            ];

$hebcalCalendarResponse = HebcalApi::getHolidays($params);
```

To see more details about params check [Jewish calendar REST API documentation](https://www.hebcal.com/home/195/jewish-calendar-rest-api)

To get hebcal items use `$hebcalCalendarResponse->getItems()` method

If you need to get the holidays only for specific category, use categories filter &amp; `HebcalHelper` category constants:

```
use Ivy47\HebcalApi\Helpers\HebcalHelper;

$hebcalCalendarResponseItems = $hebcalCalendarResponse->getItems([
            HebcalHelper::HEBCAL_CATEGORY_CANDLES,
            HebcalHelper::HEBCAL_CATEGORY_HOLIDAY,
        ]);
```

### Hebrew Date Converter

[](#hebrew-date-converter)

To convert date use `HebcalApi` method `convertDate($params)`

```
use Ivy47\HebcalApi\Facades\HebcalApiFacade as HebcalApi;

$params = [
            'gy' => 2011,
            'gm' => 6,
            'gd' => 2,
            'g2h' => 1,
            ...
            ];

$hebrewDateResponse = HebcalApi::convertDate($params);
```

To see more details about params check [Hebrew Date Converter REST API](https://www.hebcal.com/home/219/hebrew-date-converter-rest-api)

### Shabbat times

[](#shabbat-times)

To get just this week’s Shabbat times and Torah Portion use `HebcalApi` method `getShabbatTimes($params)`

```
use Ivy47\HebcalApi\Facades\HebcalApiFacade as HebcalApi;

$params = [
            'geonameid' => '3448439',
            'M' => 'on'
            ...
            ];

$shabbatResponse = HebcalApi::getShabbatTimes($params);
```

To see more details about params check [Shabbat times REST API](https://www.hebcal.com/home/197/shabbat-times-rest-api)

### Zmanim (halachic times)

[](#zmanim-halachic-times)

To calculate zmanim (halachic times) for a given location use `HebcalApi` method `getZmanim($params)`

```
use Ivy47\HebcalApi\Facades\HebcalApiFacade as HebcalApi;

$params = [
            'geonameid' => '3448439',
            'date' => '2021-03-23'
            ...
            ];

$zmanimResponse = HebcalApi::getZmanim($params);
```

To see more details about params check [Zmanim (halachic times) API](https://www.hebcal.com/home/1663/zmanim-halachic-times-api)

### Yahrzeit + Anniversary

[](#yahrzeit--anniversary)

To generate a list of Yahrzeit dates, Hebrew Birthdays, and Hebrew Anniversaries use `HebcalApi` method `generateYahrzeit($params)`

```
use Ivy47\HebcalApi\Facades\HebcalApiFacade as HebcalApi;

$params = [
            'v' => 'yahrzeit',
            'years' => 3,
            'hebdate' => 'on',
            'yizkor' => 'on',
            'y1' => 1983,
            'm1' => 4,
            'd1' => 15,
            's1' => 'on',
            't1' => 'Yahrzeit',
            'n1' => 'Example 1'
            ...
            ];

$yahrzeitResponse = HebcalApi::generateYahrzeit($params);
```

To see more details about params check [Yahrzeit + Anniversary API](https://www.hebcal.com/home/1705/yahrzeit-anniversary-api)

Important
---------

[](#important)

`cfg` param default value is '**json**' and can't be changed

API Resources
-------------

[](#api-resources)

This package provides Laravel API Resources of Hebcal ready to use

To get the api resource use `getResource()` method, on any HebcalResponse

```
// HebcalCalendarResponse example

/** @var \Ivy47\HebcalApi\Http\Resources\HebcalCalendar\HebcalCalendarResource $hebcalCalendarResource */
$hebcalCalendarResource = $hebcalCalendarResponse->getResource();
```

But if you need raw (body) or decoded response data use:

```
$body = $hebcalCalendarResponse->getBody();
$decoded = $hebcalCalendarResponse->getDecoded();
```

or use the original response:

```
$response = $hebcalCalendarResponse->getResponse();
```

Useful Links
------------

[](#useful-links)

- [Hebcal](https://www.hebcal.com/)
- [Jewish calendar REST API documentation](https://www.hebcal.com/home/195/jewish-calendar-rest-api)
- [Hebrew Date Converter REST API](https://www.hebcal.com/home/219/hebrew-date-converter-rest-api)
- [Shabbat times REST API](https://www.hebcal.com/home/197/shabbat-times-rest-api)
- [Zmanim (halachic times) API](https://www.hebcal.com/home/1663/zmanim-halachic-times-api)
- [Yahrzeit + Anniversary API](https://www.hebcal.com/home/1705/yahrzeit-anniversary-api)
- [Laravel Cache](https://laravel.com/docs/8.x/cache)
- [Laravel API Resources](https://laravel.com/docs/8.x/eloquent-resources)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

8

Last Release

1795d ago

Major Versions

v1.0 → v2.02021-06-01

v2.0 → v3.02021-06-01

v3.0.1 → v4.02021-06-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/85107e107fe4525ae7fe0b51017e93e670356ffd3a7d9c99fe8b7479c672b33e?d=identicon)[ivan.yeromin](/maintainers/ivan.yeromin)

---

Top Contributors

[![ivy47](https://avatars.githubusercontent.com/u/28040251?v=4)](https://github.com/ivy47 "ivy47 (53 commits)")

### Embed Badge

![Health badge](/badges/ivy47-hebcal-api/health.svg)

```
[![Health](https://phpackages.com/badges/ivy47-hebcal-api/health.svg)](https://phpackages.com/packages/ivy47-hebcal-api)
```

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[flat3/lodata

OData v4.01 Producer for Laravel

96320.9k](/packages/flat3-lodata)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
