From 31da55d8d3f73ac8d16cba08bc211ed356a40845 Mon Sep 17 00:00:00 2001 From: nasser Date: Sat, 20 Aug 2022 23:22:46 +0430 Subject: [PATCH] add quick view --- README.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 784cb9c..616cd44 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,31 @@

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

-

Installations

+## 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) +- [Modification](#modification) +- [Boundaries](#boundaries) +- [Compression](#compression) + - [Difference](#difference) + - [Difference for Humans](#difference-for-humans) +- [Validation](#validation) +- [Localization](#localization) +- [Validation Request](#validation-request) +- [Licence](#licence) +- [Contributors](#contributors) + +## Installations ```shell composer require hekmatinasser/verta @@ -41,12 +65,39 @@ composer require hekmatinasser/verta -

Transformation

-

change jalali to gregorian and reverse

+## Usage +

use verta datetime jalali

+ +```php +echo verta(); //1401-05-24 00:00:00 +``` + +### Gregorian to Jalali +

change gregorian to jalali and reverse

```php echo verta('2022-08-15'); //1401-05-24 00:00:00 -echo Verta::parse('1395-10-07 14:12:32') +``` + +### jalali to Gregorian +

change jalali to gregorian and reverse

+ +```php +echo Verta::parse('1401-05-24 14:12:32')->datetime(); //2022-08-15 00:00:00 +``` + +### Carbon to Jalali +

change carbon to jalali and reverse

+ +```php +echo now()->toJalali(); //1401-05-24 00:00:00 +``` + +### Jalali to Carbon +

change jalali to gregorian and reverse

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

Property

@@ -83,7 +134,7 @@ echo verta()->startWeek(3); ... ``` -

Diffrense

+

Difference

calculate diff two jalali datetime

```php @@ -107,6 +158,11 @@ echo verta('+2 day')->gte('2022-08-15'); 'birthday' => ['required', 'jdate_before_equal'] ... ``` +## Licence -

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

+This package has been created by Nasser Hekmati under the license of MIT. +## Contributors +Thanks to people who contributed for grow varta. + +