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

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

peyman136/verta
===============

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

01PHP

Since Feb 27Pushed 1y agoCompare

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

READMEChangelogDependenciesVersions (1)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   11.0 8.4  ### 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

16

—

LowBetter than 5% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75.9% 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://www.gravatar.com/avatar/f6724fa6b7c40ff996f69aea5936d48281ae26bbdf0395c975f6ffd057efc99a?d=identicon)[peyman136](/maintainers/peyman136)

---

Top Contributors

[![hekmatinasser](https://avatars.githubusercontent.com/u/17121789?v=4)](https://github.com/hekmatinasser "hekmatinasser (192 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)")[![peyman136](https://avatars.githubusercontent.com/u/1691974?v=4)](https://github.com/peyman136 "peyman136 (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)")[![P-Shakibafar](https://avatars.githubusercontent.com/u/25016184?v=4)](https://github.com/P-Shakibafar "P-Shakibafar (1 commits)")[![sadegh19b](https://avatars.githubusercontent.com/u/54643531?v=4)](https://github.com/sadegh19b "sadegh19b (1 commits)")

### Embed Badge

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

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

###  Alternatives

[components/jqueryui

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

1795.8M57](/packages/components-jqueryui)[clue/graph-composer

Dependency graph visualization for composer.json

93798.0k11](/packages/clue-graph-composer)

PHPackages © 2026

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