Prototype
PHP Hijri or Laravel Hijri
Do you need the Hijri library on its own, or its Laravel integration?
Facts checked against the source on . Releases, requirements and lines are read live from each package's latest release.
| PHP Hijri | Laravel Hijri | |
|---|---|---|
| Choose it when | You are not on Laravel, or you only need conversions and Carbon methods. | You are on Laravel and want casts, validation, Blade output and config. It installs PHP Hijri for you. |
| What it is | Hijri dates for any PHP code, as a Carbon mixin (HijriCarbon) and a Gregorian/Hijri converter. Sourcefor What it is (opens in a new tab) | The Laravel integration of PHP Hijri: it registers the Carbon mixin and the day adjustment for you. Sourcefor What it is (opens in a new tab) |
| Laravel features | None. Call it from any framework or plain PHP. Sourcefor Laravel features (opens in a new tab) | @hijri Blade directive, <x-hijri-date> component, AsHijri Eloquent cast, HijriDateRule validation rule, config and translations. Sourcefor Laravel features (opens in a new tab) |
| Day adjustment | Set in code: globally with HijriAdjustment::set(), or per call (the $adjustment argument of Hijri::fromGregorian()). Sourcefor Day adjustment (opens in a new tab) | From config: pharaonic.hijri.adjustment (HIJRI_ADJUSTMENT), -1 by default. Sourcefor Day adjustment (opens in a new tab) |
| Install | composer require pharaonic/php-hijri | composer require pharaonic/laravel-hijri |
| Latest release | v8.5.6 | v13.1.0 |
| Released on | 2026-10-08 | 2026-10-08 |
| Requires | PHP 8.5 | PHP 8.3 – 8.5, Laravel 13 |
| Maintained lines | v8.5.x, v8.4.x, v8.3.x, v8.2.x, v8.1.x, v8.0.x | v13.x, v12.x, v11.x, v10.x, v9.x, v8.x, v7.x, v6.x |
| Other dependencies | nesbot/carbon | pharaonic/php-hijri |
| License | MIT | MIT |
Limitations
- Both use a tabular Hijri calendar. Local moon sighting can differ by a day or two, which is what the adjustment is for.
This comparison only covers Pharaonic packages and states what their code does. It doesn't rate them or measure performance. Spotted something out of date? Report it.