1. Go to this page and download the library: Download letsjump/workday-helper-php 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/ */
letsjump / workday-helper-php example snippets
use letsjump\workdayHelper\WorkdayHelper;
$closingDays = new WorkdayHelper('2021-01-01', '2021-01-31');
$closingDays->workingDays = [1, 2, 3, 4, 5];
echo $closingDays->getWorkdays(); // (19 days)
$closingDays = new WorkdayHelper('2021-01-01', '2021-12-31');
$closingDays->workingDays = [0, 1, 2, 3, 4, 5, 6]; // don't forget to set every day of the week!
<table>
foreach ($closingDays->getCalendar() as $holiday):
[
[1609455600] => [
[unixTimestamp] => 1609455600,
[date] => 2021-01-01, # control the format with $outputFormat property
[event] => Capodanno, # description of the event
[type] => public, #public / custom
[options] => # custom option passed by the $customClosing or the $publicHolidays Array
],
...
]
"letsjump/workday-helper-php": "~1.0.0"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.