PHPackages                             hekmatinasser/verta - 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. hekmatinasser/verta

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

hekmatinasser/verta
===================

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

v8.5(1y ago)657530.5k↓35.9%81[4 PRs](https://github.com/hekmatinasser/verta/pulls)20MITPHPPHP ^8.0CI failing

Since May 26Pushed 1y ago11 watchersCompare

[ Source](https://github.com/hekmatinasser/verta)[ Packagist](https://packagist.org/packages/hekmatinasser/verta)[ GitHub Sponsors](https://github.com/hekmatinasser)[ RSS](/packages/hekmatinasser-verta/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (94)Used By (20)

[![jalali](https://raw.githubusercontent.com/hekmatinasser/verta/master/logo.png)](https://raw.githubusercontent.com/hekmatinasser/verta/master/logo.png)

hekmatinasser/verta
===================

[](#hekmatinasserverta)

[![Latest Stable Version](https://camo.githubusercontent.com/6435ee5a13e7d564511d6bb7b7e2a7208637bf33d14f1684558074a2770e2d7d/68747470733a2f2f706f7365722e707567782e6f72672f68656b6d6174696e61737365722f76657274612f762f737461626c65)](https://packagist.org/packages/hekmatinasser/verta)[![Total Downloads](https://camo.githubusercontent.com/de77da9cbbb343df16a50d8f68cb508972c8b069795c45d45a3299d78f5bc2ed/68747470733a2f2f706f7365722e707567782e6f72672f68656b6d6174696e61737365722f76657274612f646f776e6c6f616473)](https://packagist.org/packages/hekmatinasser/verta)[![License](https://camo.githubusercontent.com/7cf800075799088179f5603cc9b3fd95236db49b714214a3e3dc5afa64670d34/68747470733a2f2f706f7365722e707567782e6f72672f68656b6d6174696e61737365722f76657274612f6c6963656e7365)](https://packagist.org/packages/hekmatinasser/verta)

[English Document](https://hekmatinasser.github.io/verta)

The Verta is package for change solar calendar and gregorian together and provide helper function to use date and time.

Verta extend class PHP Datetime and Jalali, compatible with Carbon Package.

This package has been created by Nasser Hekmati under the license of MIT.

Quick view
----------

[](#quick-view)

- [Installation](#installation)
- [Usage](#usage)
    - [Jalali to Gregorian](#jalali-to-gregorian)
    - [Gregorian to Jalali](#gregorian-to-jalali)
    - [Jalali to Carbon](#jalali-to-carbon)
    - [Carbon to Jalali](#carbon-to-jalali)
- [Getters](#getters)
- [Setters](#setters)
    - [Fluent Setters](#fluent-setters)
- [Formatting](#formatting)
    - [Common Formats](#common-formats)
    - [Difference for Humans](#difference-for-humans)
- [Modification](#modification)
- [Boundaries](#boundaries)
- [Compression](#compression)
    - [Difference](#difference)
- [Validation](#validation)
- [Localization](#localization)
- [Validation Request](#validation-request)
- [Licence](#licence)
- [Contributors](#contributors)

### Installation

[](#installation)

```
composer require hekmatinasser/verta
```

   Laravel Version Package Version     8.0 8.0   9.0 8.2   10.0 8.3   11.0 8.4   12.0 8.5  ### Usage

[](#usage)

use verta datetime jalali

```
echo verta(); //1401-05-24 00:00:00
```

#### Gregorian to Jalali

[](#gregorian-to-jalali)

change gregorian to jalali and reverse

```
echo verta('2022-08-15'); //1401-05-24 00:00:00
```

#### jalali to Gregorian

[](#jalali-to-gregorian)

change jalali to gregorian and reverse

```
echo Verta::parse('1401-05-24 14:12:32')->datetime(); //2022-08-15 00:00:00
```

#### Carbon to Jalali

[](#carbon-to-jalali)

change carbon to jalali and reverse

```
echo now()->toJalali(); //1401-05-24 00:00:00
```

#### Jalali to Carbon

[](#jalali-to-carbon)

change jalali to gregorian and reverse

```
echo verta()->toCarbon(); //2022-08-15 00:00:00
```

[view more function](https://hekmatinasser.github.io/verta/#instantiate)

### Getters

[](#getters)

access part of jalali datetime

```
$v = verta(); // 1396-03-14 14:18:23
echo $v->year; // 1396
```

[view more getter](https://hekmatinasser.github.io/verta/#getter)

### Setters

[](#setters)

set part of jalali datetime

```
$v = verta(); // 1396-03-14 14:18:23
echo $v->year = 1395;
```

[view more setter](https://hekmatinasser.github.io/verta/#setter)

#### Fluent Setters

[](#fluent-setters)

set multiple part of jalali datetime

```
$v = verta(); // 1396-03-14 14:18:23
echo $v->setTimeString('12:25:45');
```

[view more fluent setter](https://hekmatinasser.github.io/verta/#set_date_time)

### Formatting

[](#formatting)

show datetime variant datetime

```
echo verta()->format('Y.m.d'); // 1401.05.24
echo verta()->formatWord('l dS F'); // دوشنبه بیست و چهارم مرداد
```

[view more format](https://hekmatinasser.github.io/verta/#formatting)

#### Common Formats

[](#common-formats)

show common datetime variant datetime

```
echo verta()->formatJalaliDatetime(); // output 1395/10/07 14:12:25
```

[view more common format](https://hekmatinasser.github.io/verta/#format_date_time)

### Difference for Humans

[](#difference-for-humans)

show difference format readable humans

```
echo verta('-13 month')->formatDifference(); // 1 سال قبل
```

[view more format difference](https://hekmatinasser.github.io/verta/#format_difference)

### Modification

[](#modification)

manipulate jalali datetime

```
echo verta()->addWeeks(3);
...
```

[view more modifications](https://hekmatinasser.github.io/verta/#modification)

### Boundaries

[](#boundaries)

get boundary jalali datetime

```
echo verta()->startWeek(3);
```

[view more boundaries](https://hekmatinasser.github.io/verta/#boundaries)

### Compression

[](#compression)

get compression jalali datetime

```
echo verta('+2 day')->gte('2022-08-15');
```

[view more compression](https://hekmatinasser.github.io/verta/#comparison)

### Difference

[](#difference)

calculate difference two jalali datetime

```
echo verta('+13 day')->diffMonths('2022-08-15');
```

[view more differences](https://hekmatinasser.github.io/verta/#difference)

### Validation

[](#validation)

check datetime check is valid

```
echo Verta::isLeapYear(1394); // false
```

[view more validations](https://hekmatinasser.github.io/verta/#validation)

### Localization

[](#localization)

set language for formatting datetime

```
Verta::setLocale('ar');
```

[view more localizations](https://hekmatinasser.github.io/verta/#localization)

### Validation Request

[](#validation-request)

validation input form

```
'birthday' => ['required', 'jdate_before_equal']
```

[view more localizations](https://hekmatinasser.github.io/verta/#laravel_validation)

Licence
-------

[](#licence)

This package has been created by Nasser Hekmati under the license of MIT.

Contributors
------------

[](#contributors)

Thanks to people who contributed for grow verta.

[![](https://camo.githubusercontent.com/b3009c7f7693ca897c9890f4a8d704ad502179a31ccfb070f4c2e7e66093bfe5/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f76657274612f636f6e7472696275746f72732e7376673f627574746f6e3d66616c7365)](https://github.com/hekmatinasser/verta/graphs/contributors)

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance47

Moderate activity, may be stable

Popularity58

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 76% 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 ~31 days

Recently: every ~166 days

Total

93

Last Release

435d ago

Major Versions

v1.12.7 → v2.0.12022-02-16

v2.1.1 → v8.02022-07-21

PHP version history (6 changes)v1.4.3PHP &gt;=5.5

v1.10.5PHP ^7.2.5

v1.11.7PHP ^7.2.5|^8.0

v1.12.7PHP ^7.3|^8.0|^8.1

v2.0.1PHP ^7.3|^8.0

v8.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6afc5c83ee6cfeb15786ea9943a8916eb447dbb98bd48cf84a2eec8ee2e855fe?d=identicon)[hekmati.nasser](/maintainers/hekmati.nasser)

---

Top Contributors

[![hekmatinasser](https://avatars.githubusercontent.com/u/17121789?v=4)](https://github.com/hekmatinasser "hekmatinasser (193 commits)")[![iamfarhad](https://avatars.githubusercontent.com/u/1936147?v=4)](https://github.com/iamfarhad "iamfarhad (18 commits)")[![alighorbani1381](https://avatars.githubusercontent.com/u/59092242?v=4)](https://github.com/alighorbani1381 "alighorbani1381 (12 commits)")[![mziraki](https://avatars.githubusercontent.com/u/6510195?v=4)](https://github.com/mziraki "mziraki (6 commits)")[![imanghafoori1](https://avatars.githubusercontent.com/u/6961695?v=4)](https://github.com/imanghafoori1 "imanghafoori1 (4 commits)")[![zouravand](https://avatars.githubusercontent.com/u/4015493?v=4)](https://github.com/zouravand "zouravand (4 commits)")[![ehsansabet](https://avatars.githubusercontent.com/u/5628902?v=4)](https://github.com/ehsansabet "ehsansabet (3 commits)")[![Zoha](https://avatars.githubusercontent.com/u/16442858?v=4)](https://github.com/Zoha "Zoha (2 commits)")[![timcheh](https://avatars.githubusercontent.com/u/76466369?v=4)](https://github.com/timcheh "timcheh (2 commits)")[![omalizadeh](https://avatars.githubusercontent.com/u/12392549?v=4)](https://github.com/omalizadeh "omalizadeh (2 commits)")[![Taeyelor](https://avatars.githubusercontent.com/u/17850476?v=4)](https://github.com/Taeyelor "Taeyelor (2 commits)")[![P-Shakibafar](https://avatars.githubusercontent.com/u/25016184?v=4)](https://github.com/P-Shakibafar "P-Shakibafar (1 commits)")[![me-masoud](https://avatars.githubusercontent.com/u/36824897?v=4)](https://github.com/me-masoud "me-masoud (1 commits)")[![amir9480](https://avatars.githubusercontent.com/u/16279288?v=4)](https://github.com/amir9480 "amir9480 (1 commits)")[![ghaninia](https://avatars.githubusercontent.com/u/41255155?v=4)](https://github.com/ghaninia "ghaninia (1 commits)")[![Rayiumir](https://avatars.githubusercontent.com/u/11635923?v=4)](https://github.com/Rayiumir "Rayiumir (1 commits)")[![sadegh19b](https://avatars.githubusercontent.com/u/54643531?v=4)](https://github.com/sadegh19b "sadegh19b (1 commits)")

---

Tags

carbonconvert-numbersdatetimegaregoriangregorianjalalilaravelpersian-datetimeshamsilaraveldatetimedateJalalishamsiVerta

### Embed Badge

![Health badge](/badges/hekmatinasser-verta/health.svg)

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

###  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)[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)
