PHP code example of softcreatr / polyfill-calendar

1. Go to this page and download the library: Download softcreatr/polyfill-calendar 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/ */

    

softcreatr / polyfill-calendar example snippets



o = cal_info(CAL_GREGORIAN);
$jd = gregoriantojd(4, 22, 2000);
$easter = easter_date(2000);
$hebrew = jdtojewish($jd, true, CAL_JEWISH_ADD_GERESHAYIM);


use Roukmoute\Polyfill\Calendar\Calendar;
use Roukmoute\Polyfill\Calendar\Easter;
use Roukmoute\Polyfill\Calendar\Gregor;
use Roukmoute\Polyfill\Calendar\Julian;

$info = Calendar::cal_info(Calendar::CAL_GREGORIAN);
$jd = Gregor::toSDN(2000, 4, 22);
$gregorian = Julian::jdtogregorian($jd);
$daysAfterMarch21 = Easter::easter_days(2000);

putenv('TZ=UTC');
date_default_timezone_set('UTC');
sh
XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text --show-uncovered-for-coverage-text