diff --git a/README.md b/README.md index 6e9945b..784cb9c 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,104 @@

-English Document +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

+ +```shell +composer require hekmatinasser/verta +``` + + + + + + + + + + + + + + + + + + +
Laravel VersionPackage Version
8.08.x
9.08.x
+ +

Transformation

+

change jalali to gregorian and reverse

+ +```php +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

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

Formation

+

show datetime variant datetime

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

Modification

+

manipulate jalali datetime

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

Boundaries

+

get boundary jalali datetime

+ +```php +echo verta()->startWeek(3); +... +``` + +

Diffrense

+

calculate diff two jalali datetime

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

Compression

+

get boundary jalali datetime

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

Validation Request

+

validation input form

+ +```php +'birthday' => ['required', 'jdate_before_equal'] +... +``` +

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

+