PHP code example of smhg / date-timespan
1. Go to this page and download the library: Download smhg/date-timespan 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/ */
smhg / date-timespan example snippets
use Timespan\Timespan;
$start = new DateTime('last monday');
$end = clone $start;
$end->modify('+1 week');
$timespan = new Timespan($start, $end);
use Timespan\Timespan;
use Timespan\Collection;
$collection = new Collection();
$collection[] = new Timespan(...);