PHPackages                             vsg24/jdatetimeplus - 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. vsg24/jdatetimeplus

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

vsg24/jdatetimeplus
===================

Jalali (Shamsi) DateTime class written in PHP, Supports year higher than 2038. Updated in 2016.

v1.0.0(9y ago)11621MITPHPPHP &gt;=5.4.0

Since Jul 6Pushed 9y ago2 watchersCompare

[ Source](https://github.com/VSG24/jDateTimePlus)[ Packagist](https://packagist.org/packages/vsg24/jdatetimeplus)[ Docs](https://vsg24.github.io/jDateTimePlus/)[ RSS](/packages/vsg24-jdatetimeplus/feed)WikiDiscussions master Synced yesterday

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

jDateTimePlus
=============

[](#jdatetimeplus)

PHP class to convert dates from Gregorian calendar system to Jalali calendar system and vice versa. Supports dates beyond 2038.
Jalali, also known as Shamsi or Hijri Shamsi is the Iranian calendar system.

About this class
================

[](#about-this-class)

`jDateTimePlus` 1.0.0 is based on `jDateTime` 2.2.0

This package is a fork based on jDateTime by Sallar Kaboli. In this fork, I replaced Jalali to Gregorian and vice versa methods with new ones based on jdf 2.60. Also replaced the `mktime` method with a new one because the older version gave wrong results. I also fixed some of the phpdocs and introduced new methods. This package is best used with a higher abstraction such as [`EasyDateTime`](https://github.com/VSG24/EasyDateTime).

PHP's default `date` function does not support years higher than 2038, so the `DateTime` class was introduced in PHP5 to solve this problem and provide more sophisticated date methods. Iranian users have been using an old `jdate` function to convert Gregorian date to the Jalali equivalent, which is completely based on the old php `date` function so its pretty much out-dated.

Requirements
============

[](#requirements)

Unlike jDateTime, jDateTimePlus Requires **PHP &gt;= 5.4**

Installation
============

[](#installation)

Using Composer
--------------

[](#using-composer)

You can install this package using [composer](https://getcomposer.org). Add this package to your `composer.json`:

```
"require": {
	"vsg24/jdatetimeplus": "dev-master"
}

```

or if you prefer command line, change directory to project root and:

```
php composer.phar require "vsg24/jdatetimeplus":"dev-master"

```

Manual Installation
-------------------

[](#manual-installation)

Get a copy of package source code. You can do this in two ways:

1. Download ZIP version of the source code and unzip it in desired location
2. Run `git clone https://github.com/VSG24/jDateTimePlus.git` to clone this repository

After getting a copy of source code, it is enough to include `jdatetime.class.php` where you need to use it.

```
require_once 'path/to/source/jdatetimeplus.class.php';
```

Examples
========

[](#examples)

Please see [examples.php](examples.php) and [example-static.php](examples-static.php) for working examples.

Contributors:
=============

[](#contributors)

- [Vahid Amiri Motlagh](http://atvsg.com)
- [Sallar Kaboli](http://sallar.me)

License
-------

[](#license)

jDateTimePlus was created by [Vahid Amiri Motlagh](http://atvsg.com) and released under the [MIT License](http://opensource.org/licenses/mit-license.php).

Copyright (C) 2016 [Vahid Amiri Motlagh](http://atvsg.com)

Original Jalali to Gregorian (and vice versa) methods from "jdf 2.60" package: Copyright (C) 2015, Reza Gholampanahi

```
The MIT License (MIT)

Copyright (C) 2016 Vahid Amiri Motlagh

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

1- The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

2- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

```

Resources
=========

[](#resources)

- [List of supported timezones](http://www.php.net/manual/en/timezones.php)
- [Documentation and Instructions in Persian](http://sallar.me/farsi/projects/jdatetime/)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

3646d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7500363?v=4)[Vahid Amiri Motlagh](/maintainers/VSG24)[@vsg24](https://github.com/vsg24)

---

Top Contributors

[![sallar](https://avatars.githubusercontent.com/u/768052?v=4)](https://github.com/sallar "sallar (56 commits)")[![afshinm](https://avatars.githubusercontent.com/u/314326?v=4)](https://github.com/afshinm "afshinm (17 commits)")[![vsg24](https://avatars.githubusercontent.com/u/7500363?v=4)](https://github.com/vsg24 "vsg24 (5 commits)")[![pilevar](https://avatars.githubusercontent.com/u/1252853?v=4)](https://github.com/pilevar "pilevar (2 commits)")[![nimamo](https://avatars.githubusercontent.com/u/1217593?v=4)](https://github.com/nimamo "nimamo (1 commits)")[![pooyanism](https://avatars.githubusercontent.com/u/10364229?v=4)](https://github.com/pooyanism "pooyanism (1 commits)")[![meysampg](https://avatars.githubusercontent.com/u/1416085?v=4)](https://github.com/meysampg "meysampg (1 commits)")[![ammont](https://avatars.githubusercontent.com/u/2066482?v=4)](https://github.com/ammont "ammont (1 commits)")

---

Tags

datetimetimedateJalaliiranpersianshamsifarsijalalidatejdatetime

### Embed Badge

![Health badge](/badges/vsg24-jdatetimeplus/health.svg)

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

###  Alternatives

[symfony_persia/symfonyjdate

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

1010.9k](/packages/symfony-persia-symfonyjdate)[hekmatinasser/verta

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

657541.4k28](/packages/hekmatinasser-verta)[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)[opilo/farsi

Farsi Tools for Dates and Numbers and Strings (with Laravel Validation Support)

313.2k1](/packages/opilo-farsi)[iamfarhad/validation

🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes &amp; more. Modern Laravel 10-13 support with both ValidationRule objects &amp; string-based rules.

3017.3k](/packages/iamfarhad-validation)

PHPackages © 2026

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