kigkonsult logo

contact Contact contact

Downloads Downloads Downloads

iCal

iCalcreator iCalcreator
iCalcreator iCalcreator

iCalcreator iCalcreator iCalcreator
iCalcreator manual iCalcreator manual iCalcreator manual

rsscalCreator rsscalCreator
rsscalCreator rsscalCreator

rsscalCreator rsscalCreator rsscalCreator
rsscalCreator manual rsscalCreator manual rsscalCreator manual

Deploying examples

tinycal tinycal tinycal
iCal file web calendar

eventCreator eventCreator eventCreator
iCal file event web editor

iCal utilities

dbiCal dbiCal dbiCal
iCal database interface

iCal csv xls
iCal csvl xls

iCalcnv iCalcnv iCalcnv
iCal converting package

tiCalFile tiCalFile tiCalFile
creating iCal test files

Communities

Get iCalcreator at SourceForge.net. Fast, secure and Free Open Source software downloads
Forum Reports

Freshmeat freshmeat.net

PHP Classes

sLog

sLog sLog sLog
event tracking database

Communities

SourceForge.net Logo
Forum Reports

Resources

resources Resources resources


Credits

PHPMailer 5.1  (LGPL)
prototype 1.7 (CC BY-SA)
reCAPTCHA

Support

Our services are available for support, design and developing customizations, adaptations of PHP/MySQL solutions with a special focus on software long term utility and reliability, supported through our iterative acquire/design/transition process model.
contact Contact contact

Donate

You can show your appreciation for our free software, and can support future development by making a donation to the kigkonsult projects.

Make a donation of any size by clicking here. Thanks in advance!


Copyright ©2008-2012 kigkonsult


iCalcreator

iCalcreator is a PHP class managing iCal formatted files for non-calendar systems like CMS, project management systems and other applications able to process calendar information like agendas, tasks, reports, totos, journaling data and for communication with calendar systems and applications.

iCalcreator is built of a class file with support of a function class file and are calendar component property oriented.

iCalcreator features create, parse, edit and select calendar and calendar components.

Knowledge of calendar and rfc2445 is necessary! All functions calls are made as simple as possible BUT (, !!!,) read this rfc properly!

Download iCalcreator here.Special Offer, Boost performance!!

Howto summary

A short summary how to use iCalcreator; create, parse, edit and output.

CREATE 
CREATE 

require_once( 'iCalcreator.class.php' );
$config = array( 'unique_id' => 'kigkonsult.se' );
  // set Your unique id
$v = new vcalendar( $config );
  // create a new calendar instance

$v->setProperty( 'method', 'PUBLISH' );
  // required of some calendar software
$v->setProperty( "x-wr-calname", "Calendar Sample" );
  // required of some calendar software
$v->setProperty( "X-WR-CALDESC", "Calendar Description" );
  // required of some calendar software
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" );
  // required of some calendar software
.. .
$vevent = & $v->newComponent( 'vevent' );
  // create an event calendar component
$start = array( 'year'=>2007, 'month'=>4, 'day'=>1, 'hour'=>19, 'min'=>0, 'sec'=>0 );
$vevent->setProperty( 'dtstart', $start );
$end = array( 'year'=>2007, 'month'=>4, 'day'=>1, 'hour'=>22, 'min'=>30, 'sec'=>0 );
$vevent->setProperty( 'dtend', $end );
$vevent->setProperty( 'LOCATION', 'Central Placa' );
  // property name - case independent
$vevent->setProperty( 'summary', 'PHP summit' );
$vevent->setProperty( 'description', 'This is a description' );
$vevent->setProperty( 'comment', 'This is a comment' );
$vevent->setProperty( 'attendee', 'attendee1@icaldomain.net' );
.. .
$vevent = & $v->newComponent( 'vevent' );
  // create next event calendar component
$vevent->setProperty( 'dtstart', '20070401', array('VALUE' => 'DATE'));
  // alt. date format, now for an all-day event
$vevent->setProperty( "organizer" , 'boss@icaldomain.com' );
$vevent->setProperty( 'summary', 'ALL-DAY event' );
$vevent->setProperty( 'description', 'This is a description for an all-day event' );
$vevent->setProperty( 'resources', 'COMPUTER PROJECTOR' );
$vevent->setProperty( 'rrule', array( 'FREQ' => 'WEEKLY', 'count' => 4));
  // weekly, four occasions
$vevent->parse( 'LOCATION:1CP Conference Room 4350' );
  // supporting parse of strict rfc2445 formatted text
.. .
  // all calendar components are described in rfc2445
  // a complete iCalcreator function list (ex. setProperty) in iCalcreator manual
.. .
$v->returnCalendar();
  // redirect calendar file to browser

PARSE 
PARSE 

require_once( 'iCalcreator.class.php' );
$config = array( 'unique_id' => 'kigkonsult.se' );
  // set Your unique id, required if any component UID is missing
$v = new vcalendar( $config );
  // create a new calendar instance

/* start parse of local file */
$config = array( 'directory' => 'calendar', 'filename' => 'file.ics' );
$v->setConfig( $config );
  // set directory and file name
$v->parse();

/* start parse of remote file */
$v->setConfig( 'url', 'http://www.aDomain.net/file.ics' );
  // iCalcreator also support remote files
$v->parse();

$v->setProperty( 'method', 'PUBLISH' );
  // required of some calendar software
$v->setProperty( "x-wr-calname", "Calendar Sample" );
  // required of some calendar software
$v->setProperty( "X-WR-CALDESC", "Calendar Description" );
// required of some calendar software
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" );
  // required of some calendar software

.. .
$v->sort();
  // ensure start date order
.. .

EDIT 
EDIT 

require_once( 'iCalcreator.class.php' );
$config = array(
'unique_id'  => 'kigkonsult.se',
'directory'   => 'calendar',
'filename'   => 'file.ics' );
  // set Your unique id, import directory and file name
$v = new vcalendar( $config );
  // create a new calendar instance

$v->parse();

$v->setProperty( 'method', 'PUBLISH' );
  // required of some calendar software
$v->setProperty( "x-wr-calname", "Calendar Sample" );
  // required of some calendar software
$v->setProperty( "X-WR-CALDESC", "Calendar Description" );
// required of some calendar software
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" );
  // required of some calendar software

while( $vevent = $v->getComponent( 'vevent' )) {
  // read events, one by one
  $uid = $vevent->getProperty( 'uid' );
  // uid required, one occurence (unique id/key for component)
  .. .
  $dtstart = $vevent->getProperty( 'dtstart' );
  // dtstart required, one occurence
  .. .
  if( $description = $vevent->getProperty( 'description', 1 )) {
    // description optional, first occurence
    .. .
    // edit the description
    .. .
    $vevent->setProperty( 'description', $description, FALSE, 1 );
    // update/replace the description
  }
  while( $comment = $vevent->getProperty( 'comment' )) {
    // comment optional, may occur more than once   .. .
    // manage comments
  }
  .. .
  while( $vevent->deleteProperty( 'attendee' ))
    continue;
    // remove all ATTENDEE properties .. .
  .. .
  $v->setComponent ( $vevent, $uid );
  // update/replace event in calendar with uid as key }
.. .
.. .
// a complete iCalcreator function list
// (ex. getProperty, deleteProperty) in iCalcreator manual
.. .

SELECT 
SELECT 

require_once( 'iCalcreator.class.php' );
$config = array( 'unique_id' => 'kigkonsult.se' );
  // set Your unique id
$v = new vcalendar( $config );
  // create a new calendar instance

$v->setConfig( 'url', 'http://www.aDomain.net/file.ics' );
  // iCalcreator also support remote files
$v->parse();
$v->sort();
  // ensure start date order

$v->setProperty( 'method', 'PUBLISH' );
  // required of some calendar software
$v->setProperty( "x-wr-calname", "Calendar Sample" );
  // required of some calendar software
$v->setProperty( "X-WR-CALDESC", "Calendar Description" );
// required of some calendar software
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" );
  // required of some calendar software

$eventArray = $v->selectComponents();
  // select components occuring today
  // (including components with recurrence pattern)
foreach( $eventArray as $year => $yearArray) {
 foreach( $yearArray as $month => $monthArray ) {
  foreach( $monthArray as $day => $dailyEventsArray ) {
   foreach( $dailyEventsArray as $vevent ) {
    $currddate = $event->getProperty( 'x-current-dtstart' );
      // if member of a recurrence set,
      // returns array( 'x-current-dtstart', <DATE>)
      // <DATE> = (string) date("Y-m-d [H:i:s][timezone/UTC offset]")
    $dtstart = $vevent->getProperty( 'dtstart' );
      // dtstart required, one occurence, (orig. start date)
    $summary = $vevent->getProperty( 'summary' );
    $description = $vevent->getProperty( 'description' );
    .. .
    .. .
   }
  }
 }
}

$valueOccurr = $v->getProperty( 'CATEGORIES' );
      // fetch specific property (unique) values and number of occurrences
      // ATTENDEE, CATEGORIES, DTSTART, LOCATION, ORGANIZER,
      // PRIORITY, RESOURCES, STATUS, SUMMARY, UID

foreach( $valueOccurr as $uniqueValue => $occurr ) {
 .. .
}

$selectSpec = array( 'CATEGORIES' => 'course1' );
$specComps = $v->selectComponents( $selectSpec );
      // selects components based on specific property value(-s)
      // ATTENDEE, CATEGORIES, LOCATION, ORGANIZER,
      // PRIORITY, RESOURCES, STATUS, SUMMARY, UID
foreach( $specComps as $comp ) {
 .. .
}

OUTPUT 
OUTPUT 

require_once( 'iCalcreator.class.php' );
$config = array( 'unique_id' => 'kigkonsult.se' );
  // set Your unique id
$v = new vcalendar( $config );
  // create a new calendar instance

$v->setProperty( 'method', 'PUBLISH' );
  // required of some calendar software
$v->setProperty( "x-wr-calname", "Calendar Sample" );
  // required of some calendar software
$v->setProperty( "X-WR-CALDESC", "Calendar Description" );
  // required of some calendar software
$v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" );
  // required of some calendar software
.. .
.. .// parse calendar file(s) and/or edit/create calendar components.. .
.. .
  // opt 1
$v->returnCalendar();
  // redirect calendar file to browser

  // opt 2
$config = array( 'directory' => 'depot', 'filename' => 'calendar.ics' );
$v->setConfig( $config );
  // set output directory and file name
$v->saveCalendar();
  // save calendar to (local) file

  // opt 3
$config = array( 'url' => 'http://www.aDomain.net/file.ics' );
$v->setConfig( $config );
  // set output url
$v->saveCalendar();
  // save calendar to remote url

Many more examples.. .

Create/edit/show iCal/xCal files

iCalcreator iCalcreator iCalcreator iCalcreator rsscalCreator rsscalCreator rsscalCreator rsscalCreator

You can test iCalcreator online and produce iCal/xCal/rssCal files from a HTML form, eventCreator, create iCal event file on-the-fly, example of how to employ iCalcreator in software development.

An example how to present and display information, tinycal, from iCal files, using iCalcreator class in the server software.

Free images

Click on an image to download. To download all, click here!

iCalcreator iCalcreator iCalcreator iCalcreator iCalcreator iCalcreator iCalcreator

rsscalCreator rsscalCreator rsscalCreator rsscalCreator rsscalCreator

rdf rss rss1 rss2 rss2

csv csv xls xls

News

30/12 2011 New release of iCalcnv 3.0

Release summary: 
  • iCalcnv is reworked into a single class, using a simple configuration set method.
  • the former main functions; iCal2csv, iCal2xls and cvs2iCal are now public methods in the class.
  • an iCalcreator vcalendar instance can be used as input (iCal2csv, iCal2xls) or returned as output (cvs2iCal) to ease up integration with iCalcreator
  • PEAR Log (or eClog) is supported

4/12 2011 New minor subrelease of dbiCal 3.0.5

Release summary: 
  • new functionality
    Concatenating all class files into one file
  • update of functions
    Changed 2nd argument to dbiCal select method: using iCalcreator vcalendar array config format
    admin interface (, when using compare) removing unnecessary parse, sort and save
    testing byte encoded class file(-s)
  • fixed bugs in
    admin interface (config tab) when log file is defined but not created

23/11 2011 New subrelease of iCalcreator 2.10.23

Release summary: 
  • fixed bugs
    function selectComponents; RECURRENCE-ID management
  • updated user guide
    UTC timezone usage
    relationship between getProperty/selectComponents functions
    other minor clarifications

15/11 2011 tinycal v3.0

Release summary: 

tinycal v3.0, ported to jQuery JavaScript Library v1.4.4 for display and Axaj logics.

14/11 2011 New subrelease of iCalcreator 2.10.20

Release summary: 
  • update of functions
    xcal (xml) format update
    function setConfig (component level), setting 'nl' always before 'format'
  • fixed bugs
    selectComponents with last arguments (false, true, false)
    iCalUtilityFunctions::_recur2date, FREQ=YEARLY + BYDAY - combination
    returnCalendar; removing Content-Length header
  • updated user guide etc.

21/10 2011 New subrelease of iCalcreator 2.10.15

Release summary: 
  • new functionality
    Evaluate, test and use of ionCube php byte file encoder
  • update of functions
    selectComponents, changed order of generating components
    setSequence, value 0 (zero) first value
    setConfig, force setting of Directory before Filename
    _size75, updated management of line folding (again.. .)
  • fixed bugs
    _size75, typo error
    _makeDtstamp, typo error
    selectComponents, setting start/end-dates (x-prop) for events longer than 24h
  • updated using manual
    missing links, STATUS etc

8/10 2011 Beta test tinycal v3.0

Release summary: 

tinycal v3.0, ported to jQuery JavaScript Library v1.4.4 for display and Axaj logics.

Please feel free to take a look and test it here and use the contact page and communicate your opinion! Preliminary release date is late October.

7/10 2011 New release of tiCalFile 2.4

Release summary: 

A file locking mechanism is implemented to avoid parallel excutions.

7/10 2011 New release of eClog 2.0

Release summary: 

Extended version supporting singleton pattern, simplified log calls etc.

5/8 2011 New subrelease of iCalcreator 2.10.5

Release summary: 
  • new functionality
    transform a datetime from a timezone to another using PHP DateTime and DateTimeZone class (PHP >= PHP 5.2.0)
  • update of functions
    parse, ensure (vtimezone) standard/daylight component order
    iCalUtilityFunctions::createTimezone, creating RRULEs
    iCalUtilityFunctions::_setDate
  • fixed bugs
    adaptation for PHP STRICT error_reporting
  • updated using manual

15/7 2011 New release of iCalcreator 2.10

Release summary: 
  • new functionality
    getProperty, sort, getComponent and selectComponents with new arguments: Attendee, Categories, DTSTAMP, Location, Organizer, Priority, Resources, Status, Summary properties
    simple create of timezone (including standard/daylight) component
    auto completion of (default) timezone when setting DTEND, DTSTART, DUE, RECURRENCE-ID
    new arguments for utf8 encoding and gzencode in function returnCalendar
  • update of
    get- and setfunctions for properties with numeric (integer) content
    parse, management of line folding when parsing
    getProperty and deleteProperty, management of properties with multiple ocurrence
    parse on calendar level, set config when creating new component etc
    setfunctions for DTEND, DTSTART, DUE, RECURRENCE-ID
    update of getConfig and all config setting on calendar and component level
    calendar property VERSION always first in calendar
  • fixed bugs in
    iCalUtilityFunctions::_duration2date
    selectComponents
    setFreebusy
    createAttendee
    TRIGGER with no duration
    iCalUtilityFunctions::_recur2date(, _setRexrule), BYSETPOS
  • updated using manual

As usual, exhaustive regression tests has been executed to verify the release as well as external beta testing.

18/6 2011 iCalcreator 2.10 Beta test, Closed

Summary: 

The iCalcreator 2.10 beta test period has started, if you are interested to have a look and squeeze on iCalcreator v2.10rc2 package, please use the contact page.

Planned official release date is mid July.

  • updated management of line folding
  • updated functions getProperty, sort, SelectComponents, works with Attendee, Categories, (dtstamp, ) Location, Organizer, Priority, Resources, Status and Summary properties
  • simple create of timezone (including standard/daylight) component(-s)
  • auto completion of (default) timezone when setting DTEND, DTSTART, DUE, RECURRENCE-ID
  • management of properties with numeric (integer) content; PERCENT-COMPLETE, PRIORITY, REPEAT, SEQUENCE, X-PROP
    bug in function iCalUtilityFunctions::_duration2date
    bug in function selectComponents
    bug in function createAttendee
    bug when using TRIGGER with no duration
    bug in function SelectComponents regarding X-CURRENT-*-values
    bug in function setFreebusy, empty property
    bug in function setFreebusy if property is empty.. .

6/3 2011 New release of tiCalFile 2.2

Release summary: 
  • Offer extended property parameter setting.

1/3 2011 New release of dbiCal 3.0

Release summary: 

After a successfull beta release test period, the official release.

  • supporting ALL calendar information; timezone, event, todo, journal and freebusy components with all properties, including x-properties.
  • using pear MDB2 as database API and iCalcreator (2.8) as the calendar information API, opt pear Log
  • simple interface functions; insert, select, delete and calendar information
  • includes a web admin page, offering ability to upload, insert, examine (file), inspect (db), removal and compare of calendar files.
  • changed licence to LGPL.

28/1 2011 dbiCal 3.0rc2 Beta test

Summary: 

dbiCal has during the beta tests been extended to

  • support storage of metadata, ex. calendar/user references (or preferences)
  • include web administrator interface

Please contact if you would like to participarte!

24/1 2011 eventCreator 2.4rc is available for Beta testing.

Summary: 
  • Test online
  • Please contact if you would like to download and test!

16/1 2011 New release of tinycal 2.4.1

Release summary: 
  • adapt for prototype 1.7 javascript framework
  • time (date) display in component view
  • includes alarms in non-total downloads

9/1 2011 dbiCal 3.0rc Beta test

Summary: 

dbiCal is a PHP database backend solution storing (multiple) iCal calendar files in a database using pear MDB2 as database API and iCalcreator 2.8 as the API for calendar information.

Please contact if you would like to participarte!

8/1 2011 New release of tinycal 2.4

Release summary: 
  • The 2.4 version is updated to use iCalcreator 2.8 and javascript adaptations.
  • Supports en, fr, it and se languages.

6/1 2011 New release of iCalcreator 2.8

Release summary: 
  • new factory-method for creating components
  • simplified configuration
  • utility (static) functions collected in support class
  • refactored sort and selectComponents functions
  • multibyte character support (opt. mb_string)
  • value (protocol) prefix (Attendee, Organizer etc.)
  • a major number of minor bugs fixed e.g. date (UTC), text properties, duration
  • updated using manual

As usual, exhaustive regression tests has been executed to verify the release.

Release news

New release of iCalcreator 2.10.5
A major release comprising iCalcreator 2.8, 2.10 and 2.10.5
New:
- new factory-method for creating components
(Mon, 08 Aug 2011 13:46:31 GMT)
iCalcreator-2.6 extensions: tinycal, dbiCal, iCalcnv
tinycal is a small HTML calendar box, displaying calendar information from local and/or remote calendar files or even urls, ex. Google calendar. tinycal displays calendar information in a month, week, day, list or component view, only 220px in width
(Sat, 14 Feb 2009 18:42:26 GMT)
iCalcreator version 2.6 released 23/11 2008
iCalcreator is a PHP class managing iCal formatted files for non-calendar systems like CMS, project management systems and other applications able to process calendar information like agendas, tasks, reports, totos, journaling data and for communication with calendar systems and applications.
(Sun, 23 Nov 2008 16:28:46 GMT)
iCalcreator version 2.4.3 released 18/2 2008
- Function selectComponents
For all recurrence instances for a calendar component, an x-property, &quot;x-current-dtstart&quot; and opt. also &quot;x-current-dtend&quot; alt. &quot;x-current-due&quot;,
has been created with a TEXT content,
(Mon, 18 Feb 2008 21:28:26 GMT)
iCalcreator version 2.4 released 9/1 2008
New functionality
- New function for selection of components within date period
- support of remote files, update functions saveCalendar, parse and useCachedCalendar
(Wed, 09 Jan 2008 21:26:47 GMT)
iCalcreator version 2.2.8 released 10/9 2007
Updated functions
- major correction/refine sort function
- update of UID to include microseconds, used in sort
(Mon, 10 Sep 2007 19:46:17 GMT)
iCalcreator version 2.2.6 released 5/8 2007
Updated functions
- iCal files merge,
- date managing, header cache directives etc,
(Sun, 05 Aug 2007 07:27:53 GMT)
iCalcreator version 2.2 released 14/7 2007
iCalcreator 2.2 new functions
- iCal file sort
(Sat, 14 Jul 2007 11:13:21 GMT)
version 2.0 released 25/5 2007
iCalcreator 2.0 supports iCal calendar file create, parse and edit.
(Sat, 26 May 2007 19:34:29 GMT)
version 1.0 released 21/4 2007
Due to the low frequence of bug-reports, here is iCalcreator 1.0, finaly!!
This is, as usual, a minor bugfix and function update version:
(Sat, 21 Apr 2007 21:19:20 GMT)