2022-08-16 00:08:10 +04:30
2022-07-21 04:31:18 +04:30
2022-07-20 19:46:38 +00:00
2022-07-03 20:26:41 +04:30
2022-02-16 19:40:39 +03:30
WIP
2022-01-16 12:58:59 +03:30
WIP
2022-01-16 11:48:15 +03:30
2022-07-21 04:31:18 +04:30
2017-05-26 21:48:46 +04:30
2022-07-21 00:15:49 +04:30
WIP
2022-01-16 13:10:55 +03:30
2022-08-16 00:08:10 +04:30

jalali

hekmatinasser/verta

Latest Stable Version Total Downloads License

Document

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.

Installations

composer require hekmatinasser/verta
Laravel Version Package Version
8.0 8.x
9.0 8.x

Transformation

change jalali to gregorian and reverse

echo verta('2022-08-15'); //1401-05-24 00:00:00
echo Verta::parse('1395-10-07 14:12:32')

Property

access part of jalali datetime

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

Formation

show datetime variant datetime

echo verta('-13 month')->formatDifference(); // 1 سال قبل
echo verta()->formatWord('l dS F'); // دوشنبه بیست و چهارم مرداد
...

Modification

manipulate jalali datetime

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

Boundaries

get boundary jalali datetime

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

Diffrense

calculate diff two jalali datetime

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

Compression

get boundary jalali datetime

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

Validation Request

validation input form

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

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

S
Description
تبدیل تاریخ میلادی به شمسی برای لاراول و کار با تاریخ جلالی و اعتبارسنجی تاریخ
Readme
398 KiB
0 Stars 1 Watchers 0 Forks
Languages
PHP 100%