PHPackages                             sgh370/yii2-jdf - 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. sgh370/yii2-jdf

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

sgh370/yii2-jdf
===============

Convert Any Type Of Date

037PHP

Since Mar 18Pushed 9y agoCompare

[ Source](https://github.com/sgh370/yii2-jdf)[ Packagist](https://packagist.org/packages/sgh370/yii2-jdf)[ RSS](/packages/sgh370-yii2-jdf/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Persian Date Converting
=======================

[](#persian-date-converting)

Convert Any Type Of Date

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist sgh370/yii2-jdf "dev-master"

```

or add

```
"sgh370/yii2-jdf": "dev-master"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
1) add the following line in component section in web.config file:
    'components' => [
        ...
        'jdf' => [
            'class' => '\sgh370\jdf\Jdf'
        ],
        ...
    ]

2) use the following functions and pass needed arguments:
    \Yii::$app->jdf->jdate($format, $timestamp = '', $none = '', $time_zone = 'Asia/Tehran', $tr_num = 'fa');
    \Yii::$app->jdf->jstrftime($format, $timestamp = '', $none = '', $time_zone = 'Asia/Tehran', $tr_num = 'fa');
    \Yii::$app->jdf->jmktime($h = '', $m = '', $s = '', $jm = '', $jd = '', $jy = '', $none = '', $timezone = 'Asia/Tehran');
    \Yii::$app->jdf->jgetdate($timestamp = '', $none = '', $timezone = 'Asia/Tehran', $tn = 'en');
    \Yii::$app->jdf->jcheckdate($jm, $jd, $jy);
    \Yii::$app->jdf->tr_num($str, $mod = 'en', $mf = '٫');
    \Yii::$app->jdf->jdate_words($array, $mod = '');
    \Yii::$app->jdf->gregorian_to_jalali($gy, $gm, $gd, $mod = '');
    \Yii::$app->jdf->jalali_to_gregorian($jy, $jm, $jd, $mod = '');
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25865344?v=4)[Saeed Ghanbari](/maintainers/sgh370)[@sgh370](https://github.com/sgh370)

---

Top Contributors

[![sgh370](https://avatars.githubusercontent.com/u/25865344?v=4)](https://github.com/sgh370 "sgh370 (3 commits)")

### Embed Badge

![Health badge](/badges/sgh370-yii2-jdf/health.svg)

```
[![Health](https://phpackages.com/badges/sgh370-yii2-jdf/health.svg)](https://phpackages.com/packages/sgh370-yii2-jdf)
```

###  Alternatives

[symfony/polyfill-php84

Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions

13998.6M219](/packages/symfony-polyfill-php84)[glhd/laravel-timezone-mapper

Timezone mapper for Laravel

46328.8k](/packages/glhd-laravel-timezone-mapper)

PHPackages © 2026

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