PHPackages                             tentwofour/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tentwofour/ical

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tentwofour/ical
===============

Provides easy, OO-based iCal generation.

033PHP

Since Jul 30Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Easy iCal Generation
====================

[](#easy-ical-generation)

```
use Doctrine\Common\Collections\ArrayCollection;
use Ten24\Component\Ical\Attendee
use Ten24\Component\Ical\Calendar
use Ten24\Component\Ical\Event

// Rely on date_default_timezone_get()
$c = new Calendar();

// Or pass your own
$c = new Calendar('America/Regina');

// Create a basic event via constructor method
$e1 = new Event(
  'Event Name',
  new \DateTime('2014-01-01 09:00:00'),
  new \DateTime('2014-01-01 10:00:00'),
  new ArrayCollection([
    new Attendee('Ian Bool', 'bool.ian@nowhere.com'),
    new Attendee('Bill Incognito', 'bill.incognito@nowhere.com')
  ]),
  'my-guid');

// Add the event to the calendar
$c->addEvent($e1);

// Or, more complete
$e2 = new Event(
  'Top Secret Event',
  new \DateTime('2014-01-01 09:00:00'),
  new \DateTime('2014-01-01 10:00:00'),
  new ArrayCollection([
    new Attendee('Ian Bool', 'bool.ian@nowhere.com'),
    new Attendee('Bill Incognito', 'bill.incognito@nowhere.com')
  ]),
  'my-guid')
  ->setLocation('Top Secret Location')
  ->setDescription('Trust noone.')
  ->setStatus(Event::STATUS_IN_PROCESS)
  ->setClass(Event::CLASS_PRIVATE)
  //...
  ->setTransparency(Event::TRANSPARENCY_TRANSPARENT);

// Add the event to the calendar
$c->addEvent($e2);

// Or by array, useful when pulling from a db, and hydrating as an array
$events = [[
  'name' => 'Top Secret Event',
  'startDate' => new \DateTime('2014-01-01 09:00:00')
  'endDate' => new \DateTime('2014-01-01 09:00:00'),
  'location' => 'Top Secret Location'
  //...
  ],
  [
  'name' => 'Top Secret Event 2',
  'startDate' => new \DateTime('2014-01-01 09:00:00')
  'endDate' => new \DateTime('2014-01-01 09:00:00'),
  'location' => 'Top Secret Location'
  //...
  ]];

foreach($events as $event)
{
  $e = new Event();
  $c->addEvent($e->fromArray($event));
}

// Get the generated calendar
$icalData = $c->generate();
```

Running Tests
=============

[](#running-tests)

```
composer install
phpunit -c phpunit.xml.dist
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d8857f054ee361525938a1158bc30970476b45f882878a8b8b2bdb87a9fe217?d=identicon)[tentwofour](/maintainers/tentwofour)

---

Top Contributors

[![tentwofour](https://avatars.githubusercontent.com/u/4117615?v=4)](https://github.com/tentwofour "tentwofour (5 commits)")

### Embed Badge

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

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

PHPackages © 2026

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