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

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

mhgolestani77/verta
===================

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

v1.0.0(2y ago)0362↓50%MITPHPPHP ^8.0

Since Jul 13Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

1040d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b23abf430b0a370ab264ad243b3d836582a07c35a5ea47883f7756080f798c8?d=identicon)[MHGolestani77](/maintainers/MHGolestani77)

---

Tags

laraveldatetimedateJalalishamsiVerta

### Embed Badge

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

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

###  Alternatives

[hekmatinasser/verta

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

657530.5k27](/packages/hekmatinasser-verta)[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)
