PHP code example of karnoweb / livewire-datepicker
1. Go to this page and download the library: Download karnoweb/livewire-datepicker library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
karnoweb / livewire-datepicker example snippets
use function Karnoweb\LivewireDatepicker\gregorian_to_jalali;
use function Karnoweb\LivewireDatepicker\jalali_to_gregorian;
// Gregorian to Jalali: year, month, day
$j = gregorian_to_jalali(2024, 3, 20);
// ['year' => 1403, 'month' => 1, 'day' => 1]
// Jalali to Gregorian
$g = jalali_to_gregorian(1403, 1, 1);
// ['year' => 2024, 'month' => 3, 'day' => 20]