PHP code example of swydmuch / business-days
1. Go to this page and download the library: Download swydmuch/business-days 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/ */
swydmuch / business-days example snippets
$day = Day::createFromString('2021-12-13', 'pl');
$day->isBusiness();
//true
$range = Range::createFromString('2021-12-13', '2021-12-14', 'pl');
$range->countBusinessDays();
//2
$range->businessDays();
//[Day,Day]