Skip to content
Switch branches/tags

PHP iCal Parser

GitHub Workflow Status Latest Stable Version Total Downloads Latest Unstable Version License

Internet Calendaring Parser rfc2445 or iCal parser is simple PHP 7.4+ class for parsing format into array.

How to install

The recommended way to is via Composer:

composer require om/icalparser

Usage and example

use om\IcalParser;
require_once '../vendor/autoload.php';

$cal = new IcalParser();
$results = $cal->parseFile(

foreach ($cal->getEvents()->sorted() as $event) {
	printf('%s - %s' . PHP_EOL, $event['DTSTART']->format('j.n.Y'), $event['SUMMARY']);

You can run example with PHP Built-in web server as follow:

php -S localhost:8000 -t example


  • PHP 7.4+

Run tests

iCal parser using Nette Tester. The tests can be invoked via composer.

composer update
composer test