PHP code example of jalali-events / event

1. Go to this page and download the library: Download jalali-events/event 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/ */

    

jalali-events / event example snippets


use JalaliEvents\DateEvent;

$date = '2020-11-03';

return DateEvent::day($date);

use JalaliEvents\DateEvent;

$date = '1399-08-13';

return DateEvent::day($date, 'jalali');

use JalaliEvents\DateEvent;

$start_date = '2020-11-03';
$end_date = '2020-11-04';

return DateEvent::startEndDate($start_date, $end_date);

use JalaliEvents\DateEvent;

$start_date = '1399-08-13';
$end_date = '1399-08-14';

return DateEvent::startEndDate($start_date, $end_date, 'jalali');