PHPackages                             nimaebrazi/persian-util - 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. nimaebrazi/persian-util

ActiveLibrary

nimaebrazi/persian-util
=======================

1.0.1(9y ago)5202MITPHPPHP &gt;=5.3.0

Since Jan 25Pushed 9y ago2 watchersCompare

[ Source](https://github.com/nimaebrazi/persian_util)[ Packagist](https://packagist.org/packages/nimaebrazi/persian-util)[ RSS](/packages/nimaebrazi-persian-util/feed)WikiDiscussions master Synced 1mo ago

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

PersianUtil
===========

[](#persianutil)

Persian util is simple PHP lib for persian developers.

Extend
------

[](#extend)

This library extend from:

[Jalali Date Format V2.65](http://jdf.scr.ir/)

install via composer
--------------------

[](#install-via-composer)

Run:

```
composer require nimaebrazi/persian-util

```

If you need alias in laravel you can include it in `config/app.php`:

```
'aliases' => [
    ...
    'JCal' => NimaEbrazi\PersianUtil\JalaliDate::class,
    ...
]
```

Method ExampleoutputDescription`toPersianNumber(95)`۹۵Integer number`toPersianNumber(125.36)`۱۲۵٫۳۶Double number`toPersianNumber(125.36,'.')`۱۲۵.۳۶Double number with change float symbol---`toEnglishNumber(۹۵)`95Integer or String number`toEnglishNumber(۱۲۵٫۳۶)`125.36Double or String number---`getDay()`2Return number of Jalali day`getMonth()`10Return number of Jalali month`getYear()`1395Return number of Jalali year`getPersianDateFormat()`1395/10/2Return string of Jalali day---`getDayWord(2)`دوReturn string of Jalali day`getMonthWord(2)`اردیبهشتReturn string of Jalali month`getYearWord(1395)`هزاروسیصدو نودوپنجReturn string of Jalali year`getSeasonWord(10)`زمستانReturn string of Jalali season of month`getDateWord('1395/2/15')`پانزده اردیبهشت هزار و سیصد و نود و پنجReturn string of Jalali date---`isAfterToday('1395/11/2')`('today is: 1395/12/1') falseReturn bool`isBeforeToday('1395/11/2')`('today is: 1395/12/1') trueReturn bool`isExpired('1395/11/2')`('today is: 1395/12/1') trueReturn bool---`unixTimestampToJalali(1485342613)`1486984213Return (string) jalali timestamp`unixTimestampToStrFormat(1485342613)`2017-01-25 14:40:13Return string of gregorian date with Asia/Tehran timezone`gregorianToJalaliStrFormat(1485342613)`1395/11/6 14:40:13Return (int) jalali time stamp

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Every ~15 days

Total

2

Last Release

3376d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12497401?v=4)[Nima Ebrazi](/maintainers/nimaebrazi)[@nimaebrazi](https://github.com/nimaebrazi)

---

Top Contributors

[![nimaebrazi](https://avatars.githubusercontent.com/u/12497401?v=4)](https://github.com/nimaebrazi "nimaebrazi (21 commits)")

---

Tags

composerjalaliperianphp

### Embed Badge

![Health badge](/badges/nimaebrazi-persian-util/health.svg)

```
[![Health](https://phpackages.com/badges/nimaebrazi-persian-util/health.svg)](https://phpackages.com/packages/nimaebrazi-persian-util)
```

PHPackages © 2026

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