feature : pretty html document !
This commit is contained in:
1 parent
7b7f6546aa
commit
b35f9a42c0
2 files changed
+54
-20
No files matched your search
+34
-14
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Verta — Laravel plugin Jalali datetime</title>
|
||||
<meta name="description" content="">
|
||||
@@ -9,8 +10,12 @@
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<link rel="stylesheet" href="../css/style.css?v=0.2">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="https://github.com/hekmatinasser/verta" target="_blank"><img style="position: fixed; top: 0; right: 0; border: 0; z-index: 1000;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
|
||||
<a href="https://github.com/hekmatinasser/verta" target="_blank"><img
|
||||
style="position: fixed; top: 0; right: 0; border: 0; z-index: 1000;"
|
||||
src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<header id="header">
|
||||
<h1>Verta</h1>
|
||||
<h2>Laravel plugin Jalali datetime</h2>
|
||||
@@ -455,7 +460,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdate'
|
||||
'start_date' => 'jdate:Y/m/d'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is equal a given date</p>
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is equal a given
|
||||
date</p>
|
||||
<p>The default format is Y/m/d</p>
|
||||
|
||||
<pre>
|
||||
@@ -464,7 +470,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdate_equal:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is not equal a given date</p>
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is not equal a
|
||||
given date</p>
|
||||
<p>The default format is Y/m/d</p>
|
||||
|
||||
<pre>
|
||||
@@ -478,14 +485,16 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdatetime'
|
||||
'start_date' => 'jdatetime:Y/m/d H:i:s'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is equal a given datetime</p>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is equal a
|
||||
given datetime</p>
|
||||
<p>The default format is Y/m/d H:i:s</p>
|
||||
<pre>
|
||||
'start_date' => 'jdatetime_equal'
|
||||
'start_date' => 'jdatetime_equal:1388/01/01 12:56:28'
|
||||
'start_date' => 'jdatetime_equal:1388/01/01 12:56:28,Y/m/d H:i:s'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is not equal a given datetime</p>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is not equal a
|
||||
given datetime</p>
|
||||
<p>The default format is Y/m/d H:i:s</p>
|
||||
<pre>
|
||||
'start_date' => 'jdatetime_not_equal'
|
||||
@@ -493,7 +502,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdatetime_not_equal:1388/01/01 12:56:28,Y/m/d H:i:s'
|
||||
</pre>
|
||||
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is after a given date</p>
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is after a given
|
||||
date</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d</p>
|
||||
<pre>
|
||||
@@ -501,7 +511,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdate_after:1388/01/01'
|
||||
'start_date' => 'jdate_after:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is after or equal a given datetime</p>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is after or
|
||||
equal a given datetime</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d</p>
|
||||
<pre>
|
||||
@@ -509,7 +520,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdate_after_equal:1388/01/01'
|
||||
'start_date' => 'jdate_after_equal:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is after a given datetime</p>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is after a
|
||||
given datetime</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d H:i:s</p>
|
||||
<pre>
|
||||
@@ -517,7 +529,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdatetime_after:1388/01/01'
|
||||
'start_date' => 'jdatetime_after:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is after or equal a given datetime</p>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is after or
|
||||
equal a given datetime</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d H:i:s</p>
|
||||
<pre>
|
||||
@@ -526,7 +539,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdatetime_after_equal:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is before a given date</p>
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is before a given
|
||||
date</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d</p>
|
||||
<pre>
|
||||
@@ -534,7 +548,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdate_before:1388/01/01'
|
||||
'start_date' => 'jdate_before:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is before or equal a given date</p>
|
||||
<p>Determines if an input is a valid Jalali date with the specified format and it is before or equal
|
||||
a given date</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d</p>
|
||||
<pre>
|
||||
@@ -542,7 +557,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdate_before_equal:1388/01/01'
|
||||
'start_date' => 'jdate_before_equal:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is before a given date-time</p>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is before a
|
||||
given date-time</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d H:i:s</p>
|
||||
<pre>
|
||||
@@ -550,7 +566,8 @@ return $v1->isFriday(); // false
|
||||
'start_date' => 'jdatetime_before:1388/01/01'
|
||||
'start_date' => 'jdatetime_before:1388/01/01,Y/m/d'
|
||||
</pre>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is before or equal a given datetime</p>
|
||||
<p>Determines if an input is a valid Jalali datetime with the specified format and it is before or
|
||||
equal a given datetime</p>
|
||||
<p>The default date is now</p>
|
||||
<p>The default format is Y/m/d H:i:s</p>
|
||||
<pre>
|
||||
@@ -586,7 +603,9 @@ array:2 [
|
||||
|
||||
|
||||
<h2 id="traslation">Traslation</h2>
|
||||
<p>You can show weekdays, months , messages in the languages available in Verta To view supported languages, go to the folder <a href="https://github.com/hekmatinasser/verta/tree/master/src/Lang">langs</a></p>
|
||||
<p>You can show weekdays, months , messages in the languages available in Verta To view supported
|
||||
languages, go to the folder <a
|
||||
href="https://github.com/hekmatinasser/verta/tree/master/src/Lang">langs</a></p>
|
||||
<p>To set locale, use the following command</p>
|
||||
<pre>
|
||||
Verta::setLocale('fa');
|
||||
@@ -610,4 +629,5 @@ Verta::resetLocale();
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+20
-6
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fa">
|
||||
|
||||
<head>
|
||||
<title>Verta — پکیج تاریخ شمسی در لاراول</title>
|
||||
<meta name="description" content="">
|
||||
@@ -10,8 +11,12 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Markazi+Text&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/style.css?v=0.2">
|
||||
</head>
|
||||
|
||||
<body dir="rtl">
|
||||
<a href="https://github.com/hekmatinasser/verta" target="_blank"><img style="position: fixed; top: 0; right: 0; border: 0; z-index: 1000;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
|
||||
<a href="https://github.com/hekmatinasser/verta" target="_blank"><img
|
||||
style="position: fixed; top: 0; right: 0; border: 0; z-index: 1000;"
|
||||
src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<header id="header">
|
||||
<h1>Verta</h1>
|
||||
<h2>تاریخ شمسی در لاراول</h2>
|
||||
@@ -95,7 +100,8 @@ $v = Verta::today(); //1396-03-02 00:00:00
|
||||
$v = Verta::tomorrow(); // 1396-03-03 00:00:00
|
||||
$v = Verta::yesterday(); // 1396-03-01 00:00:00
|
||||
</pre>
|
||||
<p>برای بدست آوردن تاریخ و زمان به نسبت اکنون مانند تاریخ زمان پی اچ پی به صورت رشته ، از دستور زیر استفاده کنید</p>
|
||||
<p>برای بدست آوردن تاریخ و زمان به نسبت اکنون مانند تاریخ زمان پی اچ پی به صورت رشته ، از دستور زیر
|
||||
استفاده کنید</p>
|
||||
<pre>
|
||||
$v = new Verta('now'); // 1399-06-18 15:32:08
|
||||
$v = new Verta('-1 day'); //1399-06-17 15:07:04
|
||||
@@ -388,7 +394,8 @@ return $v1->lt($v2); // false alias lessThan()
|
||||
return $v1->lte($v2); // false alias lessThanOrEqualTo()
|
||||
return $v1->between($v2, $v3); // false
|
||||
</pre>
|
||||
<p>برای بررسی تاریخ از لحاظ نزدیکتر یا دورتر بودن و یا کوچکتر و بزرگتر بودن، از دستور زیر استفاده کنید</p>
|
||||
<p>برای بررسی تاریخ از لحاظ نزدیکتر یا دورتر بودن و یا کوچکتر و بزرگتر بودن، از دستور زیر استفاده
|
||||
کنید</p>
|
||||
<pre>
|
||||
return $v1->closest($v2, $v3); // return $v2 object
|
||||
return $v1->farthest($v2, $v3); // return $v3 object
|
||||
@@ -431,7 +438,11 @@ return $v1->isFriday(); // false
|
||||
</pre>
|
||||
<h2 id="validation">اعتبار سنجی</h2>
|
||||
<p>شما می توانید با اعتبار سنجی لاراول تاریخ های شمسی درون فرم های خود استفاده کنید</p>
|
||||
<p>شما باید پیام های خطا برای اعتبار سنجی خود در در مسیر فایل های ترجمه خود اضافه کنید ارور های ترجمه شده برای زبان های قابل پشتیبانی در <a href="https://github.com/hekmatinasser/verta/tree/master/src/Lang">زبان ها</a> مراجعه کنید قرار دارد .برای نمونه کد هایی که درون پکیج برای پیام خطا وجود دارد در فایل ترجمه خود قرار دهیدبرای مثال در فایل ترجمه پیام خطا به آرایه عبارات زیر را اضافه کنید</p>
|
||||
<p>شما باید پیام های خطا برای اعتبار سنجی خود در در مسیر فایل های ترجمه خود اضافه کنید ارور های
|
||||
ترجمه شده برای زبان های قابل پشتیبانی در <a
|
||||
href="https://github.com/hekmatinasser/verta/tree/master/src/Lang">زبان ها</a> مراجعه کنید
|
||||
قرار دارد .برای نمونه کد هایی که درون پکیج برای پیام خطا وجود دارد در فایل ترجمه خود قرار
|
||||
دهیدبرای مثال در فایل ترجمه پیام خطا به آرایه عبارات زیر را اضافه کنید</p>
|
||||
<pre>
|
||||
'jdate' => ':attribute تاریخ شمسی معتبر نمی باشد.',
|
||||
'jdate_equal' => ':attribute تاریخ شمسی برابر :date نمی باشد.',
|
||||
@@ -590,8 +601,10 @@ array:2 [
|
||||
</pre>
|
||||
|
||||
<h2 id="traslation">زبان ها</h2>
|
||||
<p>شما میتوانید ایام و ماه ها و پیام را به زبان های موجود در ورتا نمایش دهید برای مشاهده زبان ها پشتیبانی می شود به پوشه زیر مشاهده
|
||||
<a href="https://github.com/hekmatinasser/verta/tree/master/src/Lang">زبان ها</a> مراجعه کنید</p>
|
||||
<p>شما میتوانید ایام و ماه ها و پیام را به زبان های موجود در ورتا نمایش دهید برای مشاهده زبان ها
|
||||
پشتیبانی می شود به پوشه زیر مشاهده
|
||||
<a href="https://github.com/hekmatinasser/verta/tree/master/src/Lang">زبان ها</a> مراجعه کنید
|
||||
</p>
|
||||
<p>برای تعیین زبان پیام های از دستور زیر استفاده کنید</p>
|
||||
<pre>
|
||||
Verta::setLocale('fa');
|
||||
@@ -618,4 +631,5 @@ Verta::resetLocale();
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user