PHP code example of ssmr9dt / getdayoff
1. Go to this page and download the library: Download ssmr9dt/getdayoff 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/ */
ssmr9dt / getdayoff example snippets
$dayoff = new \ssmr9dt\GetDayOff();
$y = date("Y");
$m = date("n");
$d_c = date("t");
for ($d=1; $d<$d_c+1; $d++)
{
$do_str = $dayoff->Get($y,$m,$d) ? "dayoff" : "work";
echo $y . "/" . $m . "/" . $d . " is " . $do_str ."<br />\n";
}