PHPackages                             kakajan/lumen-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kakajan/lumen-jalali

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

kakajan/lumen-jalali
====================

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in lumen 5.5+ applications

1.0(8y ago)5408MITPHPPHP &gt;=5.3.0

Since Dec 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kakajan/lumen-jalali)[ Packagist](https://packagist.org/packages/kakajan/lumen-jalali)[ RSS](/packages/kakajan-lumen-jalali/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

kakajan/lumen-jalali
====================

[](#kakajanlumen-jalali)

[![npm](https://camo.githubusercontent.com/da7be898d90b098756303fb040412da84d1531909d8c42c3d705b19d9b6436b9/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f657870726573732e7376673f7374796c653d666c61742d737175617265)](https://github.com/kakajan/lumen-jalali/blob/master/README.md) [![Dockbit](https://camo.githubusercontent.com/ed95c19eed59b5d91c828de6b12e2aa9347f2fca3e53c840b293ff2be1706834/68747470733a2f2f696d672e736869656c64732e696f2f646f636b6269742f446f636b6269745374617475732f6865616c74682e7376673f746f6b656e3d5476617674747846484a3471686e4b73744478727642584d267374796c653d666c61742d737175617265)](https://github.com/kakajan/lumen-jalali) [![Chrome Web Store](https://camo.githubusercontent.com/fc8b2f3e572ab0f44b86fc2dcbff2a72152fed9d2dcb1db8af9ddc12aefc146e/68747470733a2f2f696d672e736869656c64732e696f2f6368726f6d652d7765622d73746f72652f70726963652f6e696d656c65706270656a6a6c626d6f6f626f6370666e6a6869686e706b65642e7376673f7374796c653d666c61742d737175617265)](https://github.com/kakajan/lumen-jalali) [![Jenkins tests](https://camo.githubusercontent.com/90e5ed97e709216f3ef88771243f47d3b6b5a4935af5e83b1391f8b47a0f0689/68747470733a2f2f696d672e736869656c64732e696f2f6a656e6b696e732f742f68747470732f6a656e6b696e732e71612e7562756e74752e636f6d2f766965772f507265636973652f766965772f416c6c253230507265636973652f6a6f622f707265636973652d6465736b746f702d616d6436345f64656661756c742e7376673f7374796c653d666c61742d737175617265)](https://github.com/kakajan/lumen-jalali/releases/tag/1.0)

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in lumen 5.5+ applications.

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

[](#installation)

In the `require` key of `composer.json` file add the following

```
    "kakajan/lumen-jalali": "1.0"
```

Run the Composer update comand

```
$ composer update

```

Or just run command

```
$ composer require kakajan/lumen-jalali

```

In your `bootstrap/app.php` add `$app->register(jDate\Jalali\JalaliServiceProvider::class);` for registring service provider.

```

    $app->register(App\Providers\AppServiceProvider::class);
    $app->register(App\Providers\AuthServiceProvider::class);
    .
    .
    $app->register(jDate\Jalali\JalaliServiceProvider::class);
```

In your `bootstrap/app.php` add `class_alias('jDate\Jalali\jDate', 'jDate');` before `return $app;`

```

    class_alias('jDate\Jalali\jDate', 'jDate');
    return $app;
```

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

[](#basic-usage)

Examples
--------

[](#examples)

Some Examples

```
// 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 originally created by [Milad Rey](http://milad.io) and is released under the MIT License.
- Updated for lumen 5.5+ by [kakajn](https://aybook.ir) - .

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3078d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/925b487e7efd48206fc8dd2563fa6621bab39fa41ba7a81ddeec0e8b662bcd23?d=identicon)[usher](/maintainers/usher)

---

Top Contributors

[![kakajan](https://avatars.githubusercontent.com/u/5671787?v=4)](https://github.com/kakajan "kakajan (5 commits)")

---

Tags

lumendatetimedateJalali

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/kakajan-lumen-jalali/health.svg)](https://phpackages.com/packages/kakajan-lumen-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)[hekmatinasser/verta

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

657530.5k27](/packages/hekmatinasser-verta)[brick/date-time

Date and time library

3623.3M61](/packages/brick-date-time)[aeon-php/calendar

PHP type safe, immutable calendar library

2079.7M16](/packages/aeon-php-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)

PHPackages © 2026

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