PHP code example of mayflower / holiday
1. Go to this page and download the library: Download mayflower/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/ */
mayflower / holiday example snippets
days = new Holiday\Germany();
// Returns array of Holiday objects, if any between the given dates.
$holidays->between(
new \DateTime('01.01.2018'),
new \DateTime('31.12.2018')
);
// isHoliday calls ->between with the given date to both parameters.
$holidays->isHoliday(new \DateTime('01.05.2018'))