1. Go to this page and download the library: Download spyrmp/working-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/ */
$carbon = Carbon::make('2022-01-03'); // First day of the week
$workingDays = \WorkingDays::getWorkingDays($carbon);
dd($workingDays); // Carbon[]|[]
$carbon = Carbon::make('2022-01-03'); // First day of the week
$nonWorkingDays = \WorkingDays::getNonWorkingDays($carbon);
dd($nonWorkingDays); // Carbon[]|[]