PHPackages                             tkr/ical - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. tkr/ical

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

tkr/ical
========

iCalendar ics parser. License: CC-BY-SA-DK

1.0.1(5y ago)1153CC-BY-SA-DKPHPPHP &gt;=5.3.0

Since May 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/TKr/intouch-iCalendar)[ Packagist](https://packagist.org/packages/tkr/ical)[ RSS](/packages/tkr-ical/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

```
make dev - install all dev required packages and composer
make test - run all tests
make test_blocks - run all blocks tests
make test_helpers - run all helpers tests
make get_composer - upgrade composer version

------
This code is forked from original one, below is old, deprecated README
------

A simple and fast ICal parser.
-------------------------------------------------------------------------------

This library is based on http://github.com/fangel/SG-iCalendar but
updated for PHP 5.3+ namespaces.  The re-organization is different enough
that I renamed the top-level namespace to intouch from SG, but so far
nothing was changed code-wise from the original fork, except:

- namespaced class names replace original ones
- build.cmd and build.sh removed, assume a PSR-0 style autoload env
- composer.json added
- demo updated to fetch jquery, fullcalendar and an up to date ICS file from
  the network

-------------------------------------------------------------------------------

A simple example :

 use intouch\ical\ICal;
 $ical = new ICal( "./basic.ics" );
 //or
 $ical = new ICal( "http://example.com/calendar.ics" );
 foreach( $ical->getEvents() As $event ) {
   // Do stuff with the event $event
 }

To check unit tests with phpunit, goto tests/ directory and :
 phpunit AllTests
 phpunit helpers/FreqTest
 ./test.sh

-------------------------------------------------------------------------------
CHANGELOG :
-------------------------------------------------------------------------------

current (12 may 2013)
 + converted to PHP 5.3+ namespace intouch\ical

0.7.0 (30 oct 2010)
 + ical EXDATE support (excluded dates in a range)
 + $event->isWholeDay()
 + getAllOccurrences() for repeated events
 + implemented a cache for repeated events

0.6.0 (29 oct 2010)
 + Added demo based on fullcalendar
 + Added duration unit tests
 + Support of Recurrent events in query Between()
 * various fixes on actual (5) issues

-------------------------------------------------------------------------------
TODO :
-------------------------------------------------------------------------------

(this is from the original repo, now on my TODO ...)

These ICal keywords are not supported for the moment :
 - RECURRENCE-ID : to move one event from a recurrence
 - EXRULE : to exclude multiple days by a complex rule

Also, multiple RRULE could be specified for an event,
but that is not the case for most calendar applications

-------------------------------------------------------------------------------
To get more information about ical format and rules :
see http://www.ietf.org/rfc/rfc2445.txt
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1607 days

Total

2

Last Release

2064d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8507166b226f9bc046656a327fa687435e0525b240fc2d8e64dea2181fef52ae?d=identicon)[TKr](/maintainers/TKr)

---

Top Contributors

[![tpruvot](https://avatars.githubusercontent.com/u/145119?v=4)](https://github.com/tpruvot "tpruvot (44 commits)")[![fangel](https://avatars.githubusercontent.com/u/19275?v=4)](https://github.com/fangel "fangel (36 commits)")[![TKr](https://avatars.githubusercontent.com/u/128437?v=4)](https://github.com/TKr "TKr (13 commits)")[![xonev](https://avatars.githubusercontent.com/u/142312?v=4)](https://github.com/xonev "xonev (11 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (3 commits)")[![jonny-no1](https://avatars.githubusercontent.com/u/282458?v=4)](https://github.com/jonny-no1 "jonny-no1 (1 commits)")[![ecentinela](https://avatars.githubusercontent.com/u/13818?v=4)](https://github.com/ecentinela "ecentinela (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tkr-ical/health.svg)

```
[![Health](https://phpackages.com/badges/tkr-ical/health.svg)](https://phpackages.com/packages/tkr-ical)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
