PHPackages                             tartan/laravel-jalali-date - 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. tartan/laravel-jalali-date

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

tartan/laravel-jalali-date
==========================

Laravel Jalali datetime component known as ZAMAN

V10.2.0(1y ago)19898MITPHPPHP &gt;=8.1

Since Jun 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/php-monsters/laravel-jalali-date)[ Packagist](https://packagist.org/packages/tartan/laravel-jalali-date)[ RSS](/packages/tartan-laravel-jalali-date/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

ZAMAN - Jalali datetime component for Laravel:
==============================================

[](#zaman---jalali-datetime-component-for-laravel)

This component is based on native PHP International (php-intl) extension, So php-intl extension must be installed on your server.

known as:

- Hijri Shamsi
- Jalali Date
- JDatetime
- هجری شمسی
- تقویم خورشیدی
- تاریخ شمسی

Supprts Laravel 5+ and PHP 8.1+

php-intl extension installation
-------------------------------

[](#php-intl-extension-installation)

- On windows servers, open your php.ini (which should be in Program Files/PHP), and simply uncomment the extension.

```
extension=php_intl.dll

```

- Debian based Linux (Debian/Ubuntu/Mint/ ...)

```
sudo apt-get install php-intl

```

- Redhat based Linux (Redhat/Centos/ ...)

```
sudo dnf -y install php-intl

```

Restart your webserver - done.

### Composer installation

[](#composer-installation)

```
composer require php-monsters/laravel-jalali-date
```

### Integration with Laravel 5.\*

[](#integration-with-laravel-5)

Add package alias to your app aliases (only for Laravel &lt; 5.5):

```
// aliases
'Zaman' => PhpMonsters\Zaman\Facades\Zaman::class,
```

### Usage samples

[](#usage-samples)

```
// Jalali to Gregorian samples
echo Zaman::jTog('next week');
echo Zaman::jTog('now');
echo Zaman::jTog('1396-06-30 05:30:10');
echo Zaman::jTog ('۱۳۹۱/۱۰/۱۲ ۲۰:۳۰:۵۵', 'yyyy/MM/dd H:m:s', 'fa', 'en', 'Asia/Tehran');

// Gregorian to Jalali samples
echo Zaman::gToj('2 days ago');
echo Zaman::gToj('2010-10-24 22:50:14');
echo Zaman::gToj('2014-09-21 07:12:54', 'EEEE yyyy/MMMM/dd H:m:s');

// Moment samples
// JALALI moment
echo Zaman::moment(strtotime('3 hours ago'), Zaman::CAL_JALALI); // "3 ساعت قبل"
echo Zaman::momentJalali(strtotime('3 hours ago')); // "3 ساعت قبل"
echo Zaman::moment(strtotime('2017-01-02 00:10:20'), Zaman::CAL_JALALI); // "2 هفته قبل"
echo Zaman::momentJalali(strtotime('2017-01-02 00:10:20')); // "2 هفته قبل"

// GREGORIAN moment
echo Zaman::moment('now', Zaman::CAL_GREGORIAN); // "May 2017"
echo Zaman::momentGregorian(1494328806); // "May 2017"
echo Zaman::moment('1 month ago', Zaman::CAL_GREGORIAN); // "last month"
echo Zaman::momentGregorian(1494334506); // "last month"

// HIJRI moment
// ISN'T implemented yet!!!
// echo Zaman::moment('now', Zaman::CAL_HIJRI);
// echo Zaman::momentHijri(1494328806);

// Blade usage example
{{ Zaman::gToj('2011-11-20 19:12:19') }}
```

### Date/Time formats

[](#datetime-formats)

[Supported Formats Documentation](http://userguide.icu-project.org/formatparse/datetime)

Team
----

[](#team)

This component is developed by the following person(s) and a bunch of [awesome contributors](https://github.com/php-monsters/laravel-jalali-date/graphs/contributors).

[![Aboozar Ghaffari](https://avatars1.githubusercontent.com/u/502961?s=130&v=4)](https://github.com/samuraee)[Aboozar Ghaffari](https://github.com/samuraee)Support this project
--------------------

[](#support-this-project)

Please support the package by giving it ⭐ and contributing to its development.

License
-------

[](#license)

The Laravel Jalali Datetime is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance42

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity76

Established project with proven stability

 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 ~485 days

Recently: every ~496 days

Total

6

Last Release

461d ago

Major Versions

v5.0.0 → v6.0.02019-09-06

v6.0.0 → v8.0.02022-09-14

v8.0.0 → v10.0.02024-01-01

PHP version history (3 changes)v5.0.0PHP &gt;=5.4.0

v8.0.0PHP &gt;=8.0.0

v10.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9299d1f63e54a717d0b785253adc636f90c3b460ae9bd24bfc1505ef5f90f1ec?d=identicon)[tartan](/maintainers/tartan)

---

Top Contributors

[![samuraee](https://avatars.githubusercontent.com/u/502961?v=4)](https://github.com/samuraee "samuraee (18 commits)")

---

Tags

datedatetimehijrijalalijalali-datelaravelphpshamsishamsi-datezamanlaraveldatetimemomentJalalishamsihijrigregorianjdatetime

### Embed Badge

![Health badge](/badges/tartan-laravel-jalali-date/health.svg)

```
[![Health](https://phpackages.com/badges/tartan-laravel-jalali-date/health.svg)](https://phpackages.com/packages/tartan-laravel-jalali-date)
```

###  Alternatives

[hekmatinasser/verta

This Package helps developers to work with Jalali Datetime class for Laravel Framework PHP

657530.5k27](/packages/hekmatinasser-verta)[morilog/jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in PHP applications, based on Jalali (Shamsi) DateTime class.

9201.2M45](/packages/morilog-jalali)[fisharebest/ext-calendar

Implementation of the Arabic (Hijri), French, Gregorian, Jewish, Julian and Persian (Jalali) calendars. Also provides a replacement for the PHP ext/calendar extension.

36473.2k8](/packages/fisharebest-ext-calendar)[p3ym4n/jdate

Date converter from Jalali to Georgian and vice versa. It has Carbon instance inside and it's Laravel friendly.

101.8k2](/packages/p3ym4n-jdate)[symfony_persia/symfonyjdate

Jalali (Shamsi) DateTime for Symfony2, Supports year higher than 2038

1010.6k](/packages/symfony-persia-symfonyjdate)

PHPackages © 2026

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