PHP code example of michalmanko / php-library-holiday

1. Go to this page and download the library: Download michalmanko/php-library-holiday 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/ */

    

michalmanko / php-library-holiday example snippets


$providerByIso = \Michalmanko\Holiday\HolidayFactory::createProvider('PL');
$providerByCountry = \Michalmanko\Holiday\HolidayFactory::createProvider('Poland');
$providerByClassName = \Michalmanko\Holiday\HolidayFactory::createProvider('\\Michalmanko\\Holiday\\Provider\\Poland');

$provider = \Michalmanko\Holiday\HolidayFactory::createProvider('PL');
$holidays = $provider->getHolidays(new \DateTime('2014-01-01'));