PHPackages                             tabrizadmin/jalali - 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. tabrizadmin/jalali

ActiveLibrary

tabrizadmin/jalali
==================

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in Laravel 4 applications, based on Jalali (Shamsi) DateTime class. This Package is based on a Laravel 3 bundle sallar/laravel-jdate by Sallar Kaboli.

v2.2.3(5y ago)025MITPHPPHP &gt;=5.3.0

Since Jan 11Pushed 5y agoCompare

[ Source](https://github.com/TabrizAdmin/jalali)[ Packagist](https://packagist.org/packages/tabrizadmin/jalali)[ RSS](/packages/tabrizadmin-jalali/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (21)Used By (0)

tabrizadmin/jalali
==================

[](#tabrizadminjalali)

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in Laravel 4 applications, based on Jalali (Shamsi) DateTime class. This Package is based on a Laravel 3 bundle [sallar/laravel-jdate](https://github.com/sallar/laravel-jdate) by [Sallar Kaboli](http://sallar.me).

\*\* Updated for use in Laravel 8 by Hamed Ahadi

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

[](#installation)

You can install the package via composer:

```
    composer require tabrizadmin\jalali
```

If you are under laravel 6:

In your `config/app.php` add `'tabrizadmin\Jalali\JalaliServiceProvider'` to the end of the `$providers` array

```
    'providers' => array(

        'Illuminate\Foundation\Providers\ArtisanServiceProvider',
        'Illuminate\Auth\AuthServiceProvider',
        ...
        'tabrizadmin\Jalali\JalaliServiceProvider',

    ),
```

In your `config/app.php` add `'Jalali' => tabrizadmin\Services\Jalali` to the end of the `$aliases` array

Basic Usage
-----------

[](#basic-usage)

Examples
--------

[](#examples)

Some Examples (based on examples provided by Sallar)

```
// default timestamp is now
$date = jDate::forge();

// pass timestamps
$date = jDate::forge(1333857600);

// pass strings to make timestamps
$date = jDate::forge('last sunday');

// get the timestamp
$date = jDate::forge('last sunday')->time(); // 1333857600

// format the timestamp
$date = jDate::forge('last sunday')->format('%B %d، %Y'); // دی 02، 1391

// get a predefined format
$date = jDate::forge('last sunday')->format('datetime'); // 1391-10-02 00:00:00
$date = jDate::forge('last sunday')->format('date'); // 1391-10-02
$date = jDate::forge('last sunday')->format('time'); // 00:00:00

// amend the timestamp value, relative to existing value
$date = jDate::forge('2012-10-12')->reforge('+ 3 days')->format('date'); // 1391-07-24

// get relative 'ago' format
$date = jDate::forge('now - 10 minutes')->ago() // ۱۰ دقیقه پیش
```

Formatting
----------

[](#formatting)

For help in building your formats, checkout the [PHP strftime() docs](http://php.net/manual/en/function.strftime.php).

Notes
-----

[](#notes)

The class relies on `strtotime()` to make sense of your strings, and `strftime()` to make the format changes. Just always check the `time()` output to see if you get false timestamps... which means the class couldn't understand what you were telling it.

License
-------

[](#license)

- This bundle is created based on [Laravel-Date](https://github.com/swt83/laravel-date) by [Scott Travis](https://github.com/swt83) (MIT Licensed).
- [Jalali (Shamsi) DateTime](https://github.com/sallar/jDateTime) class included in the package is created by [Sallar Kaboli](http://sallar.me) and is released under the MIT License.
- This package was created by [Milad Rey](http://milad.io) and is released under the MIT License.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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 ~1 days

Total

20

Last Release

1939d ago

Major Versions

v1.0.1 → v2.0.42021-01-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca69d3cb09beaac26e2b2e1a99af7d194d2d003ca6b9cf6a4e42ec0aba1f2682?d=identicon)[hamedlaravel](/maintainers/hamedlaravel)

---

Top Contributors

[![TabrizAdmin](https://avatars.githubusercontent.com/u/1138708?v=4)](https://github.com/TabrizAdmin "TabrizAdmin (11 commits)")[![alifattahi](https://avatars.githubusercontent.com/u/1831394?v=4)](https://github.com/alifattahi "alifattahi (2 commits)")

---

Tags

laraveldatetimedateJalali

### Embed Badge

![Health badge](/badges/tabrizadmin-jalali/health.svg)

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

###  Alternatives

[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)[jenssegers/date

A date library to help you work with dates in different languages

1.8k11.2M80](/packages/jenssegers-date)[hekmatinasser/verta

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

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

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in Laravel 4 applications, based on Jalali (Shamsi) DateTime class. This Package is based on a Laravel 3 bundle sallar/laravel-jdate by Sallar Kaboli.

479.6k2](/packages/miladr-jalali)[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)[aloko/nova-persian-datepicker

Persian Datepicker for Laravel Nova.

203.5k](/packages/aloko-nova-persian-datepicker)

PHPackages © 2026

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