PHP code example of troglodyte / business-days
1. Go to this page and download the library: Download troglodyte/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/ */
troglodyte / business-days example snippets
use troglodyte\BusinessDays
$dt = new BusinessDays();
$num_days = $dt->getBusinessDays('01/01/2017', '01/03/2017'); // returns (int) 2
// or
$num_days = BusinessDays::getBusinessDays('01/01/2017', '01/03/2017'); // returns (int) 2