Location: PHPKode > scripts > iCalcreator > ical-creator/using.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>iCalcreator 2.4.3 manual</title>
<meta name="author"      content="Kjell-Inge Gustafsson - kigkonsult" />
<meta name="copyright"   content="2007-2008 Kjell-Inge Gustafsson - kigkonsult" />
<meta name="keywords"    content="ical, calendar, calender, xcal, xml, icalender, rfc2445, vcalender, php, create" />
<meta name="description" content="iCalcreator" />
<style type="text/css">
* {
  BACKGROUND-COLOR: white;
  COLOR           : black;
}
a {
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : small;
}
body {
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : small;
  MARGIN          : 10px;
  WIDTH           : 600px;
}
h1 {
  BACKGROUND-COLOR: silver;
  BORDER          : thin solid black;
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : x-large;
  FONT-WEIGHT     : bold;
  DISPLAY         : block;
}
h2 {
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : large;
}
h3 {
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : medium;
}
h4 {
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : small;
  FONT-WEIGHT     : bold;
}
h5 {
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : small;
  FONT-WEIGHT     : normal;
  TEXT-DECORATION : underline;
}
p {
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : small;
}
.center {
  TEXT-ALIGN      : center;
}
.comment {
  background-color: transparent;
  FONT-FAMILY     : monospace;
  FONT-SIZE       : medium;
  FONT-STYLE      : italic;
  FONT-WEIGHT     : 300;
  LETTER-SPACING  : 0.1em;
  WHITE-SPACE     : pre;
}
.format {
  background-color: #DCDCDC;
  FONT-FAMILY     : Courier, "Courier New";
  FONT-SIZE       : small;
  FONT-WEIGHT     : 500;
  WHITE-SPACE     : pre;
}
.header {
  BACKGROUND-COLOR: silver;
  BORDER          : thin solid black;
  FONT-FAMILY     : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
  FONT-SIZE       : xx-large;
  WIDTH           : 600px;
}
.label {
  FONT-FAMILY     : arial;
  FONT-SIZE       : small;
  FONT-WEIGHT     : bold;
  LETTER-SPACING  : 0.1em;
}
.ref {
  background-color: transparent;
  FONT-FAMILY     : monospace, arial;
  FONT-SIZE       : x-small;
  FONT-STYLE      : italic;
  FONT-WEIGHT     : 500;
  VERTICAL-ALIGN  : top;
  LETTER-SPACING  : 0.1em;
}
</style>
</head>
<body>
<a name="top"></a>
<p class="header">iCalcreator 2.4.3</p>
iCalcreator class v2.4.3<br />
copyright (c) 2007-2008 Kjell-Inge Gustafsson, kigkonsult<br />
<a href="http://www.kigkonsult.se/iCalcreator/index.php" title="www.kigkonsult.se/iCalcreator" target="_blank">www.kigkonsult.se/iCalcreator</a><br />
hide@address.com<br />

<h2>Description:</h2>
iCalcreator is a PHP implementation of RFC2445/RFC2446 to manage iCal/xCal formatted files.
<br />

<a name="INTRO"></a><h1>1. INTRO</h1>
<p>
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.
</p>
<p>
iCalcreator features create, parse, edit and select calendar and calendar components.
</p>
<p>
iCalcreator is built of a single class file with a simple interface and are calendar component property oriented. Development environment is PHP version 5.x but coding is done to meet 4.x backward compability.
</p>
<h2>Ical</h2>
<p>
A short iCal description is found at <a href="http://en.wikipedia.org/wiki/ICalendar#Core_object" title="iCalendar From Wikipedia, the free encyclopedia">Wikipedia</a>. If You are not familiar with iCal, read this first!<br />
Knowledge of calendar protocol rfc2445/rfc2446  is to recommend;<br />
<a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445">rfc2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar)<br /> <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2446" title="RFC2446">rfc2446</a> - iCalendar Transport-Independent Interoperability Protocol (iTIP) Scheduling Events, BusyTime, To-dos and Journal Entries <br />
All functions calls are made as simple as possible BUT (, !!!,) read these rfc's properly!
</p>
<p>
Get RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) at <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445 in text format"><b>text</b></a>
and <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" target="_blank"><b>HTML</b></a> format,
RFC2446 - iCalendar Transport-Independent Interoperability Protocol (iTIP) Scheduling Events, BusyTime, To-dos and Journal Entries in <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2446" title="RFC2446 in text format"><b>text</b></a> format.
</p>
<p>
xCal (iCal xml) output format is supported but still experimental.
</p>
<h2>Addendum</h2>
<p>
Download iCalcreator <a title="download iCalcreator coding samples" href="http://www.kigkonsult.se/downloads/index.php" target="_blank">coding samples</a>.
<br />
Examples how to employ iCalcreator in software development:<br />
<a title="Create iCal event file on-demand from form" href="http://www.kigkonsult.se/eventCreator/index.php" target="_blank">The iCal file event editor</a>
<br />
<a title="Create iCal file on-demand from form" href="http://www.kigkonsult.se/iCalcreator/HTMLiCal/index.php" target="_blank">Create complex iCal file on-the-fly</a>
</p>
<p>
There are free iCal/xCal icons in the images directory, to use as buttons on a webpage.
</p>
<p>In this manual<p>
<p class="format">this font and background is used for PHP format and coding examples<p>
<P class="comment"> // this font is used for format/example details and comments</p>
<p>
The command coding examples are only examples, recommendation is to use a
coding standard, the following, incomplete, list is a good start;
<a href="http://www.dagbladet.no/development/phpcodingstandard/" target="_blank">http://www.dagbladet.no/development/phpcodingstandard/</a>

<a href="http://ez.no/ezpublish/documentation/development/standards/php" target="_blank">http://ez.no/ezpublish/documentation/development/standards/php</a>

<a href="http://framework.zend.com/manual/en/coding-standard.html" target="_blank">http://framework.zend.com/manual/en/coding-standard.html</a>

<a href="http://gforge.org/docman/view.php/1/2/coding-standards.html" target="_blank">http://gforge.org/docman/view.php/1/2/coding-standards.html</a>

<a href="http://pear.php.net/manual/en/standards.php" target="_blank">http://pear.php.net/manual/en/standards.php</a>
</p>
<a name="INDEX"></a><h2>1.1 INDEX</h2>

<a href="#INTRO">1. INTRO</a><br />
<a href="#INDEX">1.1 INDEX</a><br />
<a href="#INSTALL">1.2 INSTALL</a><br />
<br />
<a href="#Calendar_Component_list">2. Calendar Component list</a><br />
<a href="#VCALENDAR">2.1 VCALENDAR</a><br />
<a href="#VEVENT">2.2 VEVENT</a><br />
<a href="#VTODO">2.3 VTODO</a><br />
<a href="#VJOURNAL">2.4 VJOURNAL</a><br />
<a href="#VFREEBUSY">2.5 VFREEBUSY</a><br />
<a href="#VALARM">2.6  VALARM</a><br />
<a href="#VTIMEZONE">2.7  VTIMEZONE</a><br />
<br />
<a href="#Function_list">3. Function list</a><br />
<a href="#Calendar_object_functions">3.1 Calendar object functions</a><br />
<a href="#Calendar_object_constructors">3.1.1 Calendar object constructors</a><br />
<a href="#vevent">3.1.1.1 vevent</a><br />
<a href="#vtodo">3.1.1.2 vtodo</a><br />
<a href="#vjournal">3.1.1.3 vjournal</a><br />
<a href="#vfreebusy">3.1.1.4 vfreebusy</a><br />
<a href="#valarm">3.1.1.5 valarm</a><br />
<a href="#vtimezone">3.1.1.6 vtimezone</a><br />
<br />
<a href="#Calendar_property_functions">3.1.2 Calendar property functions</a><br />
<a href="#deleteProperty">3.1.2.1 deleteProperty</a><br />
<a href="#getProperty">3.1.2.2 getProperty</a><br />
<a href="#setProperty">3.1.2.3 setProperty</a><br />
<a href="#CALSCALE">3.1.2.4 CALSCALE</a><br />
<a href="#METHOD">3.1.2.5 METHOD</a><br />
<a href="#VERSION">3.1.2.6 VERSION</a><br />
<a href="#X-PROPERTY">3.1.2.7 X-PROPERTY</a><br />
<br />
<a href="#Calendar_component_functions">3.1.3 Calendar component functions</a><br />
<a href="#deleteComponent">3.1.3.1 deleteComponent</a><br />
<a href="#getComponent">3.1.3.2 getComponent</a><br />
<a href="#selectComponents">3.1.3.3 selectComponents</a><br />
<a href="#setComponent">3.1.3.4 setComponent</a><br />
<br />
<a href="#Calendar_inputoutput_functions">3.1.4 Calendar input/output functions</a><br />
<a href="#parse_merge">3.1.4.1 parse and merge</a><br />
<a href="#createCalendar">3.1.4.2 createCalendar</a><br />
<a href="#returnCalendar">3.1.4.3 returnCalendar</a><br />
<a href="#saveCalendar">3.1.4.4 saveCalendar</a><br />
<a href="#sort">3.1.4.5 sort</a><br />
<a href="#useCachedCalendar">3.1.4.6 useCachedCalendar</a><br />
<br />
<a href="#Calendar_configuration_functions">3.1.5 Calendar configuration functions</a><br />
<a href="#allowEmpty">3.1.5.1 Allow empty components</h4><br />
<a href="#Compsinfo">3.1.5.2 Component information</h4><br />
<a href="#Delimiter">3.1.5.3 Delimiter</a><br />
<a href="#Directory">3.1.5.4 Directory</a><br />
<a href="#Fileinfo">3.1.5.5 Fileinfo</a><br />
<a href="#Filename">3.1.5.6 Filename</a><br />
<a href="#Filesize">3.1.5.7 Filesize</a><br />
<a href="#Format">3.1.5.8 Format</a><br />
<a href="#Language">3.1.5.9 Language</a><br />
<a href="#NewlineChar">3.1.5.10 NewlineChar</a><br />
<a href="#Unique_id">3.1.5.11 Unique_id</a><br />
<a href="#URL">3.1.5.12 URL</a><br />
<br />
<a href="#Calendar_misc_functions">3.1.6 Calendar misc. functions</a><br />
<a href="#validDate">3.1.6.1 validDate</a><br /><br />
<br />
<a href="#Calendar_component_object_property_function_list">3.2 Calendar component/object property function list</a><br />
<a href="#deleteProperty_PROP">3.2.1 deleteProperty</a><br />
<a href="#getProperty_PROP">3.2.2 getProperty</a><br />
<a href="#parse">3.2.3 parse</a><br />
<a href="#setProperty_PROP">3.2.4 setProperty</a><br />
<a href="#ACTION">3.2.5 ACTION</a><br />
<a href="#ATTACH">3.2.6 ATTACH</a><br />
<a href="#ATTENDEE">3.2.7 ATTENDEE</a><br />
<a href="#CATEGORIES">3.2.8 CATEGORIES</a><br />
<a href="#CLASS">3.2.9 CLASS</a><br />
<a href="#COMMENT">3.2.10 COMMENT</a><br />
<a href="#COMPLETED">3.2.11 COMPLETED</a><br />
<a href="#CONTACT">3.2.12 CONTACT</a><br />
<a href="#CREATED">3.2.13 CREATED</a><br />
<a href="#DESCRIPTION">3.2.14 DESCRIPTION</a><br />
<a href="#DTEND">3.2.15 DTEND</a><br />
<a href="#DTSTAMP">3.2.16 DTSTAMP</a><br />
<a href="#DTSTART">3.2.17 DTSTART</a><br />
<a href="#DUE">3.2.18 DUE</a><br />
<a href="#DURATION">3.2.19 DURATION</a><br />
<a href="#EXDATE">3.2.20 EXDATE</a><br />
<a href="#EXRULE">3.2.22 EXRULE</a><br />
<a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a><br />
<a href="#GEO">3.2.23 GEO</a><br />
<a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a><br />
<a href="#LOCATION">3.2.25 LOCATION</a><br />
<a href="#ORGANIZER">3.2.26 ORGANIZER</a><br />
<a href="#PERCENTCOMPLETE">3.2.27 PERCENTCOMPLETE</a><br />
<a href="#PRIORITY">3.2.28 PRIORITY</a><br />
<a href="#RDATE">3.2.29 RDATE</a><br />
<a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a><br />
<a href="#RELATED-TO">3.2.31 RELATED-TO</a><br />
<a href="#REPEAT">3.2.32 REPEAT</a><br />
<a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a><br />
<a href="#RESOURCES">3.2.34 RESOURCES</a><br />
<a href="#RRULE">3.2.35 RRULE</a><br />
<a href="#SEQUENCE">3.2.36 SEQUENCE</a><br />
<a href="#STATUS">3.2.37 STATUS</a><br />
<a href="#SUMMARY">3.2.38 SUMMARY</a><br />
<a href="#TRANSP">3.2.39 TRANSP</a><br />
<a href="#TRIGGER">3.2.40 TRIGGER</a><br />
<a href="#TZID">3.2.41 TZID</a><br />
<a href="#TZNAME">3.2.42 TZNAME</a><br />
<a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a><br />
<a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a><br />
<a href="#TZURL">3.2.45 TZURL</a><br />
<a href="#UID">3.2.46 UID</a><br />
<a href="#URL">3.2.47 URL</a><br />
<a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a><br />
<br />
<a href="#Calendar_component_configuration_functions">3.3 Calendar Component configuration functions</a><br />
<a href="#Language_PROP">3.3.1 Language</a><br />
<br />
<a href="#Calendar_component_object_misc_functions">3.4 Calendar component object misc. functions</a><br />
<a href="#deleteComponent_PROP">3.4.1 deleteComponent</a><br />
<a href="#getComponent_PROP">3.4.2 getComponent</a><br />
<a href="#setComponent_PROP">3.4.3 setComponent</a><br />
<br />
<a href="#Copyright_and_Licence">4. COPYRIGHT AND LICENSE</a><br />
<br />
<a href="#INDEX">[index]</a>


<a name="INSTALL"></a><h2>1.2 INSTALL</h2>
Unpack to any folder<br />
- add this folder to your include-path<br />
- or unpack to your application-(include)-folder<br />
Add &quot;require_once [folder/]iCalcreator.class.php;&quot; to your php-script.
<br />
<br />
If using phpversion 5.x, the default timezone need to be set/altered, now &quot;Europe/Stockholm&quot;,
line 47 in the class file.
<br />
<br />
When creating a new calendar object, review <a href="#Calendar_configuration_functions">config</a> settings.
<br />
<br />
<a href="#INDEX">[index]</a>

<a name="Calendar_Component_list"></a><h1>2. Calendar Component list</h1>
Quote from <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" title="RFC2445 in HTML format">rfc2445</a>!
(Described in iCal output format, content corresponds to xCal format.)<br />

<a name="VCALENDAR"></a><h2>2.1 VCALENDAR</h2>
<p class="center">icalobject = 1*(&quot;BEGIN&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF</p>
<p class="center">icalbody</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF)</p>
<br />
icalbody = calprops component
<br />
calprops = 2*(
<br />
<p class="center">&quot;prodid&quot; and &quot;version&quot; are both REQUIRED, but MUST NOT occur more than once
<p class="center">prodid / <a href="#VERSION">version</a> /</p>
<p class="center">&quot;calscale&quot;and &quot;method&quot;are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CALSCALE">calscale</a> / <a href="#METHOD">method</a> /</p>
<p class="center"><a href="#X-PROPERTY">x-prop</a></p>
)
<br />
<p class="center">component  = 1*(<a href="#VEVENT">eventc</a> / <a href="#VTODO">todoc</a> / <a href="#VJOURNAL">journalc</a> / <a href="#VFREEBUSY">freebusyc</a> / <a href="#VTIMEZONE">timezonec</a> / iana-comp* / x-comp*)</p>
<p class="center">iana-comp  = &quot;BEGIN&quot; &quot;:&quot; iana-token CRLF</p>
<p class="center">1*contentline</p>
<p class="center">&quot;END&quot; &quot;:&quot; iana-token CRLF</p>
<p class="center">x-comp     = &quot;BEGIN&quot; &quot;:&quot; x-name CRLF</p>
<p class="center">1*contentline</p>
<p class="center">&quot;END&quot; &quot;:&quot; x-name CRLF</p>
*) <span class="comment">not supported by iCalcreator</span></p>
<br />
<a href="#INDEX">[index]</a>

<a name="VEVENT"></a><h2>2.2 VEVENT</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
<p class="center">eventprop *alarmc</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
eventprop = *(
<p class="center">the following are optional,but MUST NOT occur more than once</p>
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> /</p>
<p class="center"><a href="#GEO">geo</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#LOCATION">location</a> / <a href="#ORGANIZER">organizer</a> / <a href="#PRIORITY">priority</a> / </p>
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> / </p>
<p class="center"><a href="#TRANSP">transp</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / <a href="#RECURRENCE-ID">recurid</a> /</p>
<p class="center">either &quot;<a href="#DTEND">dtend</a>&quot; or &quot;<a href="#DURATION">duration</a>&quot; may appear in a &quot;eventprop&quot;, </p>
<p class="center">but &quot;<a href="#DTEND">dtend</a>&quot; and &quot;<a href="#DURATION">duration</a>&quot; MUST NOT occur in the same &quot;eventprop&quot;</p>
<p class="center"><a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> /</p>
<p class="center">the following are optional, and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / </p>
<p class="center"><a href="#RELATED-TO">related</a> / <a href="#RESOURCES">resources</a> / <a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
<a href="#INDEX">[index]</a>

<a name="VTODO"></a><h2>2.3 VTODO</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
<p class="center">todoprop *alarmc</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
todoprop   = *(
<p class="center">the following are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CLASS">class</a> / <a href="#COMPLETED">completed</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTAMP">dtstamp</a> / <a href="#DTSTART">dtstart</a> / </p>
<p class="center"><a href="#GEO">geo</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#LOCATION">location</a> / <a href="#ORGANIZER">organizer</a> / <a href="#PERCENTCOMPLETE">percent</a> / <a href="#PRIORITY">priority</a> / </p>
<p class="center"><a href="#RECURRENCE-ID">recurid</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> /<a href="#UID">uid</a> / <a href="#URL">url</a> /</p>
<p class="center">either &quot;<a href="#DUE">due</a>&quot; or &quot;<a href="#DURATION">duration</a>&quot; may appear in a &quot;todoprop&quot;,</p>
<p class="center"> but &quot;<a href="#DUE">due</a>&quot; and &quot;<a href="#DURATION">duration</a>&quot; MUST NOT occur in the same &quot;todoprop&quot;</p>
<p class="center"><a href="#DUE">due</a> / <a href="#DURATION">duration</a> /</p>
<p class="center">the following are optional,and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / </p>
<p class="center"><a href="#RELATED-TO">related</a> / <a href="#RESOURCES">resources</a> / <a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
<a href="#INDEX">[index]</a>

<a name="VJOURNAL"></a><h2>2.4 VJOURNAL</h2>
<p class="center">journalc   = &quot;BEGIN&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
<p class="center">jourprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
jourprop   = *(
<p class="center">the following are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> / </p>
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#ORGANIZER">organizer</a> / <a href="#RECURRENCE-ID">recurid</a> / </p>
<p class="center"><a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> /<a href="#UID">uid</a> / <a href="#URL">url</a> /</p>
<p class="center">the following are optional,and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> /</p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#RELATED-TO">related</a> / </p>
<p class="center"><a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
<a href="#INDEX">[index]</a>

<a name="VFREEBUSY"></a><h2>2.5 VFREEBUSY</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
<p class="center">fbprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
fbprop     = *(
<p class="center">the following are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#CONTACT">contact</a> / <a href="#DTSTART">dtstart</a> / <a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> / </p>
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#ORGANIZER">organizer</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / </p>
<p class="center">the following are optional,and MAY occur more than once</p>
<p class="center"><a href="#ATTENDEE">attendee</a> / <a href="#COMMENT">comment</a> / <a href="#FREEBUSY_PROP">freebusy</a> / <a href="#REQUEST-STATUS">rstatus</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
<a href="#INDEX">[index]</a>
<a name="VALARM"></a><h2>2.6 VALARM</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p>
<p class="center">(audioprop / dispprop / emailprop / procprop)</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p> audioprop  = 2*(
<p class="center">&quot;<a href="#ACTION">action</a>&quot; and &quot;<a href="#TRIGGER">trigger</a>&quot; are both REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#TRIGGER">trigger</a> /</p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional,and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
<p class="center">the following is optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / </p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p> 
)
<br />
dispprop   = 3*(
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> /</p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional,and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
emailprop  = 5*(
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> / <a href="#SUMMARY">summary</a></p>
<p class="center">the following is REQUIRED, and MAY occur more than once</p>
<p class="center"><a href="#ATTENDEE">attendee</a> / </p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional, and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
<p class="center">the following are optional, and MAY occur more than once</p>
<p class="center"><a href="#ATTACH">attach</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
procprop   = 3*(
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#ACTION">action</a> / <a href="#ATTACH">attach</a> / <a href="#TRIGGER">trigger</a> /</p>
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional, and MUST NOT occur more than once each,</p>
<p class="center">but if one occurs, so MUST the other</p>
<p class="center"><a href="#DURATION">duration</a> / 
<a href="#REPEAT">repeat</a> /</p>
<p class="center">&quot;<a href="#DESCRIPTION">description</a>&quot; is optional, and MUST NOT occur more than once</p>
<p class="center"><a href="#DESCRIPTION">description</a> / </p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
<a href="#INDEX">[index]</a>

<a name="VTIMEZONE"></a><h2>2.7 VTIMEZONE</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
2*(
<p class="center">&quot;<a href="#TZID">tzid</a>&quot; is required, but MUST NOT occur more than once</p>
<p class="center"><a href="#TZID">tzid</a> / </p>
<p class="center">&quot;<a href="#LAST-MODIFIED">last-mod</a>&quot; and &quot;<a href="#TZURL">tzurl</a>&quot; are optional, but MUST NOT occur more than once</p>
<p class="center"><a href="#LAST-MODIFIED">last-mod</a> / <a href="#TZURL">tzurl</a> /</p>
<p class="center">one of &quot;standardc&quot; or &quot;daylightc&quot; MUST occur and each MAY occur more than once.</p>
<p class="center">standardc / daylightc /</p>
<p class="center">the following is optional, and MAY occur more than once</p>
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
<p class="center">standardc  = &quot;BEGIN&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
<p class="center">tzprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
<p class="center">daylightc  = &quot;BEGIN&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>
<p class="center">tzprop</p>
<p class="center">&quot;END&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>
<br />
tzprop     = 3*(
<p class="center">the following are each REQUIRED, but MUST NOT occur more than once</p>
<p class="center"><a href="#DTSTART">dtstart</a> / <a href="#TZOFFSETTO">tzoffsetto</a> / <a href="#TZOFFSETFROM">tzoffsetfrom</a> /</p>
<p class="center">the following are optional, and MAY occur more than once</p>
<p class="center"><a href="#COMMENT">comment</a> /<a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#TZNAME">tzname</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
)
<br />
<a href="#INDEX">[index]</a>

<a name="Function_list"></a><h1>3. Function list</h1>

<a name="Calendar_object_functions"></a><h2>3.1 Calendar object functions</h2>

<a name="Calendar_object_constructors"></a><h3>3.1.1 Calendar object constructors</h3>
Initiate new CALENDAR.
<p class="label">Format</p>
<p class="format">vcalendar()</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();// <span class="ref">initiate new CALENDAR</p></span>
<a href="#INDEX">[index]</a>

<a name="vevent"></a><h4>3.1.1.1 vevent</h4>
Initiate calendar component EVENT.
<p class="label">Format</p>
<p class="format">vevent()</p>
<p class="label">Example</p>
<p class="format">$vevent = new vevent(); // <span class="ref">initiate EVENT</span></p>
<a href="#INDEX">[index]</a>

<a name="vtodo"></a><h4>3.1.1.2 vtodo</h4>
Initiate calendar component TODO.
<p class="label">Format</p>
<p class="format">vtodo()</p>
<p class="label">Example</p>
<p class="format">$vtodo = new vtodo(); // <span class="ref">initiate TODO</span></p>
<a href="#INDEX">[index]</a>

<a name="vjournal"></a><h4>3.1.1.3 vjournal</h4>
Initiate calendar component JOURNAL.
<p class="label">Format</p>
<p class="format">vjournal()</p>
<p class="label">Example</p>
<p class="format">$vjournal = new vjournal(); // <span class="ref">initiate JOURNAL</span></p>
<a href="#INDEX">[index]</a>

<a name="vfreebusy"></a><h4>3.1.1.4 vfreebusy</h4>
Initiate calendar component FREEBUSY.
<p class="label">Format</p>
<p class="format">vfreebusy()</p>
<p class="label">Example</p>
<p class="format">$vfreebusy = new vfreebusy(); // <span class="ref">initiate FREEBUSY</span></p>
<a href="#INDEX">[index]</a>

<a name="valarm"></a><h4>3.1.1.5 valarm</h4>
Initiate calendar component ALARM.
<p class="label">Format</p>
<p class="format">valarm()</p>
<p class="label">Example</p>
<p class="format">$valarm = new valarm(); // <span class="ref">initiate ALARM</span></p>
<a href="#INDEX">[index]</a>

<a name="vtimezone"></a><h4>3.1.1.6 vtimezone</h4>
Initiate calendar component TIMEZONE.
<p class="label">Format</p>
<p class="format">vtimezone()</p>
<p class="label">Example</p>
<p class="format">$vtimezone = new vtimezone(); // <span class="ref">initiate TIMEZONE</span></p>
<a href="#INDEX">[index]</a>


<a name="Calendar_property_functions"></a><h3>3.1.2 Calendar property functions</h3>

<a name="deleteProperty"></a><h4>3.1.2.1 deleteProperty</h4>
General calendar deleteProperty function,simplifying calendar property delete.
<p class="label">Format</p>
<p class="format">deleteProperty( [ string PropName [, int order=1 ] )</p>
<p class="comment">Propname - case independent, strict rfc2445 component property names,
           unknown/missing Propname will be regarded as <a href="#X-PROPERTY">X-property</a>.
order    - if missing 1st/next occurence,
           used with multiply (property) occurences
</p>
FALSE is returned if no property exists or at end-of-properties with
consecutive function calls.
<p class="label">Example 1</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
if( !$v->deleteProperty( &quot;method&quot; ))
&nbsp;&nbsp;echo "error when deleting property.. .
.. .
</p>
<a href="#INDEX">[index]</a>

<a name="getProperty"></a><h4>3.1.2.2 getProperty</h4>
General calendar getProperty function,simplifying calendar property getting.
<p class="label">Format</p>
<p class="format">getProperty( [ string PropName [, int order=1 [, bool complete=FALSE ]]] )</p>
<p class="comment">Propname - case independent, strict rfc2445 component property names,
           unknown/missing Propname will be regarded as <a href="#X-PROPERTY">X-property</a>.
order    - if missing 1st/next occurence, 
           used with multiply (property) occurences
complete - FALSE (default) : output only property value
         - TRUE            : output = array(&quot;value&quot;=&gt; &lt;value&gt;
                                           ,&quot;params&quot; =&gt; &lt;parameter array&gt;)
</p>
FALSE is returned if no property exists or at end-of-properties with
consecutive function calls.
<p class="label">Example 1</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
$calscale = $v->getProperty( &quot;calscale&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
while( $xprop = $v->getProperty( )) { // <span class="ref">get x-properties in order.. .</span>
.. .
</p>
<a href="#INDEX">[index]</a>


<a name="setProperty"></a><h4>3.1.2.3 setProperty</h4>
General calendar setProperty function,simplifying calendar property setting.
<p class="label">Format</p>
<p class="format">setProperty( string PropName, mixed Proparg_1 *[, mixed Proparg_n] )</p>
Propname case independent, strict rfc2445 calendar property names, unknown Propname will be regarded as <a href="#X-PROPERTY">X-property</a>.
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar(); // <span class="ref">initiate new CALENDAR</span>
$calendar->setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
</p>
<a href="#INDEX">[index]</a>


<a name="CALSCALE"></a><h4>3.1.2.4 CALSCALE</h4>
This property defines the calendar scale used for the calendar information specified in the iCalendar object.
<br /><br />
The default value is &quot;GREGORIAN&quot;, implied when missing.
<h5>Get Calscale</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;calscale&quot; )</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
$calscale = $v->getProperty( &quot;calscale&quot; );
.. .
</p>
<h5>Set Calscale</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;calscale&quot;, string value )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar(); // <span class="ref">initiate new CALENDAR</span>
$calendar->setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
</p>
<a href="#INDEX">[index]</a>


<a name="METHOD"></a><h4>3.1.2.5 METHOD</h4>
This property defines the iCalendar object method associated with the calendar object.
<br /><br />
METHOD property (value PUBLISH etc.) may be required when importing iCal files into MS Outlook 2003, as well as (auto created) component properties <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a>.
<h5>Get Method</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;method&quot; );</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
$method = $v->getProperty( &quot;method&quot; )
.. .
</p>
<h5>Set Method</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;method&quot;, string value )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar(); // <span class="ref">initiate new CALENDAR</span>
$calendar->setProperty( &quot;method&quot;, &quot;PUBLISH&quot; )
</p>
<a href="#INDEX">[index]</a>


<a name="VERSION"></a><h4>3.1.2.6 VERSION</h4>
This property specifies the identifier corresponding to the highest version number or the minimum and maximum range of the iCalendar specification that is required in order to interpret the iCalendar object.<br />
<h5>Get Version</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;version&quot; )</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
$version = $v->getProperty( &quot;version&quot; )
.. .
</p>
<h5>Set Version</h5>
Only version 2.0 valid, version is <b>AUTO</b> generated at calendar creation.
<p class="label">Format</p>
<p class="format">setProperty( &quot;version&quot;, string version )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar(); // <span class="ref">initiate new CALENDAR</span>
$calendar->setProperty( &quot;version&quot;, &quot;2.0&quot; )
</p>
<a href="#INDEX">[index]</a>


<a name="X-PROPERTY"></a><h4>3.1.2.7 X-PROPERTY</h4>
Any calendar component property name with a &quot;X-&quot; prefix and text value.
If x-prop with the same name exists, it will be replaced.<br />
<h5>Get X-property</h5>
<p class="label">Format</p>
<p class="format">getProperty()</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>, propertyData<span class="ref">2</span> )</p>
<p class="format">getProperty( FALSE, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>
              , array( &quot;value&quot;  =&gt; propertyData<span class="ref">2</span> )
                     , &quot;params&quot; =&gt; params<span class="ref">&nbsp;3</span>))
</p>
<p class="label">Example 1</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
while( $xprop = $v->getProperty( )) { // <span class="comment">read all x-props in a loop</span>
.. .
</p>
<p class="comment">$xprop = array( propertyName<span class="ref">1</span>, propertyData<span class="ref">2</span> )</p>

<p class="label">Example 2</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
if( $xprop = $v->getProperty( &quot;X-WR-TIMEZONE&quot; )) {
  //<span class="comment">if exists, read X-WR-TIMEZONE x-prop</span>
.. .
</p>
<p class="comment">$xprop = array( &quot;X-WR-TIMEZONE&quot;, propertyData<span class="ref">2</span> )</p>

<p class="label">Example 3</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
while( $xprop = $v->getProperty( FALSE, FALSE, TRUE )) {
.. .
</p>
<p class="comment">$xprop = array( propertyName<span class="ref">1</span>
              , array( &quot;value &quot; =&gt; propertyData<span class="ref">2</span> )
                     , &quot;params &quot;=&gt; params<span class="ref">&nbsp;3</span> )
</p>
<h5>Set X-property</h5>
<p class="label">Format</p>
<p class="format">setProperty( propertyName, propertyData [, params ] )</p>
<p class="comment">propertyName<span class="ref">1</span> = Any property name with a &quot;X-&quot; prefix
propertyData<span class="ref">2</span> = Value type TEXT
params<span class="ref">&nbsp;3</span>       = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;] [, xparam] )
xparam        = *[ xparamkey =&gt; xparamvalue ]
</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();&nbsp;// initiate new CALENDAR
 // <span class="ref">set some X-properties.. .</span>
$calendar->setProperty( &quot;X-WR-CALNAME&quot;, &quot;Calendar Sample&quot; )
$calendar->setProperty( &quot;X-WR-CALDESC&quot;, &quot;Calendar Description&quot; );
$calendar->setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
</p>
<br />
<a href="#INDEX">[index]</a>

<a name="Calendar_component_functions"></a><h3>3.1.3 Calendar component functions</h3>

<a name="deleteComponent"></a><h4>3.1.3.1 deleteComponent</h4>
Remove component from calendar.
<p class="label">format 1</p>
Remove component with order number (1st=1, 2nd=2.. .).
<p class="format">deleteComponent( int orderNumber )</p>
<p class="label">format 2</p>
Remove component with component type (e.g. &quot;vevent&quot;) and order 1 alt. suborder number.
<p class="format">deleteComponent( string componentType [, int componentSuborderNumber])</p>
<p class="label">format 3</p>
Remove component with <a href="#UID">UID</a>. N.B <a href="#UID">UID</a> is NOT set for 
<a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.
<p class="format">deleteComponent( string <a href="#UID">UID</a> )</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
$v->deleteComponent( 1 );
$v->deleteComponent( &quot;vtodo&quot;, 2 );
$v->deleteComponent( &quot;20070803T194810CEST-hide@address.com&quot;);
.. .
</p>
<a href="#INDEX">[index]</a>

<a name="getComponent"></a><h4>3.1.3.2 getComponent</h4>
Get component from calendar.
<p class="label">format 1</p>
Get next component, until end-of-components.
<p class="format">getComponent()</p>
<p class="label">format 2</p>
Get component with order number (1st=1, 2nd=2.. .).
<p class="format">getComponent( int orderNumber )</p>
<p class="label">format 3</p>
Get (next) component with component type (until end-of-components) alt.
get component with component type and suborder number (1st=1, 2nd=2.. .).
<p class="format">getComponent( string componentType [, int componentSuborderNumber])</p>
<p class="label">format 4</p>
Get component with <a href="#UID">UID</a> as key. N.B <a href="#UID">UID</a> is NOT set for 
<a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.
<p class="format">getComponent( string <a href="#UID">UID</a> )</p>
<p class="label">Example 1</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
while( $comp = $v->getComponent()) {
.. .
}
.. .
</p>
<p class="label">Example 2</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
if( $comp = $v->getComponent( 1 )) {
.. .
}
.. .
</p>
<p class="label">Example 3</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
if( $comp = $v->getComponent( &quot;vtodo&quot;, 2 ) {
.. .
}
.. .
</p>
<p class="label">Example 4</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$v->parse();
if($comp = $v->getComponent( &quot;20070803T194810CEST-hide@address.com&quot;){
.. .
}
.. .
</p>
<a href="#INDEX">[index]</a>

<a name="selectComponents"></a><h4>3.1.3.3 selectComponents</h4>
Select components from calendar on date basis (notice <a href="#date_restriction">date restriction</a>), based on the initial <a href="#DTSTART">DTSTART</a> property along with the <a href="#RRULE">RRULE</a>, <a href="#RDATE">RDATE</a>, <a href="#EXDATE">EXDATE</a> and <a href="#EXRULE">EXRULE</a> properties contained within the iCalendar object.
<p class="label">Format</p>
<p class="format">selectComponents([int startYear, int startMonth, int startDay
               [, int endYear,   int endMonth,   int endDay
               [, mixed cType [, bool flat [, bool any [, bool split]]]]]])
</p>
Returns an array with components (events.. .).
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, &quot;Y-m-d&nbsp;[H:i:s][timezone/GMT&nbsp;offset]&quot;
showing the current start and opt. also end alt. due date.
<p class="comment">startYear  : start year of date period (4*digit), default current year
startMonth : start month of date period (digit / 2*digit), default current month
startDay   : start day of date period (digit / 2*digit), default current day
endYear    : end year of date period (4*digit), default startYear
endMonth   : end month of date period (digit / 2*digit), default startMonth
endDay     : end day of date period (digit / 2*digit), default StartDay
cType      : calendar component type(-s), default (FALSE) all 
                                          else string/array type(-s) (vevent, vtodo, vjournal, vfreebusy)
flat       : FALSE (default) =&gt; output : array[Year][Month][Day][]
             TRUE =&gt; output : array[] (ignores split)
any        : TRUE (default) - select component that occurs within period
             FALSE - only components that starts (DTSTART) within period
split      : TRUE - (default) one component copy for every day it occurs within the period (implies flat=FALSE)
             FALSE - one occurance of component in output array, start date/recurrent date
</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->setConfig( &quot;unique_id&quot;, &quot;domain.com&quot; );
$v->setConfig( &quot;directory&quot;, &quot;import&quot; );
$v->setConfig( &quot;filename&quot;,  &quot;file.ics&quot; );
$v->parse();
$v->sort();
$events_arr = $v->selectComponents( 2007, 11, 1, 2007, 11, 30, 'vevent' );
 // <span class="ref">select all events occuring 1-30 nov. 2007</span>
foreach( $events_arr as $year =&gt; $year_arr ) {
  foreach( $year_arr as $month =&gt; $month_arr ) {
    foreach( $month_arr as $day =&gt; $day_arr ) {
      foreach( $day_arr as $event ) {
        $currddate   = $event->getProperty( 'x-current-dtstart' );
          <span class="ref">//  if member of a recurrence set,
           //   returns array('x-current-dtstart'
           //                , &lt;(string) date(&quot;Y-m-d&nbsp;[H:i:s][timezone/GMT&nbsp;offset]&quot;)&gt;)</span>
        $startdate   = $event->getProperty( 'dtstart' );
        $summary     = $event->getProperty( 'summary' );
        $description = $event->getProperty( 'description' );
        .. .
</p>
<a href="#INDEX">[index]</a>

<a name="setComponent"></a><h4>3.1.3.4 setComponent</h4>
Add calendar component to calendar or replace/update component in calendar.
<p class="label">format 1</p>
Insert last in component chain.
<p class="format">setComponent( component )
addComponent( component ) // <span class="ref">alias</span>
</p>
<p class="comment">addComponent, may be removed i future versions.</p>
<p class="label">format 2</p>
Replace component with order number (1st=1, 2nd=2.. .). 
If orderNumber is not found, component is inserted last in chain.
<p class="format">setComponent( component, int orderNumber )</p>
<p class="label">format 3</p>
Replace component with component type and 1st alt. component order number.
If orderNumber is not found, component is inserted last in chain.
<p class="format">setComponent( component, string componentType [, component suborder number])</p>
<p class="label">format 4</p>
Replace component with <a href="#UID">UID</a>.
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components. 
If <a href="#UID">UID</a> is not found, component is inserted last in chain.
<p class="format">setComponent( component, string <a href="#UID">UID</a> )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();&nbsp;//<span class="comment">initiate new CALENDAR</span>
.. .
$vevent = new vevent();&nbsp;//<span class="comment">initiate EVENT</span>
$vevent->setProperty( &quot;dtstart&quot;&nbsp;//<span class="comment">add some <a href="#VEVENT">EVENT</a> properties</span>
                    , 2006, 12, 24, 19, 30, 00 );
$vevent->setProperty(.. .
.. .
$calendar->setComponent( $vevent ); //<span class="comment">add <a href="#VEVENT">EVENT</a> to calendar</span>
.. .
</p>
<a href="#INDEX">[index]</a>


<a name="Calendar_inputoutput_functions"></a><h3>3.1.4 Calendar input/output functions</h3>

<a name="parse_merge"></a><h4>3.1.4.1 parse and merge</h4>
Parse iCal file(-s) into a single vcalendar object (components, properties and parameters), 
including multiple vcalendars (within a single ICS file) parse, e.g. Oracle Calendar exports.

<br /><br />
As long as php.ini directive &quot;allow_url_fopen&quot; is enabled, remote files, URLs; protocol &quot;http&quot; (&quot;webcal&quot;), are supported. A remote file, URL, MUST be prefixed by &quot;http://&quot; (&quot;webcal://&quot;) and suffixed by a valid filename.! Recommendation is to download (cache) remote file before parsing, due to execution time and control.
<br /><br />
If missing, component property <a href="#UID">UID</a> is created when parsing. For that reason <a href="#Unique_id">UNIQUE_ID</a> might need to be set before parsing, se examples below.
<br /><br />
Notice <a href="#date_restriction">date restriction</a>!
<br /><br />
If parse error  occurs (like file access error, invalid calendar file or calendar file without components), FALSE is returned.
<br /><br />
The php.ini directive &quot;auto_detect_line_endings&quot; (default OFF) will examine the data read by fgets() and file() to see if it is using Unix, MS-Dos or Macintosh line-ending conventions. This enables PHP to interoperate with Macintosh systems, but defaults to Off, as there is a very small performance penalty when detecting the EOL conventions for the first line, and also because people using carriage-returns as item separators under Unix systems would experience non-backwards-compatible behaviour.
(This configuration option was introduced in PHP 4.3.0) (From php manual)
<p class="label">Format</p>
<p class="format">parse( [ string filename ] )</p>
<p class="comment">Parameter for <span class="format">filename</span> (including path/directory(!)), may be removed 
in future versions. Recommendation is to use <span class="format">setConfig</span>, se example below.</p>
<p class="label">parse example 1</p>
<p class="format">$vcalendar = new vcalendar();
$vcalendar->setConfig( &quot;unique_id&quot;,&nbsp;&quot;domain.com&quot; );
$vcalendar->setConfig( &quot;filename&quot;, &quot;file.ics&quot; );
$vcalendar->parse();
.. .
</p>
<p class="label">parse example 2</p>
<p class="format">$vcalendar = new vcalendar();
$vcalendar->setConfig( &quot;unique_id&quot;,&nbsp;&quot;domain.com&quot; );
$vcalendar->setConfig(&quot;url&quot;, &quot;http://www.ical.net/calendars/calendar.ics&quot;);
$vcalendar->parse();
.. .
</p>
<p class="label">merge example</p>
<p class="format">$vcalendar = new vcalendar();
$vcalendar->setConfig( &quot;unique_id&quot;,&nbsp;&quot;domain.com&quot; );
$vcalendar->setConfig( &quot;directory&quot;,&nbsp;&quot;import&quot; );

$vcalendar->setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file1.ics&quot; );
$vcalendar->parse();

$vcalendar->setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file2.ics&quot; );
$vcalendar->parse();

$vcalendar->sort();
$vcalendar->setConfig( &quot;directory&quot;,&nbsp;&quot;export&quot; );
$vcalendar->setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;icalmerge.ics&quot; );
$vcalendar->saveCalendar();
.. .
</p>
<a href="#INDEX">[index]</a>

<a name="createCalendar"></a><h4>3.1.4.2 createCalendar</h4>
Generate and return calendar in a string, testing.. .?
<p class="label">Format</p>
<p class="format">createCalendar()</p>
<p class="label">Example</p>
<p class="format">.. .
$str = $calendar->createCalendar();
echo $str;
</p>
<a href="#INDEX">[index]</a>

<a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
Redirect calendar content to user browser. Filenamn, addressed to browser, is auto generated if missing/not set;<br />
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span><br />
<p class="label">Format</p>
<p class="format">returnCalendar()</p>
<p class="label">Example 1</p>
<p class="format">$vcalendar = new vcalendar();
$vcalendar->setConfig( &quot;unique_id&quot;,&nbsp;&quot;domain.com&quot; );
.. .
$vevent = new vevent();
$vevent->setProperty( &quot;dtstart&quot;, array( &quot;year&quot;  =&gt; 2007
                                      , &quot;month&quot; =&gt; 4
                                      , &quot;day&quot;   =&gt; 1
                                      , &quot;hour&quot;  =&gt; 19 ));
$vevent->setProperty( &quot;duration&quot;, 0, 0, 3 ));
$vevent->setProperty( &quot;LOCATION&quot;, &quot;Central Placa&quot; );
$vevent->setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
.. .
$vcalendar->setComponent( $vevent );
.. .
$vcalendar->returnCalendar();
</p>
<p class="label">Example 2</p>
<p class="format">$vcalendar = new vcalendar();
$vcalendar->setConfig( &quot;unique_id&quot;,&nbsp;&quot;domain.com&quot; );
$vcalendar->setConfig( &quot;directory&quot;, &quot;depot&quot; );
$vcalendar->setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
$vcalendar->parse();
$vcalendar->returnCalendar();
</p>
<a href="#INDEX">[index]</a>

<a name="saveCalendar"></a><h4>3.1.4.4 saveCalendar</h4>
Save ical calendar in a file, uses present directory if directory not set, filenamn is auto generated if missing/not set;<br />
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span><br />
Directory/filename must be writeable, delimiter default PHP constant DIRECTORY_SEPARATOR.
<br /><br />
As long as php.ini directive &quot;allow_url_fopen&quot; is enabled, remote files, URLs; protocol &quot;http&quot; (&quot;webcal&quot;), are supported. Recommendation is to save to a local file and upload later, due to execution time and control.
<br /><br />
If file error occurs, FALSE is returned.
<p class="label">Format</p>
<p class="format">saveCalendar ( string directory/FALSE 
            [, string filename/FALSE 
            [, string delimiter/FALSE ]] )
</p>
<p class="comment">Parameters for <span class="format">directory/filename/delimeter</span>, kept for backward compatibility, 
may be removed i future versions. Recommendation is to use <span class="format">setConfig</span>, se 
example below.</span></p>
<p class="label">Example</p>
<p class="format">.. .
$calendar->setConfig( &quot;directory&quot;, &quot;depot&quot; );
$calendar->setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
$result = $calendar->saveCalendar();
if( !$result )
&nbsp;&nbsp;echo &quot;error when saving.. .&quot;
</p>
<a href="#INDEX">[index]</a>

<a name="sort"></a><h4>3.1.4.5 sort</h4>
Sort created/parsed calendar components in ascending order<br />
Keys:<br />
1 - <a href="#DTSTART">DTSTART</a> - <a href="#DTEND">DTEND</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VEVENT">VEVENT</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components)<br />
1 - <a href="#DTSTART">DTSTART</a> - <a href="#DUE">DUE</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VTODO">VTODO</a> components)<br />
1 - <a href="#DTSTART">DTSTART</a> (<a href="#VJOURNAL">VJOURNAL</a> components)<br />
2 - <a href="#CREATED">CREATED</a> / <a href="#DTSTAMP">DTSTAMP</a><br />
3 - <a href="#UID">UID</a><br />
Any <a href="#VTIMEZONE">VTIMEZONE</a> component is always sorted first in chain.
<p class="label">Format</p>
<p class="format">sort()</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();
$calendar->setConfig( &quot;directory&quot;, &quot;depot&quot; );
$calendar->setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
$calendar->parse();
$calendar->sort();
$calendar->returnCalendar();
</p>
<a href="#INDEX">[index]</a>

<a name="useCachedCalendar"></a><h4>3.1.4.6 useCachedCalendar</h4>
If recent version of local (nonempty) calendar file exists, an HTTP redirect header is sent otherwise FALSE is returned.
<p class="label">Format</p>
<p class="format">useCachedCalendar( [ int timeout ] )
useCachedCalendar( string directory/FALSE
                 , string filename/FALSE
                 , string delimiter/FALSE 
                [, int timeout ] )
</p>
<p class="comment">timeout  : default 3600 sec
Second format with parameters for <span class="format">directory/filename/delimeter</span>, kept for 
backward compatibility, may be removed i future versions. Recommendation
is to use <span class="format">setConfig</span>, se example below.</span></p>
<p class="label">Example</p>
<p class="format">.. .
$calendar->setConfig( &quot;directory&quot;, &quot;depot&quot; );
$calendar->setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
$calendar->useCachedCalendar();
</p>
<a href="#INDEX">[index]</a>


<a name="Calendar_configuration_functions"></a><h3>3.1.5 Calendar configuration functions</h3>
All configuration controls (allowEmpty, cOmPsInFo etc.) case independent.
<a name="allowEmpty"></a><h4>3.1.5.1 Allow empty components</h4>
Allow or reject empty calendar properties, default allow (TRUE). Used in input function <span class="format">setProperty()</span>.
<h5>Set allowEmpty</h5>
<p class="label">Format</p>
<p class="format">setConfig( &quot;allowEmpty&quot;, bool &lt;directive&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;allowEmpty&quot;, TRUE );</p>

<a href="#INDEX">[index]</a>


<a name="Compsinfo"></a><h4>3.1.5.2 Component information</h4>
Get information about calendar components. Returns array with basic information
about all components (in array format) within calendar.
<p class="label">Format</p>
<p class="format">getConfig( &quot;compsinfo&quot; )</p>
<p class="comment">Output   = array ( *compinfo )
compinfo = array ( &quot;ordno&quot; =&gt; int ordno, 
                   // <span class="ref">order number (1st=1, 2nd=2..)</span>
                 , &quot;type&quot;  =&gt; string type
                   // <span class="ref">component type (vevent, vtodo.. .</span>
                 , &quot;uid&quot;   =&gt; string uid
                   // <span class="ref">component <a href="#UID">UID</a> (not for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a>)</span>
                 , &quot;props&quot; =&gt; array( *[ propertyName =&gt; Property count ])
                   // <span class="ref">for every set property</span>
                 , &quot;sub&quot;   =&gt; array( *compinfo ))
                   // <span class="ref">if subcomponents exists, an array for each subcomponent</span></p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
$compsinfo = $v->getConfig( &quot;compsinfo&quot; );
foreach( $compsinfo as compinfo) {
&nbsp;echo &quot; order number : &quot;.$compinfo[&quot;ordno&quot;];
&nbsp;echo &quot; type : &quot;.$compinfo[&quot;type&quot;];
&nbsp;echo &quot; UID : &quot;.$compinfo[&quot;uid&quot;];
&nbsp;foreach( $compinfo[&quot;props&quot;] as $propertyName =&gt; $propertyCount )
&nbsp;&nbsp;echo &quot;  $propertyName = $propertyCount&quot;;
&nbsp;if( is_array( $compinfo[&quot;sub&quot;] )) {
&nbsp;&nbsp;foreach( $compinfo[&quot;sub&quot;] as $subcompinfo ) {
&nbsp;&nbsp;&nbsp;echo &quot; order number : &quot;.$subcompinfo[&quot;ordno&quot;];
&nbsp;&nbsp;&nbsp;/* .. dito if subcomponents exists .. . */
&nbsp;&nbsp;}
&nbsp;}
}
</p>
<a href="#INDEX">[index]</a>

<a name="Delimiter"></a><h4>3.1.5.3 Delimiter</h4>
Directory/filename delimiter.
<h5>Get delimiter</h5>
<p class="label">Format</p>
<p class="format">getConfig( &quot;delimiter&quot; )</p>
<p class="label">Example</p>
<p class="format">$del = $calendar->getConfig( &quot;delimiter&quot; );</p>
<h5>Set delimiter</h5>
Default PHP constant DIRECTORY_SEPARATOR. If used, must be set BEFORE filename!
<p class="label">Format</p>
<p class="format">setConfig( &quot;delimiter&quot;, string &lt;delimiter&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;delimiter&quot;, &quot;/&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="Directory"></a><h4>3.1.5.4 Directory</h4>
Local directory to store/read iCal files, default &quot;.&quot;.
<h5>Get directory</h5>
<p class="label">Format</p>
<p class="format">getConfig( &quot;directory&quot; )</p>
<p class="label">Example</p>
<p class="format">$folder = $calendar->getConfig( &quot;directory&quot; );</p>
<h5>Set directory</h5>
Directory must be set BEFORE filename and must exist and be writeable otherwise FALSE is returned. 
When setting Directory any previously set URL is removed.
<p class="label">Format</p>
<p class="format">setConfig( &quot;directory&quot;, string &lt;directory&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;directory&quot;, &quot;depot&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="Fileinfo"></a><h4>3.1.5.5 Fileinfo</h4>
Information about directory, filename and filesize. Notice <a href="#Filesize">filesize</a>.
<h5>Get fileinfo</h5>
<p class="label">Format</p>
<p class="format">getConfig( &quot;fileinfo&quot; )</p>
<p class="label">Example</p>
<p class="format">$fileinfo = $calendar->getConfig( &quot;fileinfo&quot; );</p>
<p class="comment">output = array( &lt;directory&gt;, &lt;filename&gt;, &lt;filesize&gt; )</p>
<br />
<a href="#INDEX">[index]</a>

<a name="Filename"></a><h4>3.1.5.6 Filename</h4>
iCal local file name, default created, if not set;<br />
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span><br />
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.xml&quot; </span> if <a href="#Format">format</a> set to &quot;xcal&quot;.
<h5>Get filename</h5>
<p class="label">Format</p>
<p class="format">getConfig( &quot;filename&quot; )</p>
<p class="label">Example</p>
<p class="format">$filename = $calendar->getConfig( &quot;filename&quot; );</p>
<h5>Set filename</h5>
Local filename must be set AFTER setting directory (and ev. delimiter)!
Filename (and opt. directory) must be readable/writeable otherwise FALSE is returned.
<p class="label">Format</p>
<p class="format">setConfig( &quot;filename&quot;, string &lt;filename&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="Filesize"></a><h4>3.1.5.7 Filesize</h4>
<h5>Get filesize</h5>
Returns the size of the file in bytes, to be called<br />
- after &quot;saveCalendar()&quot;<br />
or<br />
- after a &quot;setConfig( &quot;directory&quot; / &quot;filename&quot; )&quot; and before/after &quot;parse()&quot;.<br />
Getting the filesize for a remote file (URL) will always return zero.
<p class="label">Format</p>
<p class="format">getConfig( &quot;filesize&quot; )</p>
<p class="label">Example</p>
<p class="format">$filesize = $calendar->getConfig( &quot;filesize&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="Format"></a><h4>3.1.5.8 Format</h4>
Format for calendar output, &quot;iCal&quot;/&quot;xCal&quot;.
<h5>Get format</h5>
If format was set to &quot;xcal&quot; , &quot;xcal&quot; is returned.
<p class="label">Format</p>
<p class="format">getConfig( &quot;format&quot; )</p>
<p class="label">Example</p>
<p class="format">$format = $calendar->getConfig( &quot;format&quot; );</p>
<h5>Set format</h5>
&quot;iCal&quot; is preset, default (rfc2445), &quot;xCal&quot; force xml formatted output-
<p class="label">Format</p>
<p class="format">setConfig( &quot;format&quot;, string &lt;format&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;format&quot;, &quot;xcal&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="Language"></a><h4>3.1.5.9 Language</h4>
Language for calendar and component properties as defined in [RFC 1766].<br />
<h5>Get language</h5>
Language for calendar (only if language is set at calendar level).
<p class="label">Format</p>
<p class="format">getConfig( &quot;language&quot; )</p>
<p class="label">Example</p>
<p class="format">$lang = $calendar->getConfig( &quot;language&quot; );</p>
<h5>Set language</h5>
Set language for whole calendar, will be used everywhere its apropriate. Language set at calendar level can be overridden by &quot;setConfig( &quot;language&quot;, ..&quot; at component level or in specific component property parameter.
<p class="label">Format</p>
<p class="format">setConfig( &quot;language&quot;, string &lt;lang&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;lang&quot;, &quot;en&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="NewlineChar"></a><h4>3.1.5.10 NewlineChar</h4>
Character(s) used for carriage return + line feed (CR+LF), default &quot;\n&quot;.
<h5>Get Newlinechar</h5>
Get character(s) used for carriage return + line feed (CR+LF).
<p class="label">Format</p>
<p class="format">getConfig( &quot;newlinechar&quot; )
getConfig( &quot;nl&quot; ) // <span class="ref">alias</span>
</p>
<p class="label">Example</p>
<p class="format">$nl = $calendar->getConfig( &quot;nl&quot; );</p>
<h5>Set Newlinechar</h5>
Set character(s) used for carriage return + line feed (CR+LF).
<p class="label">Format</p>
<p class="format">setConfig( &quot;newlinechar&quot;, string &lt;char&gt; )
setConfig( &quot;nl&quot;, string &lt;char&gt; ) // <span class="ref">alias</span>
</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;nl&quot;, &quot;\n&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="Unique_id"></a><h4>3.1.5.11 Unique_id</h4>
Unique_id is used when creating property PRODID (default auto created) at calendar level and
<a href="#UID">UID</a> at component level.<br />
(rfc2445:)&quot;<br />
 *  The identifier is RECOMMENDED to be the identical syntax to the<br />
 * [RFC 822] addr-spec. A good method to assure uniqueness is to put the<br />
 * domain name or a domain literal IP address of the host on which.. .&quot;<br />
Default <b>AUTO</b> generated ( gethostbyname( $_SERVER[&quot;SERVER_NAME&quot;] )).
Can to be used to set other domain name than server name. 
<h5>Get unique id</h5>
<p class="label">Format</p>
<p class="format">getConfig( &quot;unique_id&quot; )</p>
<p class="label">Example</p>
<p class="format">$id = $calendar->getConfig( &quot;unique_id&quot; );</p>
<h5>Set unique id</h5>
Recommendation to set unique_id just after creating a new vcalendar object, to ensure
 accurate setting of component <a href="#UID">UID</a>.
<p class="label">Format</p>
<p class="format">setConfig( &quot;unique_id&quot;, string &lt;unique-Id&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar(); // <span class="ref">initiate new CALENDAR</span>
$calendar->setConfig( &quot;unique_id&quot;, &quot;domain.com&quot; );
</p>
<a href="#INDEX">[index]</a>

<a name="URL"></a><h4>3.1.5.12 URL</h4>
Managing remote files, used with writing; &quot;saveCalendar()&quot;, or reading; &quot;parse()&quot;, only protocol &quot;http&quot; (&quot;webcal&quot;) supported. If URL is set, setConfig directory (+filename) is ignored when using parse or saveCalendar functions.
<h5>Get URL</h5>
The URL filename part can be retrieved by &quot;getConfig( 'filename' )&quot;.
<p class="label">Format</p>
<p class="format">getConfig( &quot;url&quot; )</p>
<p class="label">Example</p>
<p class="format">$url = $calendar->getConfig( &quot;URL&quot; );</p>
<h5>Set URL</h5>
A remote file, URL, MUST be prefixed by &quot;http://&quot; (&quot;webcal://&quot;) and suffixed by a valid filename.
When setting URL any previously set Directory is removed. When storing a remote iCal file localy, only directory need to be set,
filename remains unchanged.
<p class="label">Format</p>
<p class="format">setConfig( &quot;URL&quot;, string &lt;url&gt; )</p>
<p class="label">Example</p>
<p class="format">$calendar->setConfig( &quot;url&quot;, &quot;http://www.iCal.net/depot/calendar.ics&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="Calendar_misc_functions"></a><h3>3.1.6 Calendar misc. functions<h3>
<a name="validDate"></a><h4>3.1.6.1 validDate</h4>
Check and convert input parameter date (different formats), return date in iCalcreator (internal) date format.
<p class="label">Format</p>
<p class="format">validDate( date [, bool utc/FALSE ] )</p>
<p class="comment">date   = int year, int month, int day 
      [, int hour, int min, int sec, mixed tz ]]
date   = array( int year, int month, int day 
             [, int hour, int min, int sec, mixed tz ]] )
date   = array(&quot;year&quot; =&gt; int year, &quot;month&quot; =&gt; int month, &quot;day&quot; =&gt; int day
             [,&quot;hour&quot; =&gt; int hour, &quot;min&quot; =&gt; int min, &quot;sec&quot; =&gt; int sec
              ,&quot;tz&quot; =&gt; mixed tz ] )
date   = array( &quot;timestamp&quot; =&gt; int timestamp [, &quot;tz&quot; =&gt; mixed tz ] )
date   = string datestring // <span class="ref">string date, acceptable by strtotime-command, 
                                          e.g. &nbsp;&quot;14 august 2006 16.00.00&quot; 
                                          (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
tz     = timezone / offset
offset = (+/-)HHmm[ss]
utc    = TRUE and if tz = UTC offset
         then input local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
</p>
<p class="label">Example</p>
<p class="format">$c = new vcalendar ();
$today = date(&quot;M d Y H:i:s&quot;); 
$UTCoffset = date( &quot;Z&quot;); // <span class="comment">offset in seconds</span>
if( &quot;-&quot; == substr( $UTCoffset, 0, 1 )) {
&nbsp;&nbsp;$UTCoffset = substr( $UTCoffset, 1 );
&nbsp;&nbsp;$sign = &quot;-&quot;;
}
else {
&nbsp;&nbsp;$sign = &quot;+&quot;;
}
$UTCoffsetHour = $UTCoffset / 3600;
$UTCoffsetMod = $UTCoffset % 3600;
$UTCoffsetMin = $UTCoffsetMod / 60;
$UTCoffsetSec = $UTCoffsetMod % 60;
$UTCoffset = sprintf( $sign."%02d%02d%02d"
                    , $UTCoffsetHour
                    , $UTCoffsetMin
                    , $UTCoffsetSec );
$today .= &quot; &quot;.$UTCoffset; // <span class="ref">UTC offset in accepted format, (+/-)HHMM[SS]</span>
$date = $c->validDate( $today );
if( FALSE == $date ) {
&nbsp;&nbsp;echo &quot;unvalid date $today&quot;;
}
else {
&nbsp;&nbsp;$e = new vevent();
&nbsp;&nbsp;$e->setProperty( &quot;dtstart&quot;, $date );
&nbsp;&nbsp;.. .
</p>
<a href="#INDEX">[index]</a>


<a name="Calendar_component_object_property_function_list"></a><h2>3.2 Calendar component object property function list</h2>
<p>
All calendar component property functions for get/set data.<br />
For property format in detail, see
RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445 in text format"><b>text</b></a>
and <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" title="RFC2445 in HTML format" target="_blank"><b>HTML</b></a> format.
</p>
<a name="DATE_WITH_UTC_TIME"></a>
<p>
<span class="label">Notice:</span> for properties and <b>DATE-TIME WITH UTC TIME</b>.<br />
The date with UTC time, or absolute time, is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90), the UTC designator, appended to the time value. For example, the following represents January 19, 1998, at 0700 UTC:
<div class="format">DTSTART:19980119T070000Z</div>
<br />
The <a href="#TZID">TZID</a> property parameter MUST <b>NOT</b> be applied to DATE-TIME properties whose time values are specified in UTC.&nbsp;(quote from rfc2445)
</p>
<p>
<a name="date_restriction"></a>
<span class="label">Notice:</span> date limitation.<br />
Due to limitation in PHP date commands, e.g. <span class="format">mktime</span>, <span class="format">strtotime</span>, a date (e.g. while setting <a href="#DTSTART">DTSTART</a> property) before &quot;January 1 1970 00:00:00 GMT&quot; can force a PHP date command to generate an error or set date to &quot;January 1 1970&quot;.
</p>
<a name="deleteProperty_PROP"></a><h3>3.2.1 deleteProperty</h3>
General calendar delete property function,simplifying calendar property delete.
<p class="label">Format</p>
<p class="format">deleteProperty( [ string PropName [, int order=1 ] )</p>
<p class="comment">Propname - case independent, strict rfc2445 component property names, 
           unknown/missing Propname will be regarded as <a href="#X-PROPERTY_PROP">X-property</a>.
order    - if missing 1st/next occurence,
           used with multiply (property) occurences</p>
FALSE is returned if no property exists or at end-of-properties with consecutive function calls.
<p class="label">Example 1</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
$e = $v->getComponent( &quot;vevent&quot; );
while( FALSE !== $e->deleteProperty( &quot;comment&quot; ))
&nbsp;&nbsp;continue;  // <span class="ref">remove all COMMENT properties</span>
.. .
</p>
<a href="#INDEX">[index]</a>

<a name="getProperty_PROP"></a><h3>3.2.2 getProperty</h3>
General get property function,simplifying component property getting.
<p class="label">Format</p>
<p class="format">getProperty( string PropName [, int order=1 [, bool complete=FALSE ]] )</p>
<p class="comment">Propname - case independent, strict rfc2445 component property names,
           unknown/missing Propname will be regarded as <a href="#X-PROPERTY_PROP">X-property</a>.
order    - if missing/FALSE 1st/next occurence, 
           otherwise with multiply occurences (1st=1, 2nd=2.. .)
complete - FALSE (default) : output only property value
           TRUE            : output = array(&quot;value&quot; =&gt; &lt;value&gt;
                                           ,&quot;params&quot;=&gt; &lt;parameter array&gt;)
</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
while( $vevent = $v->getComponent( &quot;vevent&quot; )) {
&nbsp;$dtstart = $vevent->getProperty( &quot;dtstart&quot; ); // <span class="ref">one occurence</span>
&nbsp;$description = $vevent->getProperty( &quot;description&quot; ); // <span class="ref">one occurence</span>
&nbsp;while( $comment = $vevent->getProperty( &quot;comment&quot; )) {
    // <span class="ref">MAY occur more than once</span>
&nbsp;.. .
&nbsp;}
.. .
</p>
<a href="#INDEX">[index]</a>

<a name="parse"></a><h3>3.2.3 parse</h3>
Parse strict rfc2445 property text and/or ALARMs.
<br /><br />
Any rfc2445 strict formatted property text, in string or array format.<br />
Complete <a href="#VALARM">ALARM</a>s, all properties included, in array format and
first array row as &quot;BEGIN:VALARM&quot;, last as &quot;END:VALARM&quot;.
<p class="label">Format</p>
<p class="format">parse( mixed propertyText )</p>
<p class="comment">
propertyText = string/array, strict rcf2445 formatted property/properties
               property name MUST begin line, can span several lines</p>
<p class="label">example</p>
<p class="format">.. .
$e = new vevent();
$e->parse( 'DTSTAMP:19970324T1200Z' );
$e->parse( 'SEQUENCE:0' );
$e->parse( 'ORGANIZER:MAILTO:hide@address.com' );
$e->parse( array(
'ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com',
'ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com',
'ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com',
'ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com' ));
$e->parse( 'DTSTART:19970324T123000Z' );
$e->parse( 'DTEND:19970324T210000Z' );
$e->parse( 'CATEGORIES:MEETING,PROJECT' );
$e->parse( 'CLASS:PUBLIC' );
$e->parse( 'SUMMARY:Calendaring Interoperability Planning Meeting' );
$e->parse( 'STATUS:DRAFT' );
$e->parse( array(
'DESCRIPTION:Project xyz Review Meeting Minutes\n',
' Agenda\n1. Review of project version 1.0 requirements.\n2.',
'Definition',
' of project processes.\n3. Review of project schedule.\n',
'Participants: John Smith, Jane Doe, Jim Dandy\n-It was',
' decided that the requirements need to be signed off by',
' product marketing.\n-Project processes were accepted.\n ',
'-Project schedule needs to account for scheduled holidays',
' and employee vacation time. Check with HR for specific',
' dates.\n-New schedule will be distributed by Friday.\n-',
' Next weeks meeting is cancelled. No meeting until 3/23.' ));
$e->parse( 'LOCATION:LDB Lobby' );
$e->parse(
'ATTACH;FMTTYPE=application/postscript:ftp://xyz.com/pub/conf/bkgrnd.ps' );
$e->parse( array(
'BEGIN:VALARM',
'ACTION:AUDIO',
'TRIGGER;VALUE=DATE-TIME:19970224T070000Z',
'ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud',
'REPEAT:4',
'DURATION:PT1H',
'X-alarm:non-standard ALARM property',
'END:VALARM' ));
$e->parse(
'X-xomment:non-standard property will be displayed, with a comma escaped');
$calendar->setComponent( $e );
.. .
</p>
<a href="#INDEX">[index]</a>


<a name="setProperty_PROP"></a><h3>3.2.4 setProperty</h3>
General set property function,simplifying component property setting.
<p class="label">Format</p>
<p class="format">setProperty( string PropName, mixed Proparg_1 *[, mixed Proparg_n] )</p>
<p class="comment">Propname case independent, strict rfc2445 component property names,
unknown Propname will be regarded as <a href="#X-PROPERTY_PROP">X-property</a>.</p>
<p class="label">Example</p>
<p class="format">$vevent = new vevent();
$vevent->setProperty( &quot;dtstart&quot;
                    , array(&quot;year&quot;=&gt;2007,&quot;month&quot;=&gt;4,&quot;day&quot;=&gt;1,&quot;hour&quot;=&gt;19));
$vevent->setProperty( &quot;duration&quot;, 0, 0, 3 ));
$vevent->setProperty( &quot;LOCATION&quot;, &quot;Central Placa&quot; );
$vevent->setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
.. .
</p>
<a href="#INDEX">[index]</a>


<a name="ACTION"></a><h3>3.2.5 ACTION</h3>
This property defines the action to be invoked when an <a href="#VALARM">ALARM</a> is triggered,<br /> &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;.
<h5>get ACTION</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;Action&quot; )</p>
<p class="comment">output = actionValue <span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;Action&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; actionValue<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$action = $valarm->getProperty( &quot;action&quot; );</p>
<h5>set ACTION</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;Action&quot;, actionValue [, xparam ] )</p>
<p class="comment">actionValue<span class="ref">1</span> = one of &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;
xparam<span class="ref">2</span>      = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$valarm->setProperty( &quot;action&quot;, &quot;DISPLAY&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="ATTACH"></a><h3>3.2.6 ATTACH</h3>
The property provides the capability to associate a document object with a calendar component.
<br /><br />
The default value type for ATTACH is URI. The value type can also be set to BINARY to indicate inline binary encoded content information (params <span class="ref">2</span>).
<h5>get ATTACH</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;Attach&quot; )</p>
<p class="comment">output = attachValue <span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;ATTACH&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; attachValue<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$attach = $valarm->getProperty( &quot;attach&quot; );</p>
<h5>Set ATTACH</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;attach&quot;, attachValue <span class="ref">1</span> [, params ] )</p>
<p class="comment">attachValue<span class="ref">1</span> = URI / inline binary encoded content information.
params<span class="ref">2</span>      = array( [ &quot;ENCODING&quot; =&gt; &quot;BASE64&quot;, &quot;VALUE&quot; =&gt; &quot;BINARY&quot; ]
                      [, &quot;FMTTYPE&quot; =&gt; contentType ]
                      [,&nbsp;xparam ] )
contentType  = The parameter value MUST be the TEXT for either an IANA 
               registered content type or a non-standard content type.
xparam       = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;attach&quot;
                    , &quot;ftp://domain.com/pub/docs/agenda.doc&quot;
                    , array( &quot;FMTTYPE&quot; =&gt; &quot;application/binary&quot; ));
</p>
<a href="#INDEX">[index]</a>


<a name="ATTENDEE"></a><h3>3.2.7 ATTENDEE</h3>
The property defines an "Attendee" within a calendar component.
<br /><br />
This value type for ATTENDEE is URI, a calendar user address.
<h5>get ATTENDEE</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;Attendee&quot; )</p>
<p class="comment">output = attendeeValue <span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;ATTENDEE&quot;, int propOrderNo/FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; attendeeValue<span class="ref">1</span>
              , &quot;params&quot; =&gt; array( params<span class="ref">2</span> ))</p>
<p class="label">Example</p>
<p class="format">$attendee = $valarm->getProperty( &quot;attendee&quot; );</p>
<h5>Set ATTENDEE</h5>
If exist, default parameter values are removed after input (params<span class="ref">2</span>).
<p class="label">Format</p>
<p class="format">setProperty( &quot;attendee&quot;, attendeeValue [, params ] )</p>
<p class="comment">attendeeValue<span class="ref">1</span> = a calendar user address, a URI as defined by [RFC 1738]
                 or any other IANA registered form for a URI.
params<span class="ref">2</span>        = array( [CUTYPE] [,MEMBER] [,ROLE] [,PARTSTAT] [,RVSP] 
                       [,DELEGATED-TO] [,DELEGATED-FROM] [,SENT-BY] 
                       [,CN] [,DIR] [,LANGUAGE] [,xparams] )
CUTYPE        = "CUTYPE" =&gt; &quot;INDIVIDUAL&quot;
                                (An individual, <b>Default</b>)
                          / &quot;GROUP&quot;
                                (A group of individuals)
                          / &quot;RESOURCE&quot;
                                (A physical resource)
                          / &quot;ROOM&quot;
                                (A room resource)
                          / &quot;UNKNOWN&quot;
                                (Otherwise not known)
                          / x-name
                                (Experimental type)
                          / iana-token
                                (Other IANA registered type)
MEMBER        = "MEMBER" =&gt; array( *[ &quot;single member 
                                       of the group or list membership&quot;])
ROLE          = "ROLE"   =&gt; &quot;CHAIR&quot;
                                (Indicates chair of the calendar entity)
                          / &quot;REQ-PARTICIPANT&quot;
                                (required participation, <b>Default</b>)
                          / &quot;OPT-PARTICIPANT&quot;
                                (optional participation)
                          / &quot;NON-PARTICIPANT&quot;
                                (information purposes only)
                          / x-name
                                (Experimental role)
                          / iana-token
                                (Other IANA role)
PARTSTAT       = &quot;PARTSTAT&quot; =&gt; &quot;NEEDS-ACTION&quot;
                                (Event needs action, <b>Default</b>)
                             / &quot;ACCEPTED&quot;
                                (Event accepted)
                             / &quot;DECLINED&quot;
                                (Event declined)
                             / &quot;TENTATIVE&quot;
                                (Event tentatively accepted)
                             / &quot;DELEGATED&quot;
                                (Event delegated)
                             / &quot;NEEDS-ACTION&quot;
                                (To-do needs action, <b>Default</b>)
                             / &quot;ACCEPTED&quot;
                                (To-do accepted)
                             / &quot;DECLINED&quot;
                                (To-do declined)
                             / &quot;TENTATIVE&quot;
                                (To-do tentatively accepted)
                             / &quot;DELEGATED&quot;
                                (To-do delegated)
                             / &quot;COMPLETED&quot;
                                (To-do completed.
                                 <a href="#COMPLETED">COMPLETED</a> property
                                 has date/time completed)
                             / &quot;IN-PROCESS&quot;
                                (To-do in process of being completed)
                             / &quot;NEEDS-ACTION&quot;
                                (Journal needs action, <b>Default</b>)
                             / &quot;ACCEPTED&quot;
                                (Journal accepted)
                             / &quot;DECLINED&quot;
                                (Journal declined)
                             / x-name
                                (Experimental status)
                             / iana-token
                                (Other IANA registered status)
RSVP           = &quot;RSVP&quot; =&gt; &quot;TRUE&quot; / &quot;FALSE&quot;, <b>Default</b> (reply expectation)
DELEGATED-TO   = &quot;DELEGATED-TO&quot; =&gt; array(*[&quot;single calendar user to
                                            whom the calendar user 
                                            specified by the property
                                            has delegated participation&quot;])
DELEGATED-FROM = &quot;DELEGATED-FROM&quot; =&gt; array( *[ &quot;single calendar user that
                                                have delegated their 
                                                participation to the 
                                                calendar user specified
                                                by the property&quot; ] )
SENT-BY        = &quot;SENT-BY&quot; =&gt; single calendar user that is
                              acting on behalf
                              of the calendar user
                              specified by the property&quot;
LANGUAGE       = &quot;LANGUAGE&quot; =&gt; language for text values in CN parameter&quot;
CN             = &quot;CN&quot; =&gt; &quot;common name to be associated with the calendar
                          user specified by the property&quot;
DIR            = &quot;DIR&quot; =&gt; &quot;reference to a directory entry associated with 
                           the calendar user specified by the property&quot;
xparam         = *[ xparamkey =&gt; xparamvalue ]</p>
See rules in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445 in text format"><b>text</b></a> and <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" title="RFC2445 in HTML format" target="_blank"><b>HTML</b></a> format.
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;attendee&quot;
                    , &quot;hide@address.com&quot;
$vevent->setProperty( &quot;attendee&quot;
                    , &quot;hide@address.com&quot;
                    , array( &quot;cutype&quot;   =&gt; &quot;INDIVIDUAL&quot;
                           , &quot;member&quot;   =&gt; array( &quot;hide@address.com&quot;
                                                , &quot;hide@address.com&quot;
                                                , &quot;hide@address.com&quot; )
                           , &quot;role&quot;     =&gt; &quot;CHAIR&quot;
                           , &quot;PARTSTAT&quot; =&gt; &quot;ACCEPTED&quot;
                           , &quot;RSVP&quot;     =&gt; &quot;TRUE&quot;
                           , &quot;DELEgated-to&quot; =&gt; array( &quot;hide@address.com&quot;
                                                    , &quot;hide@address.com&quot;
                                                    , &quot;hide@address.com&quot; )
                           , &quot;delegateD-FROM&quot; =&gt; array( &quot;hide@address.com&quot;
                                                      , &quot;hide@address.com&quot;
                                                      , &quot;hide@address.com&quot; )
                           , &quot;SENT-BY&quot;  =&gt; &quot;hide@address.com&quot;
                           , &quot;LANGUAGE&quot; =&gt; &quot;us-EN&quot;
                           , &quot;CN&quot;       =&gt; &quot;John Doe&quot;
                           , &quot;DIR&quot;      =&gt; &quot;http://www.ical.net/doc/info.doc&quot;
                           , &quot;x-agenda&quot; =&gt; &quot;status report&quot;  // <span class="ref">xparam</span>
                           , &quot;x-length&quot; =&gt; &quot;15 min&quot;  )); // <span class="ref">xparam</span>
</p>
<a href="#INDEX">[index]</a>

<a name="CATEGORIES"></a><h3>3.2.8 CATEGORIES</h3>
This property defines the categories for a calendar component.<br /><br />
The value type for CATEGORIES is TEXT.
<h5>get CATEGORIES</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;CATEGORIES&quot; )</p>
<p class="comment">output = categoryValue<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;CATEGORIES&quot;, int propOrderNo/FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; categories<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$categories = $valarm->getProperty( &quot;categories&quot; );</p>
<h5>Set CATEGORIES</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;categories&quot;, mixed categories [, params ] )</p>
<p class="comment">categories<span class="ref">1</span>   = string categoryValue / array( *categoryValue )
categoryValue = textual categories or subtypes of the calendar component, 
                can be specified as a list of categories
                separated by the COMMA character
params<span class="ref">2</span>       = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;][, xparam] )
xparam        = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;categories&quot;, &quot;project_x&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="CLASS"></a><h3>3.2.9 CLASS</h3>
This property defines the access classification for a calendar component.
<h5>get CLASS</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;CLASS&quot; )</p>
<p class="comment">output = classValue<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;CLASS&quot;, FALSE , TRUE )</p>
<p class="comment">output = array &quot;value&quot;   =&gt; classValue<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$class = $valarm->getProperty( &quot;class&quot; );</p>
<h5>set CLASS</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;class&quot;, string classvalue [, xparam ] )</p>
<p class="comment">classvalue<span class="ref">1</span> = &quot;PUBLIC&quot; 
            / &quot;PRIVATE&quot; 
            / &quot;CONFIDENTIAL&quot; 
            / iana-token 
            / x-name
xparam<span class="ref">2</span>     = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;class&quot;, &quot;CONFIDENTIAL&quot; );</p>
<a href="#INDEX">[index]</a>

<a name="COMMENT"></a><h3>3.2.10 COMMENT</h3>
This property specifies non-processing information intended to provide a comment to the calendar user.<br /><br />
The value type for COMMENT is TEXT.
<h5>get COMMENT</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;COMMENT&quot; )</p>
<p class="comment">output = commentValue<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;COMMENT&quot;, int propOrderNo/FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; commentValue<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$comment = $vevent->getProperty( &quot;comment&quot; );</p>
<h5>Set COMMENT</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;comment&quot;, commentValue [, params ] )</p>
<p class="comment">commentValue<span class="ref">1</span> = Value type Text
params<span class="ref">2</span>       = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;]
                      [, &quot;ALTREP&quot; =&gt; &quot;&lt;an alternate text
                                       representation, URI&gt;&quot;]
                      [, xparam] )
xparam        = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;comment&quot;, &quot;this is a comment&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="COMPLETED"></a><h3>3.2.11 COMPLETED</h3>
This property defines the date and time that a <a href="#VTODO">to-do</a> was actually completed.<br /><br />
The value type for COMPLETED is DATE-TIME, <a href="#DATE_WITH_UTC_TIME">UTC</a>.
<h5>get COMPLETED</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;COMPLETED&quot; )</p>
<p class="comment">output = completedDate<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;COMPLETED&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; completedDate<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$completed = $vtodo->getProperty( &quot;completed&quot; );</p>
<h5>Set COMPLETED</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;completed&quot;, mixed completedDate [, xparam ] )</p>
<p class="comment">completedDate is Always</b> <a href="#DATE_WITH_UTC_TIME">UTC</a> format!
completedDate<span class="ref">1</span> = array( &quot;year&quot;  =&gt; int year
                      , &quot;month&quot; =&gt; int month
                      , &quot;day&quot;   =&gt; int day 
                     [, &quot;hour&quot;  =&gt; int hour
                      , &quot;min&quot;   =&gt; int min
                      , &quot;sec&quot;   =&gt; int sec] )
completedDate  = int year
               , int month
               , int day 
              [, int hour
               , int min
               , int sec ]
completedDate  = array( int year
                      , int month
                      , int day
                     [, int hour
                      , int min
                      , int sec ] )
completedDate  = array ( &quot;timestamp&quot; =&gt; int timestamp )
completedDate  = string datestring // <span class="ref">string date, acceptable by strtotime-command,
                                                    ex. &nbsp;&quot;14 august 2006 16.00.00&quot; 
                                                    (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
xparam<span class="ref">2</span>        = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example 1</p>
<p class="format">$vtodo->setProperty( &quot;completed&quot;, 2006, 8, 10 ); // <span class="ref">10 august 2006 UTC</span></p>
<p class="label">Example 2</p>
<p class="format">$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. . 
$date = array(&quot;year&quot; =&gt; 2006, &quot;month&quot; =&gt; 10, &quot;day&quot; =&gt; 10, &quot;tz&quot; =&gt; &quot;+0200&quot;);
$date = $vcalendar->validDate( $date, TRUE );<br /> // <span class="ref">local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
$vtodo->setProperty( &quot;completed&quot;, $date );
.. .</p>
<a href="#INDEX">[index]</a>


<a name="CONTACT"></a><h3>3.2.12 CONTACT</h3>
The property is used to represent textual contact information or alternately a reference to textual contact information associated with the calendar component.<br /><br />
The value type for CONTACT is TEXT.
<h5>get CONTACT</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;CONTACT&quot; )</p>
<p class="comment">output = contactValue<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;CONTACT&quot;, int propOrderNo/FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; contactValue<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$contact = $vevent->getProperty( &quot;contact&quot; );</p>
<h5>Set CONTACT</h5>
<p class="label">Format</p>
<p class="format">setproperty( &quot;contact&quot;, contactValue [, params] )</p>
<p class="comment">contactValue<span class="ref">1</span> = Value type TEXT
params<span class="ref">2</span>       = array ( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;]
                        [, &quot;ALTREP&quot; =&gt; &quot;&lt;an alternate text
                                         representation, URI&gt;&quot;]
                        [, xparam] )
xparam        = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$c->setProperty( &quot;contact&quot;, &quot;tel 012-34 56 789&quot; )</p>
<a href="#INDEX">[index]</a>


<a name="CREATED"></a><h3>3.2.13 CREATED</h3>
This property specifies the date and time that the calendar information was created by the calendar user agent in the calendar store. Note: This is analogous to the creation date and time for a file in the file system.<br /><br />
The value type for CREATED is DATE-TIME, <a href="#DATE_WITH_UTC_TIME">UTC</a>.
<h5>get CREATED</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;CREATED&quot; )</p>
<p class="comment">output = createdDate<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;CREATED&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; createdDate<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$created = $vevent->getProperty( &quot;CREATED&quot; );</p>
<h5>Set CREATED</h5>
Input date is always considered as DATE-TIME.
<p class="label">Format</p>
<p class="format">setProperty( &quot;created&quot;, [ createdDate [, xparam ]] )</p>
<p class="comment">createdDate is <b>Always</b> <a href="#DATE_WITH_UTC_TIME">UTC</a> format!
createdDate<span class="ref">1</span> = array( &quot;year&quot;  =&gt; int year
                    , &quot;month&quot; =&gt; int month
                    , &quot;day&quot;   =&gt; int day 
                   [, &quot;hour&quot;  =&gt; int hour
                    , &quot;min&quot;   =&gt; int min
                    , &quot;sec&quot;   =&gt; int sec )
createdDate  = int year
             , int month
             , int day
            [, int hour
             , int min
             , int sec ]]
createdDate  = array( int year
                    , int month
                    , int day
                   [, int hour
                    , int min
                    , int sec] )
createdDate  = array ( &quot;timestamp&quot; =&gt; int timestamp )
createdDate  = string datestring,  // <span class="ref">string date, acceptable by strtotime-command, 
                                                    ex.&nbsp;14 august 2006 16.00.00&quot; 
                                                    (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
xparam<span class="ref">2</span>      = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example 1</p>
<p class="format">$vevent->setProperty( &quot;created&quot;, 2006, 8, 11, 14, 30, 35 );
 // <span class="ref">11 august 2006 14.30.35 UTC</span>	</p>
<p class="label">Example 2</p>
<p class="format">$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. .
$date = array(&quot;year&quot; =&gt; 2006, &quot;month&quot; =&gt; 10, &quot;day&quot; =&gt; 10, &quot;tz&quot; =&gt; &quot;+0200&quot;);
$date = $vcalendar->validDate( $date, TRUE );
 // <span class="ref">local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
$vtodo->setProperty( &quot;created&quot;, $date );
.. .</p>
<p class="label">Example 3</p>
<p class="format">$vevent->setProperty( &quot;created&quot; );
 // <span class="ref">current UTC date-time is set if called without parameters</span></p>
<a href="#INDEX">[index]</a>


<a name="DESCRIPTION"></a><h3>3.2.14 DESCRIPTION</h3>
This property provides a more complete textual description of the calendar component, than that provided by the <a href="#SUMMARY">SUMMARY</a> property (, analogous to a mail BODY).<br /><br />
The value type for DESCRIPTION is TEXT.
<h5>get DESCRIPTION</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;DESCRIPTION&quot; )</p>
<p class="comment">output = descriptionValue<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;DESCRIPTION&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; descriptionValue<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$description = $vevent->getProperty( &quot;description&quot; );</p>
<h5>Set DESCRIPTION</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;description&quot;, descriptionValue [, params ] )</p>
<p class="comment">descriptionValue<span class="ref">1</span> = Value type TEXT
params<span class="ref">2</span>           = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;]
                         [, &quot;ALTREP&quot; =&gt; &quot;&lt;an alternate text 
                                          representation, URI&gt;&quot;]
                         [, xparam] )
xparam           = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;description&quot;, &quot;This is a description&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="DTEND"></a><h3>3.2.15 DTEND</h3>
This property specifies the date and time that a calendar component ends.<br /><br />
The default value type for DTEND is DATE-TIME, can be set to a DATE value type.<br /><br />
Notice that an end date without a time is in effect midnight of the day before the date, so for timeless dates, use the date following the event date for it to be correct. For an &quot;all-day event&quot; and using timeless dates, the DTEND is equal DTSTART plus one day, example all-day event (2007-12-01)<br />DTSTART;VALUE=DATE:20071201<br /> DTEND;VALUE=DATE:20071202.
<h5>get DTEND</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;DTEND&quot; )</p>
<p class="comment">output = dtendDate<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;DTEND&quot;, FALSE , TRUE )</span>
<p class="comment">output = array( &quot;value&quot;  =&gt; dtendDate<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$dtend = $vevent->getProperty( &quot;dtend&quot; );</p>
<h5>Set DTEND</h5>
If exist, default parameter value ( &quot;VALUE&quot; = &quot;DATE-TIME&quot; ) is (identified and) removed after input (params<span class="ref">2</span>).
<p class="label">Format</p>
<p class="format">setProperty( &quot;dtend&quot;, dtendDate [, params ] )</span>
<p class="comment">dtendDate<span class="ref">1</span>    = array ( &quot;year&quot;  =&gt; int year
                      , &quot;month&quot; =&gt; int month
                      , &quot;day&quot;   =&gt; int day 
                     [, &quot;hour&quot;  =&gt; int hour
                      , &quot;min&quot;   =&gt; int min
                      , &quot;sec&quot;   =&gt; int sec 
                     [, &quot;tz&quot;    =&gt; mixed tz ]] )
dtendDate     = int year
              , int month
              , int day 
             [, int hour
              , int min
              , int sec
             [, mixed tz ]]
dtendDate     = array( int year
                     , int month
                     , int day 
                    [, int hour
                     , int min
                     , int sec
                    [, mixed tz ]] )
dtendDate     = array( &quot;timestamp&quot; =&gt; int timestamp [,&quot;tz&quot; =&gt; mixed tz])
dtendDate     = string datestring // <span class="ref">string date, acceptable by strtotime-command, 
                                                   ex.&nbsp;&quot;14 august 2006 16.00.00&quot; 
                                                   (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
dtendDate     : Within the "VFREEBUSY" calendar component,
                the time <b>MUST</b> be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> time format.
tz            = timezone / UTC offset
offset        = (+/-)HHmm[ss], local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span>       = array([ tzidparam/datetimeparam/dateparam ] *[,xparams])
tzidparam     = timezone identifier
                  // <span class="ref">date output as local date-time with timezone identifier</span>
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="ref">default, date output as date-time</span>
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="ref">date output as DATE, ex. all-day event</span>
xparams       = xparamkey =&gt; xparamvalue</p>
<p class="label">Example 1</p>
<p class="format">$vevent->setProperty( &quot;dtend&quot;
                    , 2006, 8, 11, 16, 30, 0 );</p>
<p class="ref"> // 11 august 2006 16.30.00 local date</p>
<p class="label">Example 2</p>
<p class="format">$vfreebusy->setProperty( &quot;dtend&quot;
                       , 2006, 8, 11, 16, 30, 0, &quot;-040000&quot; );</p>
<p class="ref"> // 11 august 2006 16.30.00 -040000 : local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</p>
<p class="label">Example 3</p>
<p class="format">$vevent->setProperty( &quot;dtend&quot;
                    , array( 'year' =&gt;, 2006, 'month' =&gt; 8, 'day'=&gt; 11 )
                    , array( 'VALUE' =&gt; 'DATE' ));</p>
<p class="ref"> // end of one or more all-day events</p>
<a href="#INDEX">[index]</a>


<a name="DTSTAMP"></a><h3>3.2.16 DTSTAMP</h3>
The property indicates the date/time that the instance of the iCalendar object was created.<br /><br />
The value type for DTSTAMP is DATE-TIME, <a href="#DATE_WITH_UTC_TIME">UTC</a>.
<h5>get DTSTAMP</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;DTSTAMP&quot; )</p>
<p class="comment">output = dtstampDate<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;DTSTAMP&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; dtstampDate<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$dtstamp = $vevent->getProperty( &quot;dtstamp&quot; );</p>
<h5>Set DTSTAMP</h5>
Input date is always considered as DATE-TIME.
DTSTAMP is <b>AUTO</b> GENERATED at component creation (not in valarm/timzone components).
<p class="label">Format</p>
<p class="format">setProperty( &quot;dtstamp&quot;, dtstampDate [, xparam ] )</p>
<p class="comment">dtstampDate <b>MUST</b> be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> time format.
dtstampDate<span class="ref">1</span> = array( &quot;year&quot;  =&gt; int year
                    , &quot;month&quot; =&gt; int month
                    , &quot;day&quot;   =&gt; int day 
                   [, &quot;hour&quot;  =&gt; int hour
                    , &quot;min&quot;   =&gt; int min
                    , &quot;sec&quot;   =&gt; int sec ] )
dtstampDate  = int year
             , int month
             , int day 
            [, int hour
             , int min
             , int sec]
dtstampDate  = array( int year
                    , int month
                    , int day
                   [, int hour
                    , int min, int sec ] )
dtstampDate  = array ( &quot;timestamp&quot; =&gt; int timestamp )
dtstampDate  = string datestring // <span class="ref">string date, acceptable by strtotime-command, 
                                                  ex.&nbsp;&quot;14 august 2006 16.00.00&quot; 
                                                  (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
xparam<span class="ref">2</span>      = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example 1</p>
<p class="format">$vevent->setProperty( &quot;dstamp&quot;
                    , 2006, 8, 11, 7, 30, 1 );</p>
<p class="ref"> // 11 august 2006 07.30.01 UTC</p>
<p class="label">Example 2</p>
<p class="format">$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. . 
$date = array(&quot;year&quot; =&gt; 2006, &quot;month&quot; =&gt; 10, &quot;day&quot; =&gt; 10, &quot;tz&quot; =&gt; &quot;+0200&quot;);
$date = $vcalendar->validDate( $date, TRUE );
  // <span class="ref">local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
$vtodo->setProperty( &quot;dtstamp&quot;, $date );
.. .</p>
<a href="#INDEX">[index]</a>

<a name="DTSTART"></a><h3>3.2.17 DTSTART</h3>
This property specifies when the calendar component begins.<br /><br />
The default value type for DTSTART is DATE-TIME, can be set to a DATE value type.<br /><br />
For an &quot;all-day event&quot; and using timeless dates, example (2007-12-01)<br />
DTSTART;VALUE=DATE:20071201<br />
DTEND;VALUE=DATE:20071202. // <span class="ref">opt., in effect midnight of the day <u>before</u> the date!!</span>
<h5>get DTSTART</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;DTSTART&quot; )</p>
<p class="comment">output = dtstartDate<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;DTSTART&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; dtstartDate<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$dtstart = $vevent->getProperty( &quot;dtstart&quot; );</p>
<h5>Set DTSTART</h5>
If exist, default parameter value ( &quot;VALUE&quot; = &quot;DATE-TIME&quot; ) is (identified and) removed after input (params<span class="ref">2</span>).
<p class="label">Format</p>
<p class="format">setProperty( &quot;dtstart&quot;, mixed dtstartDate [, params ] )</p>
<p class="comment">dtstartDate<span class="ref">1</span>  = array( &quot;year&quot;  =&gt; int year
                     , &quot;month&quot; =&gt; int month
                     , &quot;day&quot;   =&gt; int day 
                    [, &quot;hour&quot;  =&gt; int hour
                     , &quot;min&quot;   =&gt; int min
                     , &quot;sec&quot;   =&gt; int sec
                    [, &quot;tz&quot;   =&gt; mixed tz ]] )
dtstartDate   = int year
              , int month
              , int day
             [, int hour
              , int min
              , int sec
             [, mixed tz ]]
dtstartDate   = array( int year
                     , int month
                     , int day
                    [, int hour
                     , int min
                     , int sec
                    [, mixed tz ]] )
dtstartDate   = array(&quot;timestamp&quot; =&gt; int timestamp [, &quot;tz&quot; =&gt; mixed tz])
dtstartDate   = string datestring // <span class="ref">string date, acceptable by strtotime-command, 
                                                   ex.&nbsp;&quot;14 august 2006 16.00.00&quot; 
                                                   (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
dtstartDate : Within the "VFREEBUSY" calendar component,
              the time <b>MUST</b> be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> time format.
tz            = timezone / offset
offset        = (+/-)HHmm[ss], local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span>       = array([ tzidparam/datetimeparam/dateparam ] *[, xparams])
tzidparam     = timezone identifier
                  // <span class="ref">date output as local date-time with timezone identifier</span>
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="ref">default, date output as date-time</span>
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="ref">date output as DATE, ex. all-day event</span>
xparams       = xparamkey =&gt; xparamvalue</p>
<p class="label">Example 1</p>
<p class="format">$vevent->setProperty( &quot;dstart&quot;
                    , 2006, 8, 11, 7, 30, 1 );</p>
<p class="comment"> // 11 august 2006 07.30.01 local date</p>
<p class="label">Example 2</p>
<p class="format">$vevent->setProperty( width="75%">&quot;dstart&quot;
                    , 2006, 8, 11, 16, 30, 0, &quot;-040000&quot; );</p>
<p class="comment"> // 11 august 2006 16.30.00 -040000,
 // local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</p>
<p class="label">Example 3</p>
<p class="format">$vevent->setProperty( &quot;dtstart&quot;
                    , array( 'year' =&gt;, 2006, 'month' =&gt; 8, 'day'=&gt; 11 )
                    , array( 'VALUE' =&gt; 'DATE' ));</p>
<p class="comment"> // start of an all-day event, or a period of (entire) days</p>
<a href="#INDEX">[index]</a>


<a name="DUE"></a><h3>3.2.18 DUE</h3>
This property defines the date and time when a <a href="#VTODO">to-do</a> is expected to be completed.<br /><br />
The default value type for DUE is DATE-TIME, can be set to a DATE value type.
<h5>get DUE</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;DUE&quot; )</p>
<p class="comment">output = dueDate<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;DUE&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; dueDate<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$due = $vtodo->getProperty( &quot;due&quot; );</p>
<h5>Set DUE</h5>
If exist, default parameter value ( &quot;VALUE&quot; = &quot;DATE-TIME&quot; ) is (identified and) removed after input (params<span class="ref">2</span>).
<p class="label">Format</p>
<p class="format">setProperty( &quot;due&quot;, mixed dueDate [, params ] )</p>
<p class="comment">dueDate<span class="ref">1</span>      = array( &quot;year&quot;   =&gt; int year
                     , &quot;month&quot; =&gt; int month
                     , &quot;day&quot;   =&gt; int day 
                    [, &quot;hour&quot;  =&gt; int hour
                     , &quot;min&quot;   =&gt; int min
                     , &quot;sec&quot;   =&gt; int sec
                    [, &quot;tz&quot;   =&gt; mixed tz ]] )
dueDate       = int year
              , int month
              , int day
             [, int hour
              , int min
              , int sec
             [, mixed tz ]]
dueDate       = array( int year
                     , int month
                     , int day
                    [, int hour
                     , int min
                     , int sec
                    [, mixed tz ]] )
dueDate       = array( &quot;timestamp&quot; =&gt; int timestamp [, &quot;tz&quot; =&gt; mixed tz])
dueDate       = string datestring // <span class="ref">string date, acceptable by strtotime-command,
                                                   ex.&nbsp;&quot;14 august 2006 16.00.00&quot; 
                                                   (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
tz            = timezone / offset
offset        = (+/-)HHmm[ss], local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span>       = array([ tzidparam/datetimeparam/dateparam ] *[, xparams])
tzidparam     = timezone identifier
                 // <span class="ref">date output as local date-time with timezone identifier</span>
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="ref">default, date output as date-time</span>
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="ref">date output as DATE, &quot;during the day&quot;</span>
xparams       = xparamkey =&gt; xparamvalue<p/>
<p class="label">Example 1</p>
<p class="format">$vtodo->setProperty( &quot;due&quot;
                   , 2006, 8, 11, 18, 0, 0 );</p>
<p class="comment"> // 11 august 2005 18.00.00 local date</p>
<p class="label">Example 2</p>
<p class="format">$vtodo->setProperty( &quot;due&quot;
                   , 2006, 8, 11, 16, 30, 0, &quot;-040000&quot; );</p>
<p class="comment"> // 11 august 2006 16.30.00 -040000
 // local date + UTC offset sets <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</p>
<p class="label">Example 3</p>
<p class="format">$vevent->setProperty( &quot;due&quot;
                    , array( 'year' =&gt;, 2006, 'month' =&gt; 8, 'day'=&gt; 11 )
                    , array( 'VALUE' =&gt; 'DATE' ));</p>
<p class="comment"> // due &quot;during the day&quot;</p>
<a href="#INDEX">[index]</a>


<a name="DURATION"></a><h3>3.2.19 DURATION</h3>
The property specifies a positive duration of time.
<h5>get DURATION</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;DURATION&quot; )</p>
<p class="comment">output = duration<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;DURATION&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; duration<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$duration = $vtodo->getProperty( &quot;duration&quot; );</p>
<p class="label">option</p>
If a 4th argument is used and set to TRUE, returned output is in a DATE-TIME
 output format (like <a href="#DTEND">DTEND</a> / <a href="#DUE">DUE</a>), based on 
<a href="#DTSTART">DTSTART</a> value with added DURATION value,<br /><a href="#DTEND">output,&nbsp;
getProperty(&nbsp;&quot;DTEND&quot;&nbsp;)</a> or <a href="#DUE">output,&nbsp;getProperty(&nbsp;&quot;DUE&quot;&nbsp;)</a>
<h5>Set DURATION</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;duration&quot;, mixed duration [, xparam ] )</p>
<p class="comment">duration<span class="ref">1</span>  = array( &quot;week&quot; =&gt; int week/false
                 [, &quot;day&quot;  =&gt; int day/false 
                 [, &quot;hour&quot; =&gt; int hour/false
                  , &quot;min&quot;  =&gt; int min/false
                  , &quot;sec&quot;  =&gt; int sec/false ]] )
duration   = array ( &quot;week&quot; =&gt; int week )
duration   = array ( &quot;day&quot; =&gt; int week )
duration   = array ( &quot;hour&quot; =&gt; int hour
                   , &quot;min&quot; =&gt; int min
                   , &quot;sec&quot; =&gt; int sec )
duration   = array ( &quot;sec&quot; =&gt; int sec )
duration   = int week/false
          [, int day/false
          [, int hour
           , int min
           , int sec]]
duration   = array( int week/false
                 [, int day/false
                 [, int hour
                  , int min
                  , int sec]] )
duration   = string dur-value = [&quot;+&quot;] &quot;P&quot; (dur-date/dur-time/dur-week)
dur-date   = dur-day [dur-time]
dur-time   = &quot;T&quot; (dur-hour / dur-minute / dur-second)
dur-week   = 1*DIGIT &quot;W&quot;
dur-hour   = 1*DIGIT &quot;H&quot; [dur-minute]
dur-minute = 1*DIGIT &quot;M&quot; [dur-second]
dur-second = 1*DIGIT &quot;S&quot;
dur-day    = 1*DIGIT &quot;D&quot;
xparam<span class="ref">2</span>     = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example 1</p>
<p class="format">$vtodo->setProperty &quot;duration&quot;
                   , array( &quot;day&quot; =&gt; 1 )); </p>
<p class="ref">// one day</p>
<p class="label">Example 2</p>
<p class="format">$vtodo->setProperty( &quot;duration&quot;
                   , &quot;PT4H&quot; );
<p class="ref"> // four hours</p>
<a href="#INDEX">[index]</a>


<a name="EXDATE"></a><h3>3.2.20 EXDATE</h3>
This property defines the list of date/time exceptions for a recurring calendar component.<br /><br />
The default value type for EXDATE is DATE-TIME, can be set to a DATE value type.
<h5>get EXDATE</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;EXDATE&quot; )<p>
<p class="comment">output = exdates<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;exdate&quot;, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; exdates<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$exdate = $vtodo->getProperty( &quot;exdate&quot; );</p>
<h5>set EXDATE</h5>
If exist, default parameter value ( &quot;VALUE&quot; = &quot;DATE-TIME&quot; ) is (identified and) removed after input (params <span class="ref">2</span>).
<p class="label">Format</p>
<p class="format">setProperty( &quot;exdate&quot;, exdates [, params ] )</p>
<p class="comment">exdates<span class="ref">1</span>      = array ( date *[, date ] )
date          = array( int year
                     , int month
                     , int day
                    [, int hour
                     , int min
                     , int sec
                     , mixed tz ]] )
date<span class="ref">1</span>         = array( &quot;year&quot;  =&gt; int year
                     , &quot;month&quot; =&gt; int month
                     , &quot;day&quot;   =&gt; int day 
                    [, &quot;hour&quot;  =&gt; int hour
                     , &quot;min&quot;   =&gt; int min
                     , &quot;sec&quot;   =&gt; int sec
                    [, &quot;tz&quot;    =&gt; mixed tz ]] )
date          = array( &quot;timestamp&quot; =&gt; int timestamp [, &quot;tz&quot; =&gt; mixed tz])
date          = string datestring // <span class="ref">string date, acceptable by strtotime-command,
                                                   ex.&nbsp;&quot;14 august 2006 16.00.00&quot; 
                                                   (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
tz            = timezone / offset
offset        = (+/-)HHmm[ss], local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span>       = array([(datetimeparam/dateparam)&nbsp;/ tzidparam] [,xparam])
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="ref">default, date output as date-time</span>
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="ref">date output as DATE</span>
tzidparam     = &quot;TZID&quot; =&gt; text
xparam        = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example 1</p>
<p class="format">$vevent->setProperty( &quot;exdate&quot;
                    , array( array( 2006, 8, 14, 16, 0, 0 ));</p>
<p class="ref"> // >exclude 2006-08-14 16.00.00 (local date) from recurrence pattern</p>
<p class="label">Example 2</p>
<p class="format">$vevent->setProperty( &quot;exdate&quot;
                    , array( array('year' =&gt;,2006,'month' =&gt; 8,'day'=&gt; 11))
                    , array( 'VALUE' =&gt; 'DATE' ));</p>
<p class="ref"> // exclude 2006-08-11 from recurrence pattern;</p>
<a href="#INDEX">[index]</a>


<a name="EXRULE"></a><h3>3.2.22 EXRULE</h3>
This property defines a rule or repeating pattern for an exception to a recurrence set.
<h5>get EXRULE</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;EXRULE&quot; )</p>
<p class="comment">output = recur<span class="ref">1</span></p>
<p class="format 2">getProperty( &quot;exrule&quot;, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; recur<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$exrule = $vtodo->getProperty( &quot;exrule&quot; );</p>
<h5>Set EXRULE</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;exrule&quot;, recur [, xparam ] )</p>
<p class="label">Format</p>
See rules in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in <a href="http://www.kigkonsult.se/iCalcreator/downloads/dl.php?f=rfc2445" title="RFC2445 in text format"><b>text</b></a>
and <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" title="RFC2445 in HTML format" target="_blank"><b>HTML</b></a> format.
<p class="comment">recur<span class="ref">1</span>      = array( "FREQ"=&gt;freq
     // <span class="ref">either UNTIL or COUNT may appear in a &quot;recur&quot;,
           but UNTIL and COUNT MUST NOT occur in the same &quot;recur&quot;</span>
                  [, &quot;UNTIL&quot; &quot;=&gt;&quot; >enddate ]
                  [, &quot;COUNT&quot; &quot;=&gt;&quot; 1*DIGIT ]
     // <span class="ref">the rest of these keywords are optional, but MUST NOT occur more than once</span>
                  [, &quot;INTERVAL&quot;   &quot;=&gt;&quot; 1*DIGIT ]
                  [, &quot;BYSECOND&quot;   &quot;=&gt;&quot; byseclist ]
                  [, &quot;BYMINUTE&quot;   &quot;=&gt;&quot; byminlist ]
                  [, &quot;BYHOUR&quot;     &quot;=&gt;&quot; byhrlist ]
                  [, &quot;BYDAY&quot;      &quot;=&gt;&quot; bywdaylist ]
                  [, &quot;BYMONTHDAY&quot; &quot;=&gt;&quot; bymodaylist ]
                  [, &quot;BYYEARDAY&quot;  &quot;=&gt;&quot; byyrdaylist ]
                  [, &quot;BYWEEKNO&quot;   &quot;=&gt;&quot; bywknolist ]
                  [, &quot;BYMONTH&quot;    &quot;=&gt;&quot; bymolist ]
                  [, &quot;BYSETPOS&quot;   &quot;=&gt;&quot; bysplist ]
                  [, &quot;WKST&quot;       &quot;=&gt;&quot; weekday ]
                  [, x-name       &quot;=&gt;&quot; text ] )
freq        = &quot;SECONDLY&quot; /
              &quot;MINUTELY&quot; /
              &quot;HOURLY&quot;   /
              &quot;DAILY&quot;    /
              &quot;WEEKLY&quot;   /
              &quot;MONTHLY&quot;  /
              &quot;YEARLY&quot;
enddate     = date
enddate     = / date-time ;An <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value
byseclist   = seconds
byseclist   = array (seconds / ( seconds *("," seconds) ))
seconds     = 1DIGIT / 2DIGIT ;0 to 59
byminlist   = minutes
byminlist   = array( minutes / ( minutes *("," minutes) ))
minutes     = 1DIGIT / 2DIGIT ;0 to 59
byhrlist    = hour
byhrlist    = array( hour / ( hour *("," hour) ))
hour        = 1DIGIT / 2DIGIT ;0 to 23
bywdaylist  = weekdaynum
bywdaylist  = array( weekdaynum / ( weekdaynum *("," weekdaynum) ))
weekdaynum  = [([plus] ordwk / minus ordwk)] weekday
plus        = &quot;+&quot;
minus       = &quot;-&quot;
ordwk       = 1DIGIT / 2DIGIT ;1 to 53
weekday     = &quot;SU&quot; / &quot;MO&quot; / &quot;TU&quot; / &quot;WE&quot; / &quot;TH&quot; / &quot;FR&quot; / &quot;SA&quot;
                ; Corresponding to 
                ; SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
                ; FRIDAY, SATURDAY and SUNDAY days of the week.
bymodaylist = monthdaynum
bymodaylist = aray( monthdaynum / ( monthdaynum *("," monthdaynum) ))
monthdaynum = ([plus] ordmoday) / (minus ordmoday)
ordmoday    = 1DIGIT / 2DIGIT ;1 to 31
byyrdaylist = yeardaynum
byyrdaylist = array( yeardaynum / ( yeardaynum *("," yeardaynum) ))
yeardaynum  = ([plus] ordyrday) / (minus ordyrday)
ordyrday    = 1DIGIT / 2DIGIT / 3DIGIT ;1 to 366
bywknolist  = weeknum
bywknolist  = array( weeknum / ( weeknum *("," weeknum) ))
weeknum     = ([plus] ordwk) / (minus ordwk)
bymolist    = monthnum
bymolist    = array( monthnum / ( monthnum *("," monthnum) ))
monthnum    = 1DIGIT / 2DIGIT ;1 to 12
bysplist    = setposday
bysplist    = array( setposday / ( setposday *("," setposday) ))
setposday   = yeardaynum</p>
<p class="comment">
xparam<span class="ref">2</span> = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty(&nbsp;&quot;Exrule&quot;
                    ,&nbsp;array( &quot;FREQ&quot; =&gt; &quot;MONTHLY&quot;
                    , &quot;UNTIL&quot; =&gt; &quot;20060831&quot; 
   // <span class="ref">DATE / DATE-TIME in <a href="#DATE_WITH_UTC_TIME">UTC</a> format; string/array, see <a href="#CREATED">CREATED</a> format</span>
                    , &quot;INTERVAL&quot;   =&gt; 2 
                    , &quot;WKST&quot;       =&gt; &quot;SU&quot;
                    , &quot;BYSECOND&quot;   =&gt; 2
                    , &quot;BYMINUTE&quot;   =&gt; array( 2, -4, 6 ) // (*)
                    , &quot;BYHOUR&quot;     =&gt; array( 2, 4, -6 ) // (*)
                    , &quot;BYMONTHDAY&quot; =&gt; -2                // (*)
                    , &quot;BYYEARDAY&quot;  =&gt; 2                 // (*)
                    , &quot;BYWEEKNO&quot;   =&gt; array( 2, -4, 6 ) // (*)
                    , &quot;BYMONTH&quot;    =&gt; 2                 // (*)
                    , &quot;BYSETPOS&quot;   =&gt; array( 2, -4, 6 ) // (*)
                    , &quot;BYday&quot;      =&gt; array( array(-2, &quot;DAY&quot; =&gt; &quot;WE&quot; )
                                           , array( 3, &quot;DAY&quot; =&gt; &quot;TH&quot;)
                                           , array( 5, &quot;DAY&quot; =&gt; &quot;FR&quot;)
                                           , array(    &quot;DAY&quot; =&gt; &quot;MO&quot;))
                                                        // (**)
                    , &quot;X-NAME&quot;     =&gt; &quot;x-value&quot; )
                    , array( &quot;xparamkey&quot; =&gt; &quot;xparamValue&quot; ))

$vtodo->setProperty( >&quot;exrule&quot;
                   , array( &quot;FREQ&quot; =&gt; &quot;WEEKLY&quot;
                   , &quot;COUNT&quot;       =&gt; 2
                   , &quot;INTERVAL&quot;    =&gt; 2
                   , &quot;WKST&quot;        =&gt; &quot;SU&quot;
                   , &quot;BYSECOND&quot;    =&gt; array( -2, 4, 6 ) // (*)
                   , &quot;BYMINUTE&quot;    =&gt; -2                // (*)
                   , &quot;BYHOUR&quot;      =&gt; 2                 // (*)
                   , &quot;BYMONTHDAY&quot;  =&gt; array( 2, -4, 6 ) // (*)
                   , &quot;BYYEARDAY&quot;   =&gt; array( -2, 4, 6 ) // (*)
                   , &quot;BYWEEKNO&quot;    =&gt; -2                // (*)
                   , &quot;BYMONTH&quot;     =&gt; array( 2, 4, -6 ) // (*)
                   , &quot;BYSETPOS&quot;    =&gt; -2                // (*)
                   , &quot;BYday&quot;       =&gt; array( 5, &quot;DAY&quot; =&gt; &quot;WE&quot; )
                                                        // (**)
                   , &quot;X-NAME&quot; =&gt; &quot;x-value&quot;  ));
 // (*)  <span class="ref">single value/array of values</span>
//  (**) <span class="ref">single value array /array of arrays</span>
</p>
<a href="#INDEX">[index]</a>


<a name="FREEBUSY_PROP"></a><h3>3.2.22 FREEBUSY</h3>
The property defines one or more free or busy time intervals in a <a href="#VFREEBUSY">VFREEBUSY</a> calendar component.<br /><br />
The value type for FREEBUSY is PERIOD, DATE-TIME/DATE-TIME or DATE-TIME/duration.
<h5>get FREEBUSY</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;FREEBUSY&quot; )</p>
<p class="comment">output = array( &quot;fbtyp&quot; =&gt; freebusytype<span class="ref">1</span> , dateperiods<span class="ref">2</span> )</p>
<p class="format 2">getProperty( &quot;FREEBUSY&quot;, int propOrderNo/FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; array(&quot;fbtype&quot; =&gt; freebusytype<span class="ref">1</span> ,dateperiods<span class="ref">2</span>)
              , &quot;params&quot; =&gt; xparam<span class="ref"> 3</span> )</p>
<p class="label">Example</p>
<p class="format">$freebusy = $vfreebusy->getProperty( &quot;FREEBUSY&quot; );</p>
<h5>Set FREEBUSY</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;freebusy&quot;, freebusytype, dateperiods [, xparam ] )</p>
<p class="comment">freebusytype<span class="ref">1</span>     = one of &quot;FREE&quot;
                        / &quot;BUSY&quot; <b>Default</b>
                        / &quot;BUSY-UNAVAILABLE&quot;
                        / &quot;BUSY-TENTATIVE&quot;
                        /  x-name
dateperiods<span class="ref">2</span>      = array( array( startdate, enddate/duration )&nbsp;
                       *[, array( startdate, enddate/duration ) ] )
startdate/enddate = array( int year
                         , int month
                         , int day
                         , int int hour
                         , int min
                         , int day
                        [, string offset ] )
startdate/enddate = array( &quot;year&quot;  =&gt; int year
                         , &quot;month&quot; =&gt; int month
                         , &quot;day&quot;   =&gt; int day
                         , &quot;hour&quot;  =&gt; int hour
                         , &quot;min&quot;   =&gt; int min
                         , &quot;sec&quot;   =&gt; int sec
                        [, &quot;tz&quot;    =&gt; string offset ] ) // <span class="ref">output format</span>
startdate/enddate = array( &quot;timestamp&quot; =&gt; int timestamp 
                        [, &quot;tz&quot;        =&gt; string offset ] )
startdate/enddate = string datestring // <span class="ref">string date, acceptable by strtotime-command,
                                                         ex.&nbsp;&quot;14 august 2006 16.00.00&quot;
                                                         (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
startdate/enddate : date and time values <b>MUST</b> be
 an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or local DATE-TIME + UTC offset.
offset            = (+/-)HHmm[ss]
                    local date + UTC offset sets UTC DATE-TIME
duration          = array( int week/false
                        [, int day/false
                         , int hour
                         , int min
                         , int sec] )
duration          = array ( &quot;week&quot; =&gt; int week/false
                         [, &quot;day&quot;  =&gt; int day/false
                         [, &quot;hour&quot; =&gt; int hour
                          , &quot;min&quot;  =&gt; int min
                          , &quot;sec&quot;  =&gt; int sec ]] ); // <span class="ref">output format</span>
duration          = array( &quot;week&quot; =&gt; int week )
duration          = array( &quot;day&quot;  =&gt; int day )
duration          = array( &quot;hour&quot; =&gt; int hour
                         , &quot;min&quot;  =&gt; int min
                         , &quot;sec&quot; =&gt; int sec )
duration          = array ( &quot;sec&quot; =&gt; int sec )
duration          = string dur-value
                        = ([&quot;+&quot;]/&quot;-&quot;) &quot;P&quot; (dur-date/dur-time/dur-week)
dur-date          = dur-day [dur-time]
dur-time          = &quot;T&quot; (dur-hour / dur-minute / dur-second)
dur-week          = 1*DIGIT &quot;W&quot;
dur-hour          = 1*DIGIT &quot;H&quot; [dur-minute]
dur-minute        = 1*DIGIT &quot;M&quot; [dur-second]
dur-second        = 1*DIGIT &quot;S&quot;
dur-day           = 1*DIGIT &quot;D&quot;
xparam<span class="ref">3</span>           = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
See rules in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445 in text format"><b>text</b></a>
and <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" title="RFC2445 in HTML format" target="_blank"><b>HTML</b></a> format.
<p class="format">$fdate1 = array ( 2001, 1, 1, 1, 1, 1 );
alt.
$fdate1 = array ( &quot;year&quot;  =&gt; 2001
                , &quot;month&quot; =&gt; 1
                , &quot;day&quot;   =&gt; 1
                , &quot;hour&quot;  =&gt; 1
                , &quot;min&quot;   =&gt; 1
                , &quot;sec&quot;   =&gt; 1 );
$fdate2 = array ( 2002, 2, 2, 2, 2, 2 );
$fdate3 = array ( 2003, 3, 3, 3, 3, 3 );
$fdate4 = &quot;4 April 2005 4:4:4&quot;;
$fdate7 = array ( &quot;year&quot;  =&gt; 2007
                , &quot;month&quot; =&gt; 7
                , &quot;day&quot;   =&gt; 7 );
$fdur6  = array ( &quot;week&quot; =&gt; 0
                , &quot;day&quot;  =&gt; 5
                , &quot;hour&quot; =&gt; 5
                , &quot;min&quot;  =&gt; 5
                , &quot;sec&quot;  =&gt; 5 );
$fdur7  = array ( 0, 0, 6 );             // <span class="ref">duration for 6 hours</span>
$fdur8  = &quot;P2D&quot;; // <span class="ref">duration two days</span>
$freebusy->setProperty &quot;freebusy&quot;
                      , &quot;FREE&quot;
                      , array( array( $fdate1, $fdate2 )
                             , array( $fdate3, $fdur6 )
                             , array( $fdate4, $fdate5 )));
$freebusy->setProperty(&quot;freebusy&quot;
                      , &quot;Busy&quot;
                      , array( array( array( $fdate1, $fdate2 )
                             , array( $fdate3, $fdur8 )
                             , array( $fdate4, $fdur7 )
                             , array( $fdate1, $fdate3 )));</p>
<a href="#INDEX">[index]</a>


<a name="GEO"></a><h3>3.2.23 GEO</h3>
This property specifies information related to the global position for the activity specified by a calendar component. Value type for latitude and longitude is FLOAT. &quot;Values for latitude and longitude shall be expressed as decimal fractions of degrees. Whole degrees of latitude shall be represented by a two-digit decimal number ranging from 0 through 90. Whole degrees of longitude shall be represented by a decimal number ranging from 0 through 180. When a decimal fraction of a degree is specified, it shall be separated from the whole number of degrees by a decimal point.&quot;
<h5>get GEO</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;GEO&quot; )</p>
<p class="comment">output = array( &quot;latitude&quot;  =&gt; &lt;latitude&gt;
              , &quot;longitude&quot; =&gt; &lt;longitude&gt;))</p>
<p class="format 2">getProperty( &quot;GEO&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; array ( &quot;latitude&quot;  =&gt; &lt;latitude&gt;
                                 , &quot;longitude&quot; =&gt; &lt;longitude&gt;))
              , &quot;params&quot; =&gt; xparam <span class="ref">1</span> )</p>
<p class="label">Example</p>
<p class="format">$geo = $vevent->getProperty( &quot;GEO&quot; );</p>
<h5>Set GEO</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;geo&quot;, float latitude, float longitude [, xparam ] )</p>
<p class="comment">xparam <span class="ref">1</span> = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;geo&quot;, 11.23456, -23.45678 );</p>
<a href="#INDEX">[index]</a>


<a name="LAST-MODIFIED"></a><h3>3.2.24 LAST-MODIFIED</h3>
The property specifies the date and time that the information associated with the calendar component was last revised in the calendar store.<br /><br />
The value type for LAST-MODIFIED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
<h5>get LAST-MODIFIED</h5>
<p class="label">Format 1</p>
<p class="format">getProperty( &quot;LAST-MODIFIED&quot; )</p>
<p class="comment">output = moddate<span class="ref">1</span></p>
<p class="format">getProperty( &quot;LAST-MODIFIED&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; moddate<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$last-mod = $vevent->getProperty( &quot;LAST-MODIFIED&quot; );</p>
<h5>Set LAST-MODIFIED</h5>
Input date is always considered as DATE-TIME.
<p class="label">Format</p>
<p class="format">setProperty( &quot;Last-Modified&quot; [, moddate [, xparam ]] )</p>
<p class="comment">moddate<span class="ref">1</span> = array( &quot;year&quot;  =&gt; int year
                , &quot;month&quot; =&gt; int month
                , &quot;day&quot;   =&gt; int day 
               [, &quot;hour&quot;  =&gt; int hour
                , &quot;min&quot;   =&gt; int min
                , &quot;sec&quot;   =&gt; int sec ] )
moddate  = int year
         , int month
         , int day
        [, int hour
         , int min
         , int sec ]
moddate  = array( int year
                , int month
                , int day
               [, int hour
                , int min
                , int sec ] )
moddate  = array ( &quot;timestamp&quot; =&gt; int timestamp )
moddate  = string datestring // <span class="ref">string date, acceptable by strtotime-command,
                                            ex.&nbsp;&quot;14 august 2006 16.00.00&quot;
                                            (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
xparam<span class="ref">2</span>  = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example 1</p>
<p class="format">$vevent->setProperty(&quot;last-modified&quot;
                    , <td>2006, 8, 14, 12, 1, 2 );</p>
<p class="ref"> // 14 august 2006 12.01.02 UTC</p>
<p class="label">Example 2</p>
<p class="format">$vcalendar = new vcalendar();
$vtodo = new vtodo();
.. . 
$date = array(&quot;year&quot; =&gt; 2006, &quot;month&quot; =&gt; 10, &quot;day&quot; =&gt; 10, &quot;tz&quot; =&gt; &quot;+0200&quot;);
$date = $vcalendar->validDate( $date, TRUE );
 // <span class="ref">local date + UTC offset sets <a href="#DATE_WITH_UTC_TIME">UTC</a> format DATE-TIME</span>
$vtodo->setProperty( &quot;last-modified&quot;, $date );
.. .</p>
<p class="label">Example 3</p>
<p class="format">$vevent->setProperty( &quot;last-modified&quot; );</p>
<p class="ref"> // current UTC DATE-TIME is set if called without parameters</p>
<a href="#INDEX">[index]</a>

<a name="LOCATION"></a><h3>3.2.25 LOCATION</h3>
The property defines the intended venue for the activity defined by a calendar component.
<h5>get LOCATION</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;LOCATION&quot; )</p>
<p class="comment">output = location<span class="ref">1</span></p>
<p class="format">getProperty( &quot;LOCATION&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; location<span class="ref">1</span>
              , &quot;params&quot; =&gt; param<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$location = $vevent->getProperty( &quot;LOCATION&quot; );</p>
<h5>Set LOCATION</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;location&quot;, string location [, array param] )</p>
<p class="comment">location<span class="ref">1</span> = Value type TEXT
params<span class="ref">2</span>   = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;]
                  [, &quot;ALTREP&quot; =&gt; &quot;&lt;an alternate text
                                   representation, URI&gt;&quot;]
                  [, xparam ]
xparam    = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;location&quot;, &quot;Buckingham Palace&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="ORGANIZER"></a><h3>3.2.26 ORGANIZER</h3>
The property defines the organizer for a calendar component.<br /><br />
This value type for ORGANIZER is URI, a calendar user address.
<h5>get ORGANIZER</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;ORGANIZER&quot; )</p>
<p class="comment">output = organizer<span class="ref">1</span></p>
<p class="format">getProperty( &quot;ORGANIZER&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; organizer<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$organizer = $vevent->getProperty( &quot;ORGANIZER&quot; );</p>
<h5>Set ORGANIZER</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;organizer&quot;, organizer [, params] )</p>
<p class="comment">organizer<span class="ref">1</span> = a calendar user address, a URI as defined by [RFC 1738]
             or any other IANA registered form for a URI.
params<span class="ref">2</span>    = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot; 
                                  (applies to the CN parameter value) ]
                 [, &quot;CN&quot;       =&gt; &quot;common name to be associated
                                   with the calendar user
                                   specified by the property&quot;]
                 [, &quot;DIR&quot;      =&gt; &quot;reference to a directory entry
                                   associated with the calendar user
                                   specified by the property&quot; ]
                 [, &quot;SENT-BY&quot;  =&gt; &quot;single calendar user
                                   that is acting on behalf
                                   of the calendar user
                                   specified by the property&quot; ]
                 [, xparam ]
xparam     = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>

<p class="format">
$dir = &quot;ldap://host.com:6666/o=3DDC%20Comp,c=3DUS??(cn=3DJohn%20Doe)&quot;;
$vevent-&gt;setProperty( &quot;organizer&quot;
                       , &quot;hide@address.com&quot;
                       , array( &quot;CN&quot;      =&gt; &quot;John Doe&quot;
                              , &quot;DIR&quot;     =&gt; $dir
                              , &quot;SENT-BY&quot; =&gt; &quot;hide@address.com&quot;
                              , &quot;x-Key1&quot;  =&gt; &quot;x-Value&quot;
                              , &quot;x-Key2&quot;  =&gt; &quot;y-Value&quot; ));</p>
<a href="#INDEX">[index]</a>


<a name="PERCENTCOMPLETE"></a><h3>3.2.27 PERCENTCOMPLETE</h3>
This property is used by an assignee or delegatee of a <a href="#VTODO">to-do</a> to convey the percent completion of a <a href="#VTODO">to-do</a> to the Organizer.<br /><br />
The property value is a positive integer between zero and one hundred. A value of "0" indicates the <a href="#VTODO">to-do</a> has not yet been started. A value of "100" indicates that the <a href="#VTODO">to-do</a> has been completed. Integer values in between indicate the percent partially complete.
<h5>get PERCENT-COMPLETE</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;PERCENT-COMPLETE&quot; )</p>
<p class="comment">output = percent<span class="ref">1</span></p>
<p class="format">getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; percent<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$percent = $vtodo->getProperty( &quot;PERCENT-COMPLETE&quot; );</p>
<h5>Set PERCENT-COMPLETE</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;Percent-Complete&quot;, percent [, xparam ] )</p>
<p class="comment">percent<span class="ref">1</span> = Value type INTEGER
xparam<span class="ref">2</span>  = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vtodo->setProperty( &quot;percent-complete&quot;, 90 );</p>
<a href="#INDEX">[index]</a>


<a name="PRIORITY"></a><h3>3.2.28 PRIORITY</h3>
The property defines the relative priority for a calendar component.<br /><br />
The priority is specified as an integer in the range zero to nine.
A value of zero (US-ASCII decimal 48) specifies an undefined priority.
A value of one (US-ASCII decimal 49) is the highest priority.
A value of two (US-ASCII decimal 50) is the second highest priority.
Subsequent numbers specify a decreasing ordinal priority.
A value of nine (US-ASCII decimal 58) is the lowest priority.
<h5>get PRIORITY</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;PRIORITY&quot; )</p>
<p class="comment">output = priority<span class="ref">1</span></p>
<p class="format">getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; priority<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$priority = $vevent->getProperty( &quot;priority&quot; );</p>
<h5>Set PRIORITY</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;priority&quot;, priority [, xparam ] )</p>
<p class="comment">priority<span class="ref">1</span> = Value type INTEGER
xparam<span class="ref">2</span>   = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;priority&quot;, 3 );</p>
<a href="#INDEX">[index]</a>


<a name="RDATE"></a><h3>3.2.29 RDATE</h3>
This property defines the list of date/times for a recurrence set.<br /><br />
The default value type for RDATE is DATE-TIME, can be set to DATE or PERIOD (params <span class="ref">2</span>).
<h5>get RDATE</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;RDATE&quot; )</p>
<p class="comment">output = dates<span class="ref">1</span></p>
<p class="format">getProperty( &quot;RDATE&quot;, int propOrderNo/FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; dates<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$rdates = $vevent->getProperty( &quot;RDATE&quot; );</p>
<h5>Set RDATE</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;rdate&quot;, dates [, params ] )</p>
<p class="comment">dates<span class="ref">1</span>        = array ( date2 *[, date2 ] )
date2         = date
date2         = array( startdate, enddate/duration ) ]
startdate     = date
enddate       = date
date          = array( int year
                     , int month
                     , int day
                    [, int int hour
                     , int min
                     , int day
                     , mixed tz ] )
date          = array( &quot;year&quot;  =&gt; int year
                     , &quot;month&quot; =&gt; int month
                     , &quot;day&quot;   =&gt; int day 
                    [, &quot;hour&quot;  =&gt; int hour
                     , &quot;min&quot;   =&gt; int min
                     , &quot;sec&quot;   =&gt; int sec
                    [, &quot;tz =&gt; mixed tz ]] )
                     // <span class="ref">output format</span>
date          = array( &quot;timestamp&quot; =&gt; int timestamp
                     [, &quot;tz&quot;       =&gt; mixed tz ] )
date          = string datestring // <span class="ref">string date, acceptable by strtotime-command, 
                                                   ex.&nbsp;&quot;14 august 2006 16.00.00&quot; 
                                                   (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
tz            = timezone / offset
offset        = (+/-)HHmm[ss], local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
duration      = array( int week/false
                    [, int day/false
                     , int hour
                     , int min
                     , int sec] )
duration      = array( &quot;week&quot;  =&gt; int week/false 
                     [, &quot;day&quot;  =&gt; int day/false 
                     [, &quot;hour&quot; =&gt; int hour
                      , &quot;min&quot;  =&gt; int min
                      , &quot;sec&quot;  =&gt; int sec ]] );
                     // <span class="ref">output format</span>
duration      = array( &quot;week&quot; =&gt; int week );
duration      = array( &quot;day&quot;  =&gt; int week );
duration      = array( &quot;hour&quot; =&gt; int hour
                     , &quot;min&quot;  =&gt; int min
                     , &quot;sec&quot;  =&gt; int sec );
duration      = array( &quot;sec&quot;  =&gt; int sec );
params<span class="ref">2</span>       = ([( tzidparam / datetimeparam / dateparam ) / periodparam]
                        *[, xparams ] )
tzidparam     = timezone identifier
                 // <span class="ref">date output as local DATE-TIME with timezone identifier</span>
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="ref">default, date output as DATE-TIME</span>
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="ref">date output as DATE</span>
periodparam   = &quot;VALUE&quot; =&gt; &quot;PERIOD&quot; // <span class="ref">date output as PERIOD</span>
xparams       = xparamkey =&gt; xparamvalue</p>
<p class="label">Example</p>
See rules in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445 in text format"><b>text</b></a>
and <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" title="RFC2445 in HTML format" target="_blank"><b>HTML</b></a> format.<br />
<p class="format">// $rdate1 = array ( 2001, 1, 1, 1, 1, 1 );
// alt.
$rdate1 = array( &quot;year&quot;  =&gt; 2001
               , &quot;month&quot; =&gt; 1
               , &quot;day&quot;   =&gt; 1
               , &quot;hour&quot;  =&gt; 1
               , &quot;min&quot;   =&gt; 1
               , &quot;sec&quot;   =&gt; 1
               , &quot;tz&quot;    =&gt; &quot;GMT&quot; );
$rdate2 = array( 2002, 2, 2, 2, 2, 2, &quot;GMT&quot; );
$rdate3 = &quot;3 March 2003 03.03.03&quot;;
$rdate4 = array( 2004, 4, 4, 4, 4, 4, &quot;GMT&quot; );
$rdate5 = array( 2005, 10, 5, 5, 5, 5 );
$rdur6 = array( &quot;week&quot; =&gt; 0
              , &quot;day&quot;  =&gt; 0
              , &quot;hour&quot; =&gt; 5
              , &quot;min&quot;  =&gt; 5
              , &quot;sec&quot;  =&gt; 5 );
$rdur7 = array( 0, 0, 6 );
 // <span class="ref">duration for 6 hours</span>
$rdate8 = array( &quot;year&quot; =&gt; 2007, &quot;month&quot; =&gt; 7, &quot;day&quot; =&gt; 7 );
$vevent = new vevent();
$vevent->setProperty( &quot;rdate&quot;, array( $rdate1 ));
  // <span class="ref">one recurrence date, date in 7-params format (DATE-TIME)</span>
$vevent->setProperty( &quot;rdate&quot;, array( $rdate1, $rdate2 ));
  // <span class="ref">two dates, date 7-params format (DATE-TIME)</span>
$vevent->setProperty( &quot;rdate&quot;, array( array(  $rdate1, $rdate5 )
  // <span class="ref">Both fromdate and enddate must have 7 params (DATE-TIME) !!!</span>
                                    , array( $rdate2, $rdur6 )
  // <span class="ref">duration</span>
                                    , array( $rdate3, $rdur7 )
  // <span class="ref">period, pairs of fromdate &lt;-&gt; tom -date/-duration</span>
                                    , array( $rdate4, $rdate5 ))
                    );
.. .</p>
<a href="#INDEX">[index]</a>


<a name="RECURRENCE-ID"></a><h3>3.2.30 RECURRENCE-ID</h3>
This property is used in conjunction with the <a href="#UID">UID</a> and <a href="#SEQUENCE">SEQUENCE</a> property to identify a specific instance of a recurring <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> or <a href="#VJOURNAL">VJOURNAL</a> calendar component.<br /><br />
The property value is the effective value of the <a href="#DTSTART">DTSTART</a> property of the recurrence instance. The default value type is DATE-TIME, can be set to DATE (params <span class="ref">2</span>).
<h5>get RECURRENCE-ID</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;RECURRENCE-ID&quot; )</p>
<p class="comment">output = recurrIdDate<span class="ref">1</span></p>
<p class="format">getProperty( &quot;RECURRENCE-ID&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; recurrIdDate<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$recurrDate = $vtodo->getProperty( &quot;RECURRENCE-ID&quot; );</p>
<h5>Set RECURRENCE-ID</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;recurrence-id&quot;, recurrIdDate [, params ] )</p>
<p class="comment">recurrIdDate<span class="ref">1</span> = array( &quot;year&quot;  =&gt; int year
                     , &quot;month&quot; =&gt; int month
                     , &quot;day&quot;   =&gt; int day 
                    [, &quot;hour&quot;  =&gt; int hour
                     , &quot;min&quot;   =&gt; int min
                     , &quot;sec&quot;   =&gt; int sec
                    [, &quot;tz&quot;    =&gt; mixed tz ]] )
recurrIdDate  = int year
              , int month
              , int day
             [, int hour
              , int min
              , int sec
             [, mixed tz ]]
recurrIdDate  = array( int year
                     , int month
                     , int day
                    [, int hour
                     , int min
                     , int sec
                    [, mixed tz ]] )
recurrIdDate  = array( &quot;timestamp&quot; =&gt; int timestamp
                    [, &quot;tz&quot;        =&gt; mixed tz ] )
recurrIdDate  = string datestring // <span class="ref">string date, acceptable by strtotime-command, 
                                                   ex. &quot;14 august 2006 16.00.00&quot; 
                                                   (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
tz            = timezone / offset
offset        = (+/-)HHmm[ss], local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span>       = array( [ datetimeparam / dateparam ]
                             [, rangeparam ]
                             [, xparam ] )
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="ref">default, date output as DATE-TIME</span>
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="ref">date output as DATE</span>
rangeparam    = &quot;RANGE&quot; =&gt; ( "THISANDPRIOR" / "THISANDFUTURE" )
                  // <span class="ref">range parameter</span>
xparam        = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vtodo->setProperty( &quot;recurrence-id&quot;, &quot;3 March 2003 03.03.03&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="RELATED-TO"></a><h3>3.2.31 RELATED-TO</h3>
The property is used to represent a relationship or reference between one calendar component and another.<br /><br />
The property value consists of the persistent, globally unique identifier of another calendar component. This value would be represented in a calendar component by the <a href="#UID">UID</a> property.<br /><br />
The value type for RELATED-TO is TEXT.
<h5>get RELATED-TO</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;RELATED-TO&quot; )</p>
<p class="comment">output = relid<span class="ref">1</span></p>
<p class="format">getProperty( &quot;RELATED-TO&quot;, int propOrderNo/FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; relid<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$relatedId = $vtodo->getProperty( &quot;RELATED-TO&quot; );</p>
<h5>Set RELATED-TO</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;Related-To&quot;, relid [, params ] )</p>
<p class="comment">relid<span class="ref">1</span>  = Value type TEXT.
params<span class="ref">2</span> = array( [ reltype ] [, xparam] )
reltype = &quot;RELTYPE&quot; =&gt; (&quot;PARENT&quot; (Default)
                      / &quot;CHILD&quot;
                      / &quot;SIBLING&quot;
                      / iana-token
                      / x-name)
xparam  = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vtodo->setProperty( &quot;related-to&quot;, &quot;19960401-080045-hide@address.com&quot;);</p>
<a href="#INDEX">[index]</a>


<a name="REPEAT"></a><h3>3.2.32 REPEAT</h3>
This property defines the number of time the <a href="#VALARM">ALARM</a> should be repeated, after the initial trigger.
If the <a href="#VALARM">ALARM</a> triggers more than once, then this property MUST be specified along with the <a href="#DURATION">DURATION</a> property.
<h5>get REPEAT</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;REPEAT&quot; )</p>
<p class="comment">output = repeatTimes<span class="ref">1</span></p>
<p class="format">getProperty( &quot;REPEAT&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; repeatTimes<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$repeat = $vtodo->getProperty( &quot;REPEAT&quot; );</p>
<h5>Set REPEAT</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;repeat&quot;, repeatTimes [, xparam ] )</p>
<p class="comment">repeatTimes<span class="ref">1</span> = Value type INTEGER
xparam<span class="ref">2</span>      = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$valarm->setProperty( &quot;repeat&quot;, 2 );</p>
<a href="#INDEX">[index]</a>


<a name="REQUEST-STATUS"></a><h3>3.2.33 REQUEST-STATUS</h3>
This property defines the status code returned for a scheduling request.
<h5>get REQUEST-STATUS</h5>
<p class="label">Format</p>
<p class="format 1">getProperty( &quot;REQUEST-STATUS&quot; )</p>
<p class="comment">output = array( &quot;statcode&quot; =&gt; statcode<span class="ref">1</span>
              , &quot;text&quot;     =&gt; errtext<span class="ref">2</span>
            [ , &quot;extdata&quot;  =&gt; extraData<span class="ref"> 3</span> ] )</p>
<p class="format 2">getProperty( &quot;REQUEST-STATUS&quot;, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; array( &quot;statcode&quot; =&gt; statcode<span class="ref">1</span>
                                , &quot;text&quot;     =&gt; errtext<span class="ref">2</span>
                              [ , &quot;extdata&quot;  =&gt; extraData<span class="ref">3</span> ] )
              , &quot;params&quot; =&gt; params<span class="ref">4</span> )</p>
<p class="label">Example</p>
<p class="format">$requestStatus = $vtodo->getProperty( &quot;REQUEST-STATUS&quot; );</p>
<h5>Set REQUEST-STATUS</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;Request-Status&quot;
           , statcode, errtext [, extraData/FALSE [, params ]] )</p>
<p class="comment">statcode<span class="ref">1</span>  = Hierarchical, numeric return status code
                          (1*DIGIT *(&quot;.&quot; 1*DIGIT))
errtext<span class="ref">2</span>   = Textual status description
extraData<span class="ref">3</span> = Textual exception data. 
             For example, the offending property name and value
             or complete property line.
params<span class="ref">4</span>    = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;] [, xparam ] )
xparam     = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vfreebusy->setProperty(&quot;request-status&quot;
                       , 2.0
                       , &quot;Invalid property value&quot;
                       , &quot;DTSTART:96-Apr-31&quot;);</p>
<a href="#INDEX">[index]</a>


<a name="RESOURCES"></a><h3>3.2.34 RESOURCES</h3>
This property defines the equipment or resources anticipated for an activity specified by a calendar entity.<br /><br />
The value type for RESOURCES is TEXT.
<h5>get RESOURCES</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;RESOURCES&quot; )</p>
<p class="comment">output = resources<span class="ref">1</span></p>
<p class="format">getProperty( &quot;RESOURCES&quot;, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; resources<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$resources = $vtodo->getProperty( &quot;RESOURCES&quot; );</p>
<h5>Set RESOURCES</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;resources&quot;, resources [, params ] )</p>
<p class="comment">resources<span class="ref">1</span> = string resource / array( *resource )
resource   = textual resources or subtypes of the calendar component, 
             can be specified as a list of resources
             separated by the COMMA character.
params<span class="ref">2</span>    = array([ &quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;] )
                  [, &quot;ALTREP&quot;   =&gt; &quot;&lt;an alternate text
                                     representation, URI&gt;&quot;]
                  [, xparam]
xparam     = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;resources&quot;, &quot;COMPUTER PROJECTOR&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="RRULE"></a><h3>3.2.35 RRULE</h3>
This property defines a rule or repeating pattern for recurring <a href="#VEVENT">EVENTs</a>, <a href="#VTODO">TODOs</a>, or <a href="#VTIMEZONE">TIMEZONE</a> definitions.
<h5>get RRULE</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;RRULE&quot; )</p>
<p class="comment">output = recur<span class="ref">1</span></p>
<p class="format">getProperty( &quot;RRULE&quot;, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; recur<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$rrules = $vtodo->getProperty( &quot;RRULE&quot; );</p>
<h5>Set RRULE</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;rrule&quot;, recur [, xparam ] )</p>
<p>
For rules example see <a href="#EXRULE">Exrule</a> format and in detail in RFC2445 - Internet Calendaring and Scheduling Core Object Specification (iCalendar) in <a href="http://www.kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445 in text format"><b>text</b></a>
and <a href="http://www.kigkonsult.se/iCalcreator/iCalDictionary/index.html" title="RFC2445 in HTML format" target="_blank"><b>HTML</b></a> format.
</p>
<p class="comment">recur<span class="ref">1</span>  = see <a href="#EXRULE">Exrule</a>
xparam<span class="ref">2</span> = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<a href="#INDEX">[index]</a>

<a name="SEQUENCE"></a><h3>3.2.36 SEQUENCE</h3>
This property defines the revision sequence number of the calendar component within a sequence of revisions.<br />
It is monotonically incremented by the <a href="#ORGANIZER">ORGANIZER's</a> CUA each time the <a href="#ORGANIZER">ORGANIZER</a> makes a significant revision to the calendar component. When the <a href="#ORGANIZER">ORGANIZER</a> makes changes to one of the following properties, the sequence number MUST be incremented: <a href="#DTSTART">DTSTART</a>, <a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a>, <a href="#RDATE">RDATE</a>, <a href="#RRULE">RRULE</a>, <a href="#EXDATE">EXDATE</a>, <a href="#EXRULE">EXRULE</a>, <a href="#STATUS">STATUS</a>. In addition, changes made by the <a href="#ORGANIZER">ORGANIZER</a> to other properties can also force the sequence number to be incremented. The <a href="#ORGANIZER">ORGANIZER</a> CUA MUST increment the sequence number when ever it makes changes to properties in the calendar component that the <a href="#ORGANIZER">ORGANIZER</a> deems will jeopardize the validity of the participation status of the <a href="#ATTENDEE">Attendees</a>. For example, changing the location of a meeting from one locale to another distant locale could effectively impact the participation status of the <a href="#ATTENDEE">Attendees</a>.
<h5>get SEQUENCE</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;SEQUENCE&quot; )</p>
<p class="comment">output = sequence<span class="ref">1</span></p>
<p class="format">getProperty( &quot;SEQUENCE&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; sequence<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$sequence = $vtodo->getProperty( &quot;SEQUENCE&quot; );</p>
<h5>Set SEQUENCE</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;sequence&quot; [, sequence [, xparam ]] )</p>
<p class="comment">sequence<span class="ref">1</span> = Value type INTEGER
xparam<span class="ref">2</span>   = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;sequence&quot;, 2 );</p>
<p class="comment">// <span class="ref">set sequence number to 2</span></p>
<p class="format">$vevent->setProperty( &quot;sequence&quot; );</p>
<p class="comment">// <span class="ref">force sequence number to be set to 1 or, if sequence exists, incremented by 1</span></p>
<a href="#INDEX">[index]</a>


<a name="STATUS"></a><h3>3.2.37 STATUS</h3>
This property defines the overall status or confirmation for the calendar component.
<h5>get STATUS</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;STATUS&quot; )</p>
<p class="comment">output = status<span class="ref">1</span></p>
<p class="format">getProperty( &quot;STATUS&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; status<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$status = $vtodo->getProperty( &quot;STATUS&quot; );</p>
<h5>Set STATUS</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;status&quot;, status [, xparam ] )</p>
<p class="comment">                          // <span class="ref">Status values for a <a href="#vevent">VEVENT</a></span>
status<span class="ref">1</span>  = &quot;TENTATIVE&quot;    // <span class="ref">Indicates event is tentative</span>
         / &quot;CONFIRMED&quot;    // <span class="ref">Indicates event is definite</span>
         / &quot;CANCELLED&quot;    // <span class="ref">Indicates event was cancelled</span>
                          // <span class="ref">Status values for <a href="#VTODO">VTODO</a></span>
status<span class="ref">1</span>  = &quot;NEEDS-ACTION&quot; // <span class="ref">Indicates to-do needs action</span>
         / &quot;COMPLETED&quot;    // <span class="ref">Indicates to-do completed</span>
         / &quot;IN-PROCESS&quot;   // <span class="ref">Indicates to-do in process of</span>
         / &quot;CANCELLED&quot;    // <span class="ref">Indicates to-do was cancelled</span>
                          // <span class="ref">Status values for <a href="#VJOURNAL">VJOURNAL</a></span>
status<span class="ref">1</span>  = &quot;DRAFT&quot;        // <span class="ref">Indicates journal is draft</span>
         / &quot;FINAL&quot;        // <span class="ref">Indicates journal is final</span>
         / &quot;CANCELLED&quot;    // <span class="ref">Indicates journal is removed</span>
xparam<span class="ref">2</span>  = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;Status&quot;, &quot;COMPLETED&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="SUMMARY"></a><h3>3.2.38 SUMMARY</h3>
This property defines a short (&quot;one line&quot;) summary or subject for the calendar component. (In &quot;rfc2445, Recommended Practices&quot;, up to 255 characters) (, analogous to a mail SUBJECT).<br /><br />
The value type for SUMMARY is TEXT.
<h5>get SUMMARY</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;SUMMARY&quot; )</p>
<p class="comment">output = summary<span class="ref">1</span></p>
<p class="format">getProperty( &quot;SUMMARY&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; summary<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$summary = $vtodo->getProperty( &quot;SUMMARY&quot; );</p>
<h5>Set SUMMARY</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;summary&quot;, summary [, params ] )</p>
<p CLASS="comment">summary<span class="ref">1</span> = Value type TEXT,
           a short, one line summary about the activity or journal entry.
params<span class="ref">2</span>  = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;]
                [, &quot;ALTREP&quot;   =&gt; &quot;&lt;an alternate text
                                   representation, URI&gt;&quot;]
                [, xparam ] )
xparam   = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;summary&quot;, &quot;This is a summary&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="TRANSP"></a><h3>3.2.39 TRANSP</h3>
This property defines whether an <a href="#VEVENT">EVENT</a> is transparent or not to busy time searches.
<h5>get TRANSP</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;TRANSP&quot; )</p>
<p class="comment">output = transp<span class="ref">1</span></p>
<p class="format">getProperty( &quot;TRANSP&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; transp<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$transp = $vtodo->getProperty( &quot;TRANSP&quot; );</p>
<h5>Set TRANSP</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;transp&quot;, transp [, xparam ] )</p>
<p class="comment">transp<span class="ref">1</span> = &quot;OPAQUE&quot; / &quot;TRANSPARENT&quot;
xparam<span class="ref">2</span> = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty( &quot;transp&quot;, &quot;TRANSPARENT&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="TRIGGER"></a><h3>3.2.40 TRIGGER</h3>
This property specifies when an <a href="#VALARM">ALARM</a> will trigger.<br /><br />
The default value type is DURATION. The value type can be set to a DATE-TIME value type, in which case the value MUST specify an <a href="#DATE_WITH_UTC_TIME">UTC</a> formatted DATE-TIME value.
<h5>get TRIGGER</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;TRIGGER&quot; )</p>
<p class="comment">output = duration/date</p>
<p class="format">getProperty( &quot;TRIGGER&quot;, FALSE , TRUE )</p>
<p class="comment">output   = array( &quot;value&quot;        =&gt; duration/date )
                , &quot;params&quot;       =&gt; xparams )
duration = array( &quot;week&quot;         =&gt; int week
                , &quot;relatedstart&quot; =&gt; bool relstart
                , &quot;before&quot;       =&gt; bool before )
duration = array( &quot;day&quot;  =&gt; int day
                , &quot;hour&quot; =&gt; int hour
                , &quot;min&quot;  =&gt; int min
                , &quot;sec&quot;  =&gt; int sec
                , &quot;relatedstart&quot; =&gt; bool relstart
                , &quot;before&quot;       =&gt; bool before )
relstart = TRUE : related start, FALSE : related end
before   = TRUE : before relstart, FALSE : after relstart
date     = array( &quot;year&quot;  =&gt; int year
                , &quot;month&quot; =&gt; int month
                , &quot;day&quot;   =&gt; int day 
               [, &quot;hour&quot;  =&gt; int hour
                , &quot;min&quot;   =&gt; int min
                , &quot;sec&quot;   =&gt; int sec
                , &quot;tz&quot;    =&gt; string offset ]
xparams  = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$trigger = $vtodo->getProperty( &quot;TRIGGER&quot; );</p>
<h5>Set TRIGGER</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;trigger&quot;
           , duration
         [ , bool relatedEnd=FALSE
         [ , bool after=FALSE
         [ , param ]]] )
setProperty( &quot;trigger&quot;, duration2 [, param ])
setProperty( &quot;trigger&quot;, date [, param ] )
setProperty( &quot;trigger&quot;, int year/FALSE
                      , int month/FALSE
                      , int day/FALSE
                     [, int week/FALSE
                     [, int hour/FALSE
                      , int min/FALSE
                      , int sec/FALSE
                     [, bool relatedEnd=FALSE [, bool after=FALSE
                     [, string offset/FALSE [, array xparam ]]]]]] )</p>
<p class="comment">duration   = array ( &quot;week&quot; =&gt; int week )
duration   = array ( &quot;day&quot;  =&gt; int day
                  [, &quot;hour&quot; =&gt; int hour
                   , &quot;min&quot;  =&gt; int min
                   , &quot;sec&quot;  =&gt; int sec ] )
duration2  = string dur-value = ([&quot;+&quot;]/&quot;-&quot;)&quot;P&quot;(dur-date/dur-time/dur-week)
dur-date   = dur-day [dur-time]
dur-time   = &quot;T&quot; (dur-hour / dur-minute / dur-second)
dur-week   = 1*DIGIT &quot;W&quot;
dur-day    = 1*DIGIT &quot;D&quot;
dur-hour   = 1*DIGIT &quot;H&quot; [dur-minute]
dur-minute = 1*DIGIT &quot;M&quot; [dur-second]
dur-second = 1*DIGIT &quot;S&quot;
date<span class="ref">1</span>      = array( &quot;year&quot;  =&gt; int year
                  , &quot;month&quot; =&gt; int month
                  , &quot;day&quot;   =&gt; int day 
                 [, &quot;hour&quot;  =&gt; int hour
                  , &quot;min&quot;   =&gt; int min
                  , &quot;sec&quot;   =&gt; int sec
                  , &quot;tz&quot;   =&gt; string offset ] )
date       = array ( &quot;timestamp&quot; =&gt; int timestamp
                  [, &quot;tz&quot; =&gt; string offset ] )
offset     = (+/-)HHmm[ss], local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
date       = string datestring // <span class="ref">string date, acceptable by strtotime-command, 
                                               ex.&nbsp;&quot;14 august 2006 16.00.00&quot; 
                                               (notice <a class="ref" href="#date_restriction">date restriction</a>)</span>
param      = array( [[ reltype ] / [ datetimeparam ]] [, xparams ] )
reltyp     = &quot;RELATED&quot; =&gt; &quot;START&quot; (default) / &quot;END&quot;
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot;
xparam     = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example 1</p>
<p class="format">$valarm->setProperty( &quot;trigger&quot;
                    , FALSE, FALSE, FALSE, FALSE, 1, 2, 3, TRUE, TRUE );
$valarm->setProperty( &quot;trigger&quot;
                    , array (&quot;hour&quot;=&gt;1,&quot;min&quot;=&gt;2,&quot;sec&quot;=&gt;3),TRUE,TRUE);
$valarm->setProperty( &quot;trigger&quot;
                    , &quot;PT1H2M3S&quot;, array ( &quot;related&quot; =&gt; &quot;end&quot;);</p>
<p class="comment">  // <span class="ref">duration, 1 hour 2 min 3 sec, after end</span></p>
<p class="label">Example 2</p>
<p class="format">$valarm->setProperty( &quot;trigger&quot;
                    , FALSE, FALSE, FALSE, 1 );
$valarm->setProperty( &quot;trigger&quot;
                    , array ( &quot;week&quot; =&gt; 1 ));
$valarm->setProperty( &quot;trigger&quot;
                    , &quot;-P1W&quot;;</p>
<p class="comment"> // <span class="ref">duration, 1 week before start</span></p>
<p class="label">Example 3</p>
<p class="format">$valarm->setProperty( &quot;trigger&quot;
                    , array( &quot;year&quot; =&gt; 2007
                           , &quot;month&quot; =&gt; 6
                           , &quot;day&quot;   =&gt; 5,
                           , &quot;hour&quot;  =&gt; 2
                           , &quot;min&quot;   =&gt; 2
                           , &quot;sec&quot;   =&gt; 3
                           , &quot;tz&quot;    =&gt; &quot;-0200&quot; ));</p>
<p class="comment"> // <span class="ref">local date + UTC offset =&gt; <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span></p>
<p class="label">Example 4</p>
<p class="format">$valarm->setProperty( &quot;trigger&quot;
                    , array( &quot;year&quot;  =&gt; 2007
                           , &quot;month&quot; =&gt; 6
                           , &quot;day&quot;   =&gt; 5,
                           , &quot;hour&quot;  =&gt; 2
                           , &quot;min&quot;   =&gt; 2
                           , &quot;sec&quot; =&gt; 3 ));</p>
<p class="comment">  // <span class="ref"><a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span></p>
<a href="#INDEX">[index]</a>


<a name="TZID"></a><h3>3.2.41 TZID</h3>
This property specifies the text value that uniquely identifies the <a href="#VTIMEZONE">VTIMEZONE</a> calendar component.<br /><br />
The value type for TZID is TEXT.
<h5>get TZID</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;TZID&quot; )</p>
<p class="comment">output = tzid<span class="ref">1</span></p>
<p class="format">getProperty( &quot;TZID&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; tzid<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$tzid = $vtimezone->getProperty( &quot;TZID&quot; );</p>
<h5>set TZID</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;tzid&quot;, tzid [, xparam ] )</p>
<p class="comment">tzid<span class="ref">1</span>   = Value type TEXT
xparam<span class="ref">2</span> = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( &quot;tzid&quot;, &quot;US-Eastern&quot; );
.. .</p>
<a href="#INDEX">[index]</a>


<a name="TZNAME"></a><h3>3.2.42 TZNAME</h3>
This property specifies the customary designation for a <a href="#VTIMEZONE">TIMEZONE</a> description.<br /><br />
The value type for TZNAME is TEXT.
<h5>get TZNAME</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;TZNAME&quot; )</p>
<p class="comment">output = tzname<span class="ref">1</span></p>
<p class="format">getProperty( &quot;TZNAME&quot;, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; tzname<span class="ref">1</span>
              , &quot;params&quot; =&gt; params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$tzname = $timezonestandard->getProperty( &quot;TZNAME&quot; );</p>
<h5>Set TZNAME</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;tzname&quot;, tzname [, params ] )</p>
<p class="comment">tzname<span class="ref">1</span> = Value type TEXT
params<span class="ref">2</span> = array( [ &quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot; ] [, xparam ] )
xparam<td>=<td>*[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$timezone->setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
$timezonestandard = new vtimezone( &quot;standard&quot; );
$timezonestandard->setProperty( &quot;tzname&quot;, &quot;EST&quot; );
.. .</p>
<a href="#INDEX">[index]</a>


<a name="TZOFFSETFROM"></a><h3>3.2.43 TZOFFSETFROM</h3>
This property specifies the offset which is in use prior to this <a href="#VTIMEZONE">TIMEZONE</a> observance.
<h5>get TZOFFSETFROM</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;TZOFFSETFROM&quot; )</p>
<p class="comment">output = tzoffsetfrom<span class="ref">1</span></p>
<p class="format">getProperty( &quot;TZOFFSETFROM&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; tzoffsetfrom<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$tzoffsetfrom = $timezonestandard->getProperty( &quot;TZOFFSETFROM&quot; );</p>
<h5>Set TZOFFSETFROM</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;tzoffsetfrom&quot;, tzoffsetfrom [, xparam ] )</p>
<p class="comment">tzoffsetfrom<span class="ref">1</span> = (+/-)HHmm[ss], UTC offset
xparam<span class="ref">2</span>       = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$timezone->setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
$timezonestandard = new vtimezone( &quot;standard&quot; );
$timezonestandard->setProperty( &quot;tzname&quot;, &quot;EST&quot; );
$timezonestandard->setProperty( &quot;tzoffsetfrom&quot;, &quot;-0500&quot; );
.. .</p>
<a href="#INDEX">[index]</a>


<a name="TZOFFSETTO"></a><h3>3.2.44 TZOFFSETTO</h3>
This property specifies the offset which is in use in this <a href="#VTIMEZONE">TIMEZONE</a> observance.
<h5>get TZOFFSETTO</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;TZOFFSETTO&quot; )</p>
<p class="comment">output = tzoffsetto<span class="ref">1</span></p>
<p class="format">getProperty( &quot;TZOFFSETTO&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; tzoffsetto<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$tzoffsetto = $timezonestandard->getProperty( &quot;TZOFFSETTO&quot; );</p>
<h5>Set TZOFFSETTO</h5>
<p class="label">Format</p>
<p class="format">setproperty( &quot;tzoffsetto&quot;, tzoffsetto [, xparam ] )</p>
<p class="comment">tzoffsetto<span class="ref">1</span> = (+/-)HHmm[ss], UTC offset
xparam<span class="ref">2</span>     = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$timezone->setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
$timezonestandard = new vtimezone( &quot;standard&quot; );
.. .
$timezonedaylight = new vtimezone( &quot;daylight&quot; );
$timezonedaylight->setProperty( &quot;tzoffsetto&quot;, &quot;1345&quot; );
.. .</p>
<a href="#INDEX">[index]</a>


<a name="TZURL"></a><h3>3.2.45 TZURL</h3>
The TZURL provides a means for a <a href="#VTIMEZONE">VTIMEZONE</a> component to point to
a network location that can be used to retrieve an up-to-date version of itself.
<h5>get TZURL</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;TZURL&quot; )</p>
<p class="comment">output = tzurl<span class="ref">1</span></p>
<p class="format">getProperty( &quot;TZURL&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; tzurl<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$tzurl = $timezonestandard->getProperty( &quot;TZURL&quot; );</p>
<h5>set TZURL</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;tzurl&quot;, tzurl [, xparam ] )</p>
<p class="comment">tzurl<span class="ref">1</span>  = Value type URI
xparam<span class="ref">2</span> = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$tz       = &quot;http://zones.stds_r_us.net/tz/US-Eastern&quot; );
$calendar = new vcalendar();
$timezone = new vtimezone();
$timezone->setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$timezone->setProperty( &quot;Last-Modified&quot;, &quot;19870101T000000&quot; );
$timezone->setProperty( &quot;tzurl&quot;, $tz );
.. .</p>
<a href="#INDEX">[index]</a>


<a name="UID"></a><h3>3.2.46 UID</h3>
The persistent, globally <b>u</b>nique <b>id</b>entifier for the calendar component.
<a href="#Unique_id">Unique_id</a>, set at calendar level (<a href="#Unique_id">setConfig</a>), is used when auto-creating component uid.<br /><br />
The value type for UID is TEXT.
<h5>get UID</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;UID&quot; )</p>
<p class="comment">output = uid<span class="ref">1</span></p>
<p class="format">getProperty( &quot;UID&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot;  =&gt; uid<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$uid = $vevent->getProperty( &quot;UID&quot; );</p>
<h5>Set UID</h5>
<b>AUTO</b> GENERATED at component creation but NOT in <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">VTIMEZONE</a> components.<br />
UID generated format :<br />
date(&quot;Ymd\THisT&quot;).&quot;-&quot;.[microseconds, 4 pos][random].&quot;@&quot;.<a href="#Unique_id">unique_id</a><br />
random = 6 characters aA-zZ, 0-9
<p class="label">Format</p>
<p class="format">setProperty( &quot;uid&quot;, uid [, xparam ] )</p>
<p class="comment">uid<span class="ref">1</span>    = Value type TEXT
xparam<span class="ref">2</span> = array( *[ xparamkey =&gt; xparamvalue ] )</p>
<p class="label">Example</p>
<p class="format">$vevent->setProperty(&quot;uid&quot;,&quot;20070803T194810CEST-hide@address.com&quot;);</p>
<a href="#INDEX">[index]</a>


<a name="URL"></a><h3>3.2.47 URL</h3>
This property defines a Uniform Resource Locator (URL) associated with the iCalendar object.
<h5>get URL</h5>
<p class="label">Format</p>
<p class="format">getProperty( &quot;URL&quot; )</p>
<p class="comment">output = url<span class="ref">1</span></p>
<p class="format">getProperty( &quot;URL&quot;, FALSE , TRUE )</p>
<p class="comment">output = array &quot;value&quot;   =&gt; url<span class="ref">1</span>
              , &quot;params&quot; =&gt; xparam<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="format">$url = $vevent->getProperty( &quot;URL&quot; );</p>
<h5>Set URL</h5>
<p class="label">Format</p>
<p class="format">setProperty( &quot;url&quot;, url [, xparam ] )</p>
<p class="comment">url<span class="ref">1</span>    = Value type URI
xparam<span class="ref">2</span> = array( *[ xparamkey =&gt; xparamvalue ] (</p>
<p class="label">Example</p>
<p class="format">$vtodo->setProperty( &quot;url&quot;, &quot;http://www.icaldomain.net&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="X-PROPERTY_PROP"></a><h3>3.2.48 X-PROPERTY</h3>
Any calendar component property name with a &quot;X-&quot; prefix and text value.
If x-prop with the same name exists, it will be replaced.<br />
<h5>Get X-property</h5>
<p class="label">Format</p>
<p class="format">getProperty()</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>
              , propertyData<span class="ref">2</span> )</p>
<p class="format">getProperty( FALSE, int propOrderNo/FALSE, TRUE )</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>
              , array ( &quot;value&quot;  =&gt; propertyData<span class="ref">2</span> )
                      , &quot;params&quot; =&gt; params<span class="ref">&nbsp;3</span>))</p>
<p class="label">Example 1</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
while( $xprop = $v->getProperty( )) {
.. .</p>
<p class="comment"> // $xprop = array( propertyName<span class="ref">1</span>, propertyData<span class="ref">2</span> )</p>

<p class="label">Example 2</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
while( $xprop = $v->getProperty( &quot;X-ABC-MMSUBJ&quot; )) {
.. .</p>
<p class="comment"> // $xprop = array( &quot;X-ABC-MMSUBJ&quot;, propertyData<span class="ref">2</span> )</p>
<p class="label">Example 3</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
while( $xprop = $v->getProperty( FALSE, FALSE, TRUE )) {
.. .</p>
<p class="comment"> // $xprop = array( propertyName<span class="ref">1</span>
 //               , array( &quot;value&quot;  =&gt; propertyData<span class="ref">2</span> )
 //                      , &quot;params&quot; =&gt; params<span class="ref">&nbsp;3</span> )</p>
<h5>Set X-property</h5>
<p class="label">Format</p>
<p class="format">setProperty( propertyName, propertyData [, params ] )</p>
<p class="comment">propertyName<span class="ref">1</span> = Any property name with a &quot;X-&quot; prefix
propertyData<span class="ref">2</span> = Value type TEXT
params<span class="ref">3</span>       = array( [&quot;LANGUAGE&quot; =&gt; &quot;&lt;lang&gt;&quot;] [, xparam] )
xparam       = *[ xparamkey =&gt; xparamvalue ]</p>
<p class="label">Example</p>
<p class="format">$component->setProperty(&quot;X-ABC-MMSUBJ&quot;, &quot;http://load.noise.org/mysubj.wav&quot;);</p>
<a href="#INDEX">[index]</a>


<a NAME="Calendar_component_configuration_functions"></a><h2>3.3 Calendar Component configuration functions</h2>

<a name="Language_PROP"></a><h3>3.3.1 Language</h3>
Language for specific calendar component as defined in [RFC 1766].
Language set at component level can be overridden by specific component property parameter.
<h5>Get language</h5>
Language for calendar (only if language is set at component level).
<p class="label">Format</p>
<p class="format">getConfig( &quot;language&quot; )</p>
<p class="label">Example</p>
<p class="format">$lang = $vevent->getConfig( &quot;language&quot; );</p>
<h5>Set LANGUAGE</h5>
<p class="label">Format</p>
<p class="format">setConfig( &quot;language&quot;, string &lt;lang&gt; )</p>
<p class="label">Example</p>
<p class="format">$vevent->setConfig( &quot;language&quot;, &quot;en&quot; );</p>
<a href="#INDEX">[index]</a>


<a name="Calendar_component_object_misc_functions"></a><h2>3.4 Calendar component object misc. functions</h2>
Calendar component subcomponent functions

<a name="deleteComponent_PROP"></a><h4>3.4.1 deleteComponent</h4>
Remove subcomponent from component.
<p class="label">Format</p>
<p class="format">deleteComponent( int orderNumber )</p>
<p class="comment">Remove component with order number (1st=1, 2nd=2.. .).</p>
<p class="format">deleteComponent( string componentType [, int componentSuborderNumber])</p>
<p class="comment">Remove component with component type (ex. &quot;vevent&quot;) 
and order 1 alt. suborder number.</p>
<p class="format">deleteComponent( string <a href="#UID">UID</a> )</p>
<p class="comment">Remove component with <a href="#UID">UID</a>. 
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timzone</a> components.</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
$comp1 = $v->getComponent();
$comp1->deleteComponent( 1 );
.. .</p>
<a href="#INDEX">[index]</a>

<a name="getComponent_PROP"></a><h4>3.4.2 getComponent</h4>
Get subComponent from component.
<p class="label">Format</p>
<p class="format">getComponent()</p>
<p class="comment">Get next component until end-of-components.</p>
<p class="format">getComponent( int orderNumber )</p>
<p class="comment">Get component with order number (1st=1, 2nd=2.. .).</p>
<p class="format">getComponent( string componentType [, int componentSuborderNumber])</p>
<p class="comment">Get (next) component with component type (until end-of-components) 
alt. component with component type and suborder number (1st=1, 2nd=2..).</p>
<p class="format">getComponent( string <a href="#UID">UID</a> )</p>
<p class="comment">Get component with <a href="#UID">UID</a>. 
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timzone</a> components.</p>
<p class="label">Example</p>
<p class="format">$v = new vcalendar();
$v->parse( &quot;file.ics&quot; );
$comp1 = $v->getComponent());
while( $subComp = $comp1->getComponent()) {
.. .</p>
<a href="#INDEX">[index]</a>

<a name="setComponent_PROP"></a><h4>3.4.3 setComponent</h4>
Add calendar component to calendar or replace/update component in calendar.
<p class="label">Format</p>
<p class="format">setComponent( component )
addSubComponent( component ) // <span class="ref">alias</span></p>
<p class="comment">Insert last in component chain.</p>
<p class="format">setComponent( component, int orderNumber )</p>
<p class="comment">Replace component with order number(1st=1, 2nd=2.. .). 
If orderNumber is not found, component is inserted last in chain.</p>
<p class="format">setComponent( component, string componentType [,component suborder number])</p>
<p class="comment">Replace component with component type and component order number. 
if orderNumber is not found, component is inserted last in chain. </p>
<p class="format">setComponent( component, string <a href="#UID">UID</a> )</p>
<p class="comment">Replace component with <a href="#UID">UID</a>. 
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timzone</a> components.</p>
</p>
<p class="label">Example</p>
<p class="format">$calendar = new vcalendar(); // <span class="ref">initiate new CALENDAR</span>
.. .
$vevent = new vevent();      // <span class="ref">initiate EVENT</span>
$vevent->setProperty( &quot;dtstart&quot; // <span class="ref">add some <a href="#VEVENT">EVENT</a> properties</span>
                    , 2006, 12, 24, 19, 30, 00 );
$vevent->setProperty(.. .
.. .
$valarm = new valarm(); // <span class="ref">initiate <a href="#VALARM">ALARM</a> and set some properties</span>
$valarm->setProperty( &quot;trigger&quot;, .. .
.. .
$vevent->setComponent ( $valarm ); // <span class="ref">add ALARM to </span>
.. .</p>
<a href="#INDEX">[index]</a>


<a name="Copyright_and_Licence"></a><h1>4. COPYRIGHT AND LICENSE</h1>
<h2>Copyright</h2>
iCalcreator class <br />
copyright (c) 2007-2008 Kjell-Inge Gustafsson, kigkonsult<br />
www.kigkonsult.se/iCalcreator/index.php<br />
hide@address.com<br />

<h2>License</h2>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
<br /><br />
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
<br /><br />
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
or download it <a href="http://www.kigkonsult.se/downloads/dl.php?f=LGPL">here</a>.
<br />
<br />
<a href="#INDEX">[index]</a>
</body>
</html>
Return current item: iCalcreator