PHP code example of natitech / businesscal
1. Go to this page and download the library: Download natitech/businesscal 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/ */
natitech / businesscal example snippets
//You can pick up a holiday calendar from Nati\Businesscal\Holidays namespace or create your own implementing Nati\Businesscal\Holidays\HolidaysCalendar
$calendar = new Nati\Businesscal\BusinessCalendar(new FrHolidaysCalendar);
//To know if a given date is a business day
$calendar->isBusinessDay(new \DateTimeImmutable());
//To add some business days to a given date
$calendar->addNbBusinessDaysTo(new \DateTimeImmutable(), 20);