PHP code example of aliromero / nova-jalali-date-field

1. Go to this page and download the library: Download aliromero/nova-jalali-date-field 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/ */

    

aliromero / nova-jalali-date-field example snippets


use Romero\PersianDateField\PersianDate;
use Romero\PersianDateField\PersianDateTime;

PersianDate::make('DueOn')
    ->color('rgb(30, 136, 229)') // customize color
    ->format('jYYYY/jMM/jDD') // customize display format
    ->min('lastmonth') // customize min date
    ->max('today') // customize max date
    ->locale('fa,en'), // customize locale

PersianDateTime::make('PublishedAt')
    ->color('rgb(30, 136, 229)') // customize color
    ->format('jYYYY/jMM/jDD HH:mm:ss') // customize display format
    ->min('lastmonth') // customize min date
    ->max('today') // customize max date
    ->locale('fa,en'), // customize locale