PHP code example of kucharovic / czech-holidays

1. Go to this page and download the library: Download kucharovic/czech-holidays 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/ */

    

kucharovic / czech-holidays example snippets



JK\Utils\CzechHolidays;
use DateTimeImmutable;

$day = DateTimeImmutable::createFromFormat('Y-m-d', '2018-01-01');

var_dump(CzechHolidays::isHoliday($day)); // bool(true)
echo CzechHolidays::getHolidayName($day) // Nový rok


JK\Utils\CzechHolidays;
use DateTimeImmutable;

$day = DateTimeImmutable::createFromFormat('Y-m-d', '2018-01-01');

var_dump(CzechHolidays::isHoliday($day)); // bool(true)
echo CzechHolidays::getHolidayName($day) // Nový rok