PHP code example of endroid / calendar
1. Go to this page and download the library: Download endroid/calendar 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/ */
endroid / calendar example snippets
use Endroid\Calendar\Reader\IcalReader;
$reader = new IcalReader();
// Read from URL or path
$calendar = $reader->readFromUrl('https://domain/calendar.ics');
$calendar = $reader->readFromPath(__DIR__.'/calendar.ics');
$dateStart = new \DateTimeImmutable('2016-01-01');
$dateEnd = new \DateTimeImmutable('2016-12-31');
$events = $calendar->getEvents($dateStart, $dateEnd);