Skip to content

TKr/intouch-iCalendar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A PHP5.3+ iCalendar parser

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.0%
  • Other 1.0%