PHP code example of palmabit / holidays
1. Go to this page and download the library: Download palmabit/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/ */
palmabit / holidays example snippets
php
$year = 2025;
/*
* Current year is set if no argument are passed.
*/
$holidays = new Palmabit\Holidays\Holidays($year);
php
Palmabit\Holidays\Holidays::setYear($year);
$holidays = new Holidays();
php
$holidays = new Palmabit\Holidays\Holidays(2016);
/*
* return an array of all italian holidays
*/
$it_holidays = $holidays
->setCountry('it_IT')
->all();