Internet Calendaring Parser rfc2445 or iCal parser is simple PHP 5.6+ class for parsing format into array.
composer require om/icalparser
<?php
require_once '../vendor/autoload.php';
$cal = new \om\IcalParser();
$results = $cal->parseFile(
'https://www.google.com/calendar/ical/cs.czech%23holiday%40group.v.calendar.google.com/public/basic.ics'
);
foreach ($cal->getSortedEvents() as $r) {
echo sprintf(' <li>%s - %s</li>' . PHP_EOL, $r['DTSTART']->format('j.n.Y'), $r['SUMMARY']);
}
- PHP 7.0+
iCal parser using Nette Tester. The tests can be invoked via composer.
composer update
composer tests
- add ATTENDEE support https://www.kanzaki.com/docs/ical/attendee.html