Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/vendor/kigkonsult/icalcreator/docs/using.html

7970 lines
351 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>iCalcreator 2.22 manual</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="author" content="Kjell-Inge Gustafsson, kigkonsult, All rights reserved">
<meta name="copyright" content="2007-2015 Kjell-Inge Gustafsson, kigkonsult">
<meta name="keywords" content="ical, calendar, calender, xcal, xml, icalender, rfc2445, rfc5545, vcalender, php, create">
<meta name="description" content="using iCalcreator v2.22">
<style type="text/css">
* {
FONT-FAMILY : "Bitstream Vera Sans", Helvetica, "Lucida Grande","Lucida Sans Unicode", Lucida, Arial, Geneva, sans-serif;
BACKGROUND-COLOR: white;
COLOR : black;
FONT-SIZE : small;
}
body {
MARGIN-LEFT : 10px;
WIDTH : 750px;
}
a.ref {
BACKGROUND-COLOR: inherit;
FONT-SIZE : 8pt;
LETTER-SPACING : 0.1em;
}
h1 {
BACKGROUND-COLOR: silver;
BORDER : thin solid black;
FONT-SIZE : x-large;
FONT-WEIGHT : bold;
DISPLAY : block;
}
h2 {
FONT-SIZE : large;
}
h3 {
FONT-SIZE : medium;
}
h4 {
FONT-SIZE : small;
FONT-WEIGHT : bold;
}
h5 {
FONT-SIZE : small;
FONT-WEIGHT : normal;
TEXT-DECORATION : underline;
}
table {
border-collapse : collapse;
width : 100%;
}
.bb {
BORDER-BOTTOM : gray dotted thin;
}
.blb {
BORDER-LEFT : gray dotted thin;
BORDER-BOTTOM : gray dotted thin;
TEXT-ALIGN : center;
}
.bl {
BORDER-LEFT : gray dotted thin;
}
.center {
TEXT-ALIGN : center;
}
p.comment {
FONT-FAMILY : monospace;
FONT-SIZE : 9pt;
FONT-WEIGHT : 500;
WHITE-SPACE : pre-wrap; /* css-3 */
WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
}
span.comment {
BACKGROUND-COLOR: transparent;
FONT-FAMILY : Areal;
FONT-SIZE : 8pt;
LETTER-SPACING : 0.2em;
}
p.example {
BACKGROUND-COLOR: #DCDCDC;
font-family : monospace;
FONT-SIZE : 9pt;
LETTER-SPACING : 0.1em;
LINE-HEIGHT : 1.5em;
WHITE-SPACE : pre-wrap; /* css-3 */
WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
}
p.format {
BORDER : gray dotted thin;
FONT-FAMILY : Helvetica;
FONT-SIZE : 9pt;
LETTER-SPACING : 0.2em;
LINE-HEIGHT : 2em;
WHITE-SPACE : pre-wrap; /* css-3 */
WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
}
.header {
BACKGROUND-COLOR: silver;
BORDER : thin solid black;
FONT-SIZE : xx-large;
}
p.label {
FONT-FAMILY : Arial;
FONT-WEIGHT : bold;
LETTER-SPACING : 0.1em;
}
p.quotes {
BACKGROUND-COLOR: #F5F5F5;
FONT-FAMILY : Arial;
FONT-STYLE : italic;
LETTER-SPACING : 0.1em;
}
sup {
BACKGROUND-COLOR: transparent;
FONT-SIZE : x-small;
FONT-WEIGHT : bold;
VERTICAL-ALIGN : super;
}
.ref {
BACKGROUND-COLOR: transparent;
FONT-SIZE : 8pt;
LETTER-SPACING : 0.1em;
}
.top {
VERTICAL-ALIGN : top;
}
</style>
</head>
<body>
<a name="top"></a>
<p class="header">iCalcreator v2.22</p>
<p>
iCalcreator v2.22<br>
Copyright &copy; 2007-2015 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
</p>
<h2>Preface</h2>
<p>
This document describes usage of iCalcreator, a <em>PHP</em> software implementation of standards <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a> to manage iCal formatted files.
</p>
<p>
This document is provided by kigkonsult for informational purposes
and is provided on an &quot;as is&quot; basis without any warranties expressed or implied.
</p>
<p>
Information in this document is subject to change without notice and does
not represent a commitment on the part of kigkonsult.
The software described in this document is provided under a <a href="#Copyright_and_Licence">license agreement</a>.
The software may be used only in accordance with the terms of that <a href="#Copyright_and_Licence">license agreement</a>.
It is against the law to copy or use the software except as specifically allowed in the <a href="#Copyright_and_Licence">license agreement</a>.
</p>
<p>
It is the users responsibility to ensure the suitability of the software before using it.
In no circumstances will kigkonsult be responsible for
the use of the software's outcomes or results or any loss
or damage of data or programs as a result of using the software.
The use of the software implies acceptance of these terms.
</p>
<p>
This document makes previous versions obsolete.
</p>
<a href="#INDEX">[index]</a></a>
<a name="INTRO"></a><h1>1 INTRO</h1>
<p>
iCalcreator is a <em>PHP</em> class package managing iCal files, supporting (non-)<strong>calendar</strong>
systems and applications to process and communicate <strong>calendar</strong> information like
events, agendas, tasks, reports, totos and journaling information.
</p>
<p>
The iCal standards are <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a>.</p>
<p>
iCalcreator features create, parse, edit and select <strong>calendar</strong> and <strong>calendar</strong> components.
</p>
<p>
The iCalcreator package, based of a <strong>calendar</strong> / components classes and with support of function classes and helper functions,
are <strong>calendar</strong> component property oriented.
For iCalcreator 2.22 version (and later), <em>PHP</em> version &gt;= 5.3 is required.
</p>
<p>
More iCalcreator supplementary, &quot;howto&quot; and coding support information will be found at
kigkonsult.se iCalcreator implement examples and test <a href="http://kigkonsult.se/test/index.php" title="kigkonsult.se iCalcreator implement howto" target="_blank">pages</a>.
A strong recommendation is to have this document open in parallell when exploiting the link.
</p>
<p>
iCalcreator may support hiphop if the HDF AllDynamic option is enabled (the helper <a href="#iCal2XML">iCal2XML</a> function is excluded).
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Standards"></a><h2>1.1 Standards</h2>
<h4>iCal</h4>
The <strong>iCalendar</strong> format, <strong>iCal</strong>, as described in
<dl>
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a>
<dd>&quot;Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)&quot;
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
<dd>&quot;iCalendar Transport-Independent Interoperability Protocol (iTIP)&quot;<br>Scheduling Events, BusyTime, To-dos and Journal Entries
</dl>
<p class="quotes">. ..allows for the capture and exchange of information normally stored
within a calendaring and scheduling application.</p>
and
<p class="quotes">. ..is an exchange format between applications or systems.</p>
<p><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a> and
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
obsoletes, respectively,
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="Download RFC2445 in text format" target="_blank">rfc2445</a> and
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2446" title="Download RFC2446 in text format" target="_blank">rfc2446</a>.
</p>
<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" target="_blank">Wikipedia</a>. If You are not familiar with iCal, read this first!
Knowledge of <strong>calendar</strong> protocol rfc5545/rfc5546 is to recommend.
</p>
<p>
Any references to rfc2445, below, corresponds to rfc5545.
</p>
<h4>xCal</h4>
<p>iCalcreator also supports xCal (iCal xml) rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;, to be downloaded from</p>
<dl>
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc6321" title="Download RFC6321 in text format" target="_blank">rfc6321</a>
<dd>&quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;
</dl>
<p>
A short xCal description is found at <a href="http://en.wikipedia.org/wiki/XCal" title="xCal on Wikipedia, the free encyclopedia" target="_blank">Wikipedia</a>.
</p>
<p>
The older xCal format, as defined in &quot;http://www.ietf.org/internet-drafts/draft-ietf-calsch-many-xcal-01.txt&quot;
(but no longer found), still works in this version but will not be maintaned and will be removed in future versions.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="This_manual"></a><h2>1.2 This manual</h2>
<p>This style is used for text.</p>
<p class="format">This style is used for formats.</p>
<p class="example">&lt;?php
.. .
This style is used for <em>PHP</em> coding examples.
<span class="comment"> // this style is used for coding comments.</span>
.. .
</p>
<p class="comment">This style is used for content details.</p>
<p class="quotes">This style is used for RFC2445/5545 quotes.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Versioning"></a><h2>1.3 Versioning</h2>
<p>The release numbering convention used is major.minor(.micro&nbsp;/&nbsp;suffix).</p>
<dl>
<dt>Major
<dd>Indicates a very large change in the core package. Rewrites or major milestones.
<dt>Minor
<dd>Significant amount of feature addition/modification.<br>odd number - development/experimental release<br> even number - production release
<dt>Micro
<dd>Primarily bug fix and maintenance number.
<dt>Suffix
<dd>rc1 for first release candidate etc.
</dl>
<p>The release plan is based on yearly releases with exception of emergency releases.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Support"></a><h2>1.4 Support</h2>
<p>
Use the kigkonsult.se standard support <a href="http://kigkonsult.se/support/index.php" title="kigkonsult.se/support" target="_blank">page</a>
exploring iCalcreator use and iCal issues.
</p>
<p>
Support and development is now focused on iCalcreator (Pro) 3.x versions, which, in turn, will affect future releases
of iCalcreator 2.x.
</p>
<p>
Use the contact <a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se/contact" target="_blank">page</a>
for queries, improvement/development issues or professional support and development.
Please note that paid support or consulting service has the highest priority.
</p>
<p>
kigkonsult offer professional services for software support, design and new/re-development, customizations and adaptations
of <em>PHP</em>/<em>MySQL</em> solutions with focus on software lifecycle management, including long term utility, reliability and maintainability.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Donate"></a><h2>1.5 Donate</h2>
<p>
You can show your appreciation for our free software,
and can support future development by making a donation to the kigkonsult project iCalcreator.
</p>
<p>
Make a donation of any size by clicking <a href="http://kigkonsult.se/contact/index.php#Donate" title="Donate" target="_blank">here</a>.
Thanks in advance!
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="INSTALL"></a><h2>1.6 Install</h2>
<p>
Unpack to any folder<br>
- add this folder to your include-path<br>
- or unpack to your application-(include)-folder
</p>
<p>Add</p>
<p class="format">require_once &quot;[path/]iCalcreator-&lt;version&gt;/iCalcreator.php&quot;;</p>
<p>to your <em>PHP</em>-script.
The iCalcreator invoke has changed since previous version!
You may also need to set the default timezone.
</p>
<p>
</p>
<p>
Creating a new iCalcreator object instance/component instance, review <a href="#iCalcreator_configuration_methods">config</a> settings.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Additional_Descriptors"></a><h2>1.7 Additional Descriptors</h2>
<p>The following properties (as described in <a href="http://en.wikipedia.org/wiki/ICalendar#Calendar_extensions" title="http://en.wikipedia.org/wiki/ICalendar#Calendar_extensions" target="_blank">wikipedia:iCal</a>)
may be required when importing iCal files into some calendaring software (MS etc.):</p>
<dl>
<dt>on <strong>calendar</strong> level
<dd><a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
<dd><a href="#X-PROPERTY">X-WR-CALNAME</a> x-property
<dd><a href="#X-PROPERTY">X-WR-CALDESC</a> x-property
<dd><a href="#X-PROPERTY">X-WR-RELCALID</a> x-property <span class="comment">(Read more info about <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier" title="Universally Unique Identifier">UUID</a>.)</span>
<dd><a href="#X-PROPERTY">X-WR-TIMEZONE</a> x-property
<dt>on component level
<dd><a href="#DTSTAMP">DTSTAMP</a> property (in iCalcreator created automatically, if not set)
<dd><a href="#UID">UID</a> property (in iCalcreator created automatically, if not set)
<dt>on component level in a <a href="#VTIMEZONE">vtimezone</a> component
<dd><a href="#X-PROPERTY">X-LIC-LOCATION</a> x-property
</dl>
<p class="label">Example</p>
<p>
A strong recommendation is also to set config <a href="#Unique_id">unique_id</a>, creating a new vcalendar/component instance,
to ensure accurate setting of all components <a href="#UID">UID</a> property, especially before <a href="#parse_merge">parse</a>.
Also setting of config timezone (&quot;TZID&quot; and &quot;X-WR-TIMEZONE&quot; below) is to recommend.
</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;setProperty( &quot;method&quot;, &quot;PUBLISH&quot; )
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;, &quot;Calendar Sample&quot; );
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;, &quot;Calendar Description&quot; );
$uuid = &quot;3E26604A-50F4-4449-8B3E-E4F4932D05B5&quot;;
$vcalendar-&gt;setProperty( &quot;X-WR-RELCALID&quot;, $uuid );
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Addendum"></a><h2>1.8 Addendum</h2>
<p>
For iCalcreator usage, coding samples and tests, visit the public kigkonsult.se
<a title="iCalcreator coding and test pages" href="http://kigkonsult.se/test/index.php" target="_blank">test</a> resource.
</p>
<dl>
<dt>Examples how to employ iCalcreator in software development
<dd><a title="dbiCal" href="http://kigkonsult.se/dbiCal/index.php" target="_blank">dbiCal</a>, an iCal file <i>PHP</i> database backend solution.
<dd><a title="Create iCal event file on-demand from form" href="http://kigkonsult.se/eventCreator/index.php" target="_blank">The iCal file event editor</a>
<dd><a title="tinycal" href="http://kigkonsult.se/tinycal/index.php" target="_blank">tinycal</a>, <strong>calendar</strong>-in-a-box.
</dl>
<p>
There are free iCal/xCal icons (use as buttons on a web page?) to download
<a href="http://kigkonsult.se/downloads/i.php?i=all" title="iCal images" target="_blank">here</a>.
</p>
<p>
The <em>PHP</em> coding in this document or &quot;coding samples&quot; (above) are only for display of usage, recommendation is to use a
coding standard, the following, incomplete, list is a good start;
</p>
<dl>
<dd><a href="http://www.php-fig.org/psr/psr-1/" target="_blank">PHP Framework Interop Group Basic Coding Standard</a>
<!-- dd><a href="http://www.dagbladet.no/development/phpcodingstandard/" target="_blank">http://www.dagbladet.no/development/phpcodingstandard/</a -->
<!-- dd><a href="http://ez.no/ezpublish/documentation/development/standards/php" target="_blank">http://ez.no/ezpublish/documentation/development/standards/php</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> -->
<dd><a href="http://pear.php.net/manual/en/standards.php" target="_blank"> pear Coding standards</a>
<dd><a href="http://make.wordpress.org/core/handbook/coding-standards/php/" target="_blank">WordPress PHP Coding Standards</a>
<dd><a href="http://framework.zend.com/manual/1.10/en/coding-standard.html" target="_blank">Zend Framework Coding Standard</a>
</dl>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="INDEX"></a><h2>1.9 INDEX</h2>
<a href="#INTRO">1 INTRO</a><br>
<br>
<a href="#Standards">1.1 Standards</a><br>
<a href="#This_manual">1.2 This manual</a><br>
<a href="#Versioning">1.3 Versioning</a><br>
<a href="#Support">1.4 Support</a><br>
<a href="#Donate">1.5 Donate</a><br>
<a href="#INSTALL">1.6 Install</a><br>
<a href="#Additional_Descriptors">1.7 Additional_Descriptors</a><br>
<a href="#Addendum">1.8 Addendum</a><br>
<a href="#INDEX">1.9 INDEX</a><br>
<br>
<a href="#Calendar_Component_list">2 Calendar Component list</a><br>
<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>
<a href="#CalProps">2.8 Component Properties</a><br>
<br>
<a href="#Function_list">3 Function list</a><br>
<br>
<a href="#iCalcreator_object_methods">3.1 iCalcreator object methods</a><br>
<br>
<a href="#Calendar_object_constructors">3.1.1 Constructors</a><br>
<a href="#vcalendar_constr">3.1.1.1 vcalendar</a><br>
<a href="#vevent_constr">3.1.1.2 vevent</a><br>
<a href="#vtodo_constr">3.1.1.3 vtodo</a><br>
<a href="#vjournal_constr">3.1.1.4 vjournal</a><br>
<a href="#vfreebusy_constr">3.1.1.5 vfreebusy</a><br>
<a href="#valarm_constr">3.1.1.6 valarm</a><br>
<a href="#vtimezone_constr">3.1.1.7 vtimezone</a><br>
<a href="#standard_constr">3.1.1.8 standard</a><br>
<a href="#daylight_constr">3.1.1.9 daylight</a><br>
<br>
<a href="#iCalcreator_object_property_methods">3.1.2 iCalcreator object property methods</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="#iCalcreator_component_object_methods">3.1.3 iCalcreator component object methods</a><br>
<a href="#deleteComponent">3.1.3.1 deleteComponent</a><br>
<a href="#getComponent">3.1.3.2 getComponent</a><br>
<a href="#newComponent">3.1.3.3 newComponent</a><br>
<a href="#replaceComponent">3.1.3.4 replaceComponent</a><br>
<a href="#selectComponents">3.1.3.5 selectComponents</a><br>
<a href="#setComponent">3.1.3.6 setComponent</a><br>
<br>
<a href="#iCalcreator_calendar_methods">3.1.4 iCalcreator calendar methods</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>
<a href="#iCalcreatorVersion">3.1.4.7 iCalcreatorVersion</a><br>
<br>
<a href="#iCalcreator_configuration_methods">3.1.5 iCalcreator configuration methods</a><br>
<a href="#configKeys">3.1.5.1 configuration keys</a><br>
<a href="#getConfig">3.1.5.2 getConfig</a><br>
<a href="#initConfig">3.1.5.3 calendar/component initialization</a><br>
<a href="#setConfig">3.1.5.4 setConfig</a><br>
<a href="#allowEmpty">3.1.5.5 Allow empty components</a><br>
<a href="#Compsinfo">3.1.5.6 Component information</a><br>
<a href="#Delimiter">3.1.5.7 Delimiter</a><br>
<a href="#Directory">3.1.5.8 Directory</a><br>
<a href="#Dirfile">3.1.5.9 Dirfile</a><br>
<a href="#Fileinfo">3.1.5.10 Fileinfo</a><br>
<a href="#Filename">3.1.5.11 Filename</a><br>
<a href="#Filesize">3.1.5.12 Filesize</a><br>
<a href="#Format">3.1.5.13 Format</a><br>
<a href="#Language">3.1.5.14 Language</a><br>
<a href="#NewlineChar">3.1.5.15 NewlineChar</a><br>
<a href="#setPropertyNames">3.1.5.16 setPropertyNames</a><br>
<a href="#dTZID">3.1.5.17 TZID</a><br>
<a href="#Unique_id">3.1.5.18 Unique_id</a><br>
<a href="#configURL">3.1.5.19 URL</a><br>
<br>
<a href="#Calendar_component_object_property_function_list">3.2 Calendar component property method list</a><br>
<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>
<dl>
<dt>Ascending property order
<dd><a href="#ACTION">3.2.5 ACTION</a>
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
<dd><a href="#CLASS">3.2.9 CLASS</a>
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
<dd><a href="#CREATED">3.2.13 CREATED</a>
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
<dd><a href="#DTEND">3.2.15 DTEND</a>
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
<dd><a href="#DUE">3.2.18 DUE</a>
<dd><a href="#DURATION">3.2.19 DURATION</a>
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
<dd><a href="#EXRULE">3.2.21 EXRULE</a>
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
<dd><a href="#GEO">3.2.23 GEO</a>
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
<dd><a href="#RDATE">3.2.29 RDATE</a>
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
<dd><a href="#RRULE">3.2.35 RRULE</a>
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
<dd><a href="#STATUS">3.2.37 STATUS</a>
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
<dd><a href="#TZID">3.2.41 TZID</a>
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
<dd><a href="#TZURL">3.2.45 TZURL</a>
<dd><a href="#UID">3.2.46 UID</a>
<dd><a href="#URL">3.2.47 URL</a>
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
<dt>Descriptive Component Properties
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
<dd><a href="#GEO">3.2.23 GEO</a>
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
<dd><a href="#STATUS">3.2.37 STATUS</a>
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
<dt>Date and Time Component Properties
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
<dd><a href="#DTEND">3.2.15 DTEND</a>
<dd><a href="#DUE">3.2.18 DUE</a>
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
<dd><a href="#DURATION">3.2.19 DURATION</a>
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
<dt>Time Zone Component Properties
<dd><a href="#TZID">3.2.41 TZID</a>
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
<dd><a href="#TZURL">3.2.45 TZURL</a>
<dt>Relationship Component Properties
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
<dd><a href="#URL">3.2.47 URL</a>
<dd><a href="#UID">3.2.46 UID</a>
<dt>Recurrence Component Properties
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
<dd><a href="#RDATE">3.2.29 RDATE</a>
<dd><a href="#RRULE">3.2.35 RRULE</a>
<dt>Alarm Component Properties
<dd><a href="#ACTION">3.2.5 ACTION</a>
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
<dt>Change Management Component Properties
<dd><a href="#CREATED">3.2.13 CREATED</a>
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
<dt>Miscellaneous Component Properties
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
</dl>
<a href="#iCalcreator_component_configuration_methods">3.3 iCalcreator Component configuration methods</a><br>
<br>
<a href="#Language_PROP">3.3.1 Language</a><br>
<br>
<a href="#iCalcreator_component_object_misc_methods">3.4 iCalcreator component object misc. methods</a><br>
<br>
<a href="#deleteComponent_PROP">3.4.1 deleteComponent</a><br>
<a href="#getComponent_PROP">3.4.2 getComponent</a><br>
<a href="#newComponent_PROP">3.4.3 newComponent</a><br>
<a href="#setComponent_PROP">3.4.4 setComponent</a><br>
<br>
<a href="#iCalUtilityFunctions">4 iCalUtilityFunctions</a><br>
<br>
<a href="#convEolChar">4.1 convEolChar</a><br>
<a href="#createTimezone">4.2 createTimezone</a><br>
<a href="#ms2phpTZ">4.3 ms2phpTZ</a><br>
<a href="#transformDateTime">4.4 transformDateTime</a><br>
<a href="#mddtuf">4.5 Misc. date/duration/timestamp util. functions</a><br>
<br>
<a href="#helperFunctions">5 Helper functions</a><br>
<br>
<a href="#XMLhelpers">5.1 iCal and XML helper functions</a><br>
<br>
<a href="#iCal2XML">5.1.1 iCal2XML</a><br>
<a href="#XML2iCal">5.1.2 XML2iCal</a><br>
<br>
<a href="#vCardhelpers">5.2 iCal and vCard helper functions</a><br>
<br>
<a href="#iCal2vCard">5.2.1 iCal2vCard</a><br>
<a href="#iCal2vCards">5.2.2 iCal2vCards</a><br>
<br>
<br>
<a href="#TZhelpers">5.3 Time zone helper functions</a><br>
<br>
<a href="#getTzOffsetForDate">5.3.1 getTzOffsetForDate</a><br>
<a href="#getTimezonesAsDateArrays">5.3.2 getTimezonesAsDateArrays</a><br>
<br>
<a href="#Copyright_and_Licence">6 COPYRIGHT AND LICENSE</a><br>
<br>
<a href="#Copyright">6.1 Copyright</a><br>
<a href="#Licence">6.2 License</a><br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Calendar_Component_list"></a><h1>2 Calendar Component list</h1>
<p>
Quote from <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)!
(Described in iCal output format, content corresponds to xCal format.)
</p>
<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>
<p>icalbody = calprops component</p>
<p>calprops = 2*(</p>
<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>
<p>)</p>
<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>
<p>*) <span class="comment">not supported by iCalcreator</span></p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</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>
<p>eventprop = *(</p>
<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>
<p>)</p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</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>
<p>todoprop = *(</p>
<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="#PERCENT-COMPLETE">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>
<p>)</p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</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>
<p>jourprop = *(</p>
<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>
<p>)</p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</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>
<p>fbprop = *(</p>
<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>
<p>)</p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</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>
<p>audioprop = 2*(</p>
<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>
<p>)</p>
<p>dispprop = 3*(</p>
<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>
<p>)</p>
<p>emailprop = 5*(</p>
<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>
<p>)</p>
<p>procprop = 3*(</p>
<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>
<p>)</p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
<a name="VTIMEZONE"></a><h2>2.7 VTIMEZONE</h2>
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
<p>2*(</p>
<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>)</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>
<p>tzprop = 3*(</p>
<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>
<p>)</p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
<a name="CalProps"></a><h2>2.8 Component Properties</h2>
<p>
A comprehensive table showing relation between <strong>calendar</strong> components and properties.
<a href="#VTIMEZONE">vtimezone</a> properties are not included.
</p>
<table>
<tr>
<td>0-1</td>
<td colspan="8">OPTIONAL property, MUST NOT occur more than once.</td>
</tr>
<tr>
<td>0-m</td>
<td colspan="8">OPTIONAL property, MAY occur more than once.</td>
</tr>
<tr>
<td>0&nbsp;/&nbsp;1=1</td>
<td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST the other</td>
</tr>
<tr>
<td>0*1</td>
<td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST NOT the other</td>
</tr>
<tr>
<td>1-m</td>
<td colspan="8">REQUIRED property, MAY occur more than once.</td>
</tr>
<tr>
<td>1</td>
<td colspan="8">REQUIRED property, MUST NOT occur more than once.</td>
</tr>
<tr>
<td colspan="9">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VEVENT">v<br>e<br>v<br>e<br>n<br>t</a></td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VTODO">v<br>t<br>o<br>d<br>o</a></td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VJOURNAL">v<br>j<br>o<br>u<br>r<br>n<br>a<br>l</a></td>
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VFREEBUSY">v<br>f<br>r<br>e<br>e<br>b<br>u<br>s<br>y</a></td>
<td class="bl top center" colspan="4"><a class="ref" href="#VALARM">v&nbsp;a&nbsp;l&nbsp;a&nbsp;r&nbsp;m</a></td>
</tr>
<tr>
<td class="bb">&nbsp;</td>
<td class="bl bb center ref"><br><br><br><br>a<br>u<br>d<br>i<br>o</td>
<td class="bl bb center ref"><br><br>d<br>i<br>s<br>p<br>l<br>a<br>y</td>
<td class="bl bb center ref"><br><br><br><br>e<br>m<br>a<br>i<br>l</td>
<td class="bl bb center ref">p<br>r<br>o<br>c<br>e<br>d<br>u<br>r<br>e</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ACTION">action</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ATTACH">attach</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-m</td>
<td class="blb">1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ATTENDEE">attendee</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1-m</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CATEGORIES">categories</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CLASS">class</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#COMMENT">comment</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#COMPLETED">completed</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CONTACT">contact</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#CREATED">created</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DESCRIPTION">description</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">0-1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DTEND">dtend</a></td>
<td class="blb">0*1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DTSTAMP">dtstamp</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DTSTART">dtstart</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DUE">due</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">0*1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DURATION">duration</a></td>
<td class="blb">0*1</td>
<td class="blb">0*1</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#EXDATE">exdate</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#EXRULE">exrule</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#FREEBUSY_PROP">freebusy</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#GEO">geo</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#LAST-MODIFIED">last-mod</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb"></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#LOCATION">location</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#ORGANIZER">organizer</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#PERCENT-COMPLETE">percent</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#PRIORITY">priority</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RDATE">rdate</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RECURRENCE-ID">recurid</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RELATED-TO">related</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#REPEAT">repeat</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
<td class="blb">0&nbsp;/&nbsp;1=1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RESOURCES">resources</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#RRULE">rrule</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#REQUEST-STATUS">rstatus</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#SEQUENCE">sequence</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#STATUS">status</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#SUMMARY">summary</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#TRANSP">transp</a></td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#TRIGGER">trigger</a></td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
<td class="blb">1</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#UID">uid</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#URL">url</a></td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">0-1</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
<td class="blb">&nbsp;</td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#X-PROPERTY_PROP">x-prop</a></td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
<td class="blb">0-m</td>
</tr>
</table>
<p>
If not set, the <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties
are automatically created by iCalcreator<br>
for <a href="#VEVENT">vevent</a>,<a href="#VTODO">vtodo</a>, <a href="#VJOURNAL">vjournal</a> and <a href="#VFREEBUSY">vfreebusy</a> components<br>
when using iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or <a href="#returnCalendar">returnCalendar</a><br>
or when fetching <a href="#DTSTAMP">DTSTAMP</a>/<a href="#UID">UID</a> property value with the component function <a href="#getProperty_PROP">getProperty</a>.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
<a name="Function_list"></a><h1>3 Function list</h1>
<a name="iCalcreator_object_methods"></a><h2>3.1 iCalcreator object methods</h2>
<a name="Calendar_object_constructors"></a><h3>3.1.1 Constructors</h3>
<a name="vcalendar_constr"></a><h4>3.1.1.1 vcalendar</h4>
<p>Create a new <a href="#VCALENDAR">VCALENDAR</a> object.</p>
<p class="label">Format</p>
<p class="format">vcalendar::vcalendar( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Basic example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
</p>
<p>
The <strong>calendar</strong> property PRODID and each component property <a href="#UID">UID</a> are AUTOMATICALLY generated in iCalcreator,
if not set manually, and based on the configuration <a href="#Unique_id">unique_id</a>.
</p>
<p class="label">Extended example</p>
<p class="example">&lt;?php
.. .
$tz = &quot;Europe/Stockholm&quot;
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;
&quot;TZID&quot; =&gt; $tz );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;setProperty( "X-WR-TIMEZONE", $tz );
.. .
.. . // <span class="comment">insert components or parse an iCal file (and edit components)</span>
.. .
$xprops = array( &quot;X-LIC-LOCATION&quot; => $tz );
iCalUtilityFunctions::createTimezone( $vcalendar, $tz, $xprops );
.. .
</p>
<p>
The <a href="#dTZID">TZID</a> config key and value (timezone) is supplied when setting <a href="#DTSTART">DTSTART</a>,
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>,
if not set manually, a TZID <b>auto completion</b>.
</p>
<p>
Some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
and vtimezone component with property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>,
review <a href="#createTimezone">createTimezone</a>, a function in iCalUtilityFunctions class.
</p>
<p>
Do <b>NOT</b> set <a href="#Directory">directory</a>/<a href="#Filename">filename</a> in vcalendar constructor, due to inability to detect error (FALSE) config return.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vevent_constr"></a><h4>3.1.1.2 vevent</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VEVENT">VEVENT</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vevent&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VEVENT">VEVENT</a> object.</p>
<p class="format">vevent::vevent( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$config = $vcalendar-&gt;getConfig();
$vevent = new vevent( $config );
$vevent-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vevent );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vtodo_constr"></a><h4>3.1.1.3 vtodo</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VTODO">VTODO</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vtodo&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtodo = &amp; $vcalendar-&gt;newComponent( &quot;vtodo&quot; );
$vtodo-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTODO">VTODO</a> object.</p>
<p class="format">vtodo::vtodo( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtodo = new vtodo( $vcalendar-&gt;getConfig());
$vtodo-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vtodo );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vjournal_constr"></a><h4>3.1.1.4 vjournal</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VJOUNAL">VJOURNAL</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vjournal&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vjournal = &amp; $vcalendar-&gt;newComponent( &quot;vjournal&quot; );
$vjournal-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VJOURNAL">VJOURNAL</a> object.</p>
<p class="format">vjournal::vjournal( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vjournal = new vjournal( $vcalendar-&gt;getConfig());
$vjournal-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vjournal );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vfreebusy_constr"></a><h4>3.1.1.5 vfreebusy</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vfreebusy&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vfreebusy = &amp; $vcalendar-&gt;newComponent( &quot;vfreebusy&quot; );
$vfreebusy-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object.</p>
<p class="format">vfreebusy::vfreebusy( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vfreebusy = new vfreebusy( $vcalendar-&gt;getConfig());
$vfreebusy-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vfreebusy );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="valarm_constr"></a><h4>3.1.1.6 valarm</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VALARM">VALARM</a> object using an iCalcreator object component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">calendarComponent::newComponent( &quot;valarm&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;setProperty(...
...
$valarm = &amp; $vevent-&gt;newComponent( &quot;valarm&quot; );
$valarm-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VALARM">VALARM</a> object.</p>
<p class="format">valarm::valarm( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent = new vevent();
$vevent-&gt;setProperty(...
...
$valarm = new valarm( $vevent-&gt;getConfig());
$valarm-&gt;setProperty(...
...
$vevent-&gt;setComponent( $valarm );
...
$vcalendar-&gt;setComponent( $vevent );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vtimezone_constr"></a><h4>3.1.1.7 vtimezone</h4>
<p>
The vtimezone component describe, at a minimum, the base offset from <b>UTC</b> for the time zone.
For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
</p>
<p class="label">Format 1</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
<p class="format">vcalendar::newComponent( &quot;vtimezone&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object.</p>
<p class="format">vtimezone::vtimezone( [ config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
$vtimezone-&gt;setProperty(...
...
$vcalendar-&gt;setComponent( $vtimezone );
...
</p>
<br>
<h5>Creation of timezone components</h5>
<p>
It is possible to create timezone components, using a function in iCalUtilityFunctions class, <a href="#createTimezone">createTimezone</a>
and utilizing the <em>PHP</em> DateTimeZone class (<em>PHP</em> 5 >= 5.2.0).
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="standard_constr"></a><h4>3.1.1.8 standard</h4>
<p class="label">Format 1</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> <b>standard</b> object using an iCalcreator object component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty(...
...
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
$standard-&gt;setProperty(...
...
$daylight = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
$daylight-&gt;setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> STANDARD object.</p>
<p class="format">vtimezone::vtimezone( &quot;standard&quot; [, config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
$vtimezone-&gt;setProperty(...
...
$standard = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
$standard-&gt;setProperty(...
...
$vtimezone-&gt;setComponent( $standard );
...
$daylight = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig());
$daylight-&gt;setProperty(...
...
$vtimezone-&gt;setComponent( $daylight );
...
$vcalendar-&gt;setComponent( $vtimezone );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="daylight_constr"></a><h4>3.1.1.9 daylight</h4>
<p class="label">Format 1</p>
<p>Create a new <a name="VTIMEZONE">VTIMEZONE</a> <b>daylight</b> object using a component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
...
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
...
$daylight = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> DAYLIGHT object.</p>
<p class="format">vtimezone::vtimezone( &quot;daylight&quot; [, config ] )</p>
<p class="comment">
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
...
$standard = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
...
$vtimezone-&gt;setComponent( $standard );
$daylight = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig() );
...
$vtimezone-&gt;setComponent( $daylight );
$vcalendar-&gt;setComponent( $vtimezone );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="iCalcreator_object_property_methods"></a><h3>3.1.2 iCalcreator object property methods</h3>
<a name="deleteProperty"></a><h4>3.1.2.1 deleteProperty</h4>
<p>Generic iCalcreator object deleteProperty method, simplifying removal of <strong>calendar</strong> properties.</p>
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( [ PropName [, order=1 ] )</p>
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
order = (int) if missing 1st/next occurrence,
used with multiple (property) occurrences
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( !$vcalendar-&gt;deleteProperty( &quot;method&quot; ))
&nbsp;&nbsp;echo "METHOD property not found";
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
<a name="getProperty"></a><h4>3.1.2.2 getProperty</h4>
<p class="label">Format 1</p>
<p>Generic iCalcreator getProperty method, simplifying fetch of <strong>calendar</strong> properties.</p>
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
<p class="format">vcalendar::getProperty( [ PropName [, order=1 [, complete=FALSE ]]] )</p>
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
order = (int) if missing 1st/next occurrence,
used with multiply (property) occurrences
complete = (bool) 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 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$calscale = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( )) { // <span class="comment">get x-properties</span>
.. .
</p>
<a name="getProperty2"></a>
<a name="geoLocation"></a>
<p class="label">Format 2</p>
<p>
Ability to fetch specific <i>component</i> property (unique) value(-s) and number of occurrence(-s).
The search includes <b>ALL</b> components within the iCalcreator object instance.
</p>
<p>
Outputs an array( *[ (string) unique-property-value =&gt; (int) number_of_occurrence ] ) or an empty array if no hits.
The array is sorted by (asc.) key. If a property contains multiple values (like &quot;CATAGORIES:course1,courseB&quot; or
&quot;RESOURCES:pc,camera&quot;), they are split into unique values.
</p>
<dl>
<dt>Supported Descriptive Component Properties
<dd><a href="#CATEGORIES">CATEGORIES</a>
<dd><a href="#LOCATION">LOCATION</a>
<dd>GEOLOCATION&nbsp;<sup>*1</sup>
<dd><a href="#PRIORITY">PRIORITY</a>
<dd><a href="#RESOURCES">RESOURCES</a>
<dd><a href="#STATUS">STATUS</a>
<dd><a href="#SUMMARY">SUMMARY</a>
<dt>Supported Date and Time Component Property
<dd><a href="#DTSTART">DTSTART</a>&nbsp;<sup>*2</sup>
<dt>Supported Relationship Component Properties
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*3</sup>
<dd><a href="#CONTACT">CONTACT</a>
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*3</sup>
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>&nbsp;<sup>*4</sup> (alt. &quot;R-UID&quot;)
<dd><a href="#RELATED-TO">RELATED-TO</a>
<dd><a href="#URL">URL</a>
<dd><a href="#UID">UID</a>
</dl>
<dl>
<dt><sup>*1</sup>
<dd>Using the non-standard directive &quot;GEOLOCATION&quot;, iCalcreator returns output supporting<br>
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
(only if <a href="#GEO">GEO</a> is set).
<dt><sup>*2</sup>
<dd>Using <a href="#DTSTART">DTSTART</a> as argument returns dates in format &quot;YYYYMMDD&quot; (please note, dates within a <a href="#RDATE">RDATE</a>/<a href="#RRULE">RRULE</a>
recurrence set are NOT included, only the origin start date (<a href="#DTSTART">DTSTART</a>)).
<dt><sup>*3</sup>
<dd>The <a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> output values are prefixed
by &quot;protocol&quot; like &quot;MAILTO:chair@kigkonsult.se&quot;.
<dt><sup>*4</sup>
<dd>Using &quot;RECURRENCE-ID-UID&quot; returns <a href="#UID">UID</a> values for component(-s) where <a href="#RECURRENCE-ID">RECURRENCE-ID</a> is set.
</dl>
<p>
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
</p>
<p>
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
</p>
<p class="format">vcalendar::getProperty( PropName )</p>
<p class="comment">propName = (string) case independent, property name</p>
<p class="label">Example 1</p>
<p>Fetch all attendees in the iCalcreator object instance.</p>
<p class="example">&lt;?php
.. .
$attendees = $vcalendar-&gt;getProperty( &quot;ATTENDEE&quot; );
foreach( $attendees as $attendee => $occurrCount ) {
.. .
</p>
<p class="label">Example 2</p>
<p>Fetch all DTSTARTs in the iCalcreator object instance.</p>
<p class="example">&lt;?php
.. .
$startDates = $vcalendar-&gt;getProperty( &quot;DTSTART&quot; );
foreach( $startDates as $startDate => $occurrCount ) {
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
<a name="setProperty"></a><h4>3.1.2.3 setProperty</h4>
<p>Generic the iCalcreator object setProperty method,simplifying insert of <strong>calendar</strong> properties.</p>
<p>A successful update returns TRUE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
<p class="comment">propName = (string) case independent, strict [RFC5545] <strong>calendar</strong> property names,
unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY">X-property</a>.
Proparg = (mixed) property argument
Last property argument is a (optional) property dependent parameters
array( *[(string) key =&gt; (string) value ] ).
A non-standard (, experimental) parameter key MUST be prefixed by &quot;X-&quot;.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot;,
&quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
<a name="CALSCALE"></a><h4>3.1.2.4 CALSCALE</h4>
<p>
This property defines the <strong>calendar</strong> scale used for the <strong>calendar</strong> information specified in the <strong>iCalendar</strong> object.
</p>
<p>
The default value is &quot;GREGORIAN&quot;, implied when missing.
</p>
<h5>Create CALSCALE</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createCalscale()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createCalscale();
...
</p>
<h5>Delete CALSCALE</h5>
<p>Remove CALSCALE from calendar.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( &quot;calscale&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;deleteProperty( &quot;CALSCALE&quot; );
...
</p>
<h5>Get Calscale</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty( &quot;calscale&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$calscale = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
.. .
</p>
<h5>Set CALSCALE</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( &quot;calscale&quot;, value )</p>
<p class="comment">value = (string) calscale value</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
<a name="METHOD"></a><h4>3.1.2.5 METHOD</h4>
<p>
This property defines the <strong>iCalendar</strong> object method associated with the <strong>calendar</strong> object.
</p>
<p>
METHOD property (value PUBLISH etc.) may be required when importing iCal files
into some calendaring software (MS etc.), as well as <a href="#X-PROPERTY">x-properties</a>
"X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
</p>
<h5>Create METHOD</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createMethod()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createMethod();
...
</p>
<h5>Delete METHOD</h5>
<p>Remove METHOD from calendar.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( &quot;METHOD&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;deleteProperty( &quot;METHOD&quot; );
...
</p>
<h5>Get METHOD</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty( &quot;method&quot; );</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$method = $vcalendar-&gt;getProperty( &quot;method&quot; );
.. .
</p>
<h5>Set METHOD</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( &quot;method&quot;, value )</p>
<p class="comment">value = (string) method value</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;method&quot;, &quot;PUBLISH&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
<a name="VERSION"></a><h4>3.1.2.6 VERSION</h4>
<p>
This property specifies the identifier corresponding to the version number of the <strong>iCalendar</strong> specification.
This property is always placed first in the <strong>calendar</strong> file.
</p>
<h5>Create Version</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createVersion()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createVersion();
...
</p>
<h5>Get Version</h5>
<p>Fetch property value.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty( &quot;version&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$version = $vcalendar-&gt;getProperty( &quot;version&quot; )
.. .
</p>
<h5>Set Version</h5>
<p>Insert property value.
Only version 2.0 valid, version is <b>AUTO</b> generated at <strong>calendar</strong> creation.</p>
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( &quot;version&quot;, version )</p>
<p class="comment">version = (string) iCal version</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
$vcalendar-&gt;setProperty( &quot;version&quot;, &quot;2.0&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
<a name="X-PROPERTY"></a><h4>3.1.2.7 X-PROPERTY</h4>
<p>
A <strong>calendar</strong>, non-standard property with a TEXT value and a name with an &quot;X-&quot; prefix. In a <strong>calendar</strong>,
an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
</p>
<p>
X-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE" may be required when importing iCal files
into some calendaring software (MS etc.), as well as <a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
</p>
<p>The value type is TEXT.</p>
<h5>Create X-property</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::createXprop()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createXprop();
...
</p>
<h5>Delete X-PROPERTY</h5>
<p>Remove X-PROPERTY from <strong>calendar</strong>.</p>
<p class="label">Format</p>
<p class="format">vcalendar::deleteProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
<p class="label">Example 1</p>
<p>Delete the x-property named &quot;X-PROPERTY&quot;.</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;deleteProperty( &quot;X-PROPERTY&quot; );
...
</p>
<p class="label">Example 2</p>
<p>Delete all x-properties.</p>
<p class="example">&lt;?php
.. .
while( $vcalendar-&gt;deleteProperty())
continue;
...
</p>
<h5>Get X-PROPERTY</h5>
<p>If set, returns property (name and) value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::getProperty()</p>
<p class="format">vcalendar::getProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
<p class="comment">output = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</p>
<p class="format">vcalendar::getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( propertyName<sup>1</sup>
, array( &quot;value&quot; =&gt; propertyData<sup>2</sup> )
, &quot;params&quot; =&gt; params<sup>3</sup>))
</p>
<p class="label">Example 1</p>
<p>Read all x-prop values in a loop.</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( )) { // <span class="comment">$xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
.. .
</p>
<p class="label">Example 2</p>
<p>If exists, read X-WR-TIMEZONE x-prop</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( $xprop = $vcalendar-&gt;getProperty( &quot;X-WR-TIMEZONE&quot; )) {
.. . // <span class="comment">$xprop = array( &quot;X-WR-TIMEZONE&quot;, propertyData<sup>2</sup> )</span>
.. .
</p>
<p class="label">Example 3</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( FALSE, FALSE, TRUE )) {
/* <span class="comment">$xprop = array( propertyName<sup>1</sup>
, array( &quot;value &quot; =&gt; propertyData<sup>2</sup>
, &quot;params &quot;=&gt; params<sup>3</sup> ))</span>
*/
.. .
</p>
<h5>Set X-PROPERTY</h5>
Insert property name and value. If an x-prop with the same name already exists, it will be replaced.
PropertyNames are always stored upperCase, ex. x-wr-calname =&gt; X-WR-CALNAME.
<p class="label">Format</p>
<p class="format">vcalendar::setProperty( propertyName, propertyData [, params ] )</p>
<p class="comment">propertyName<sup>1</sup> = (string) Any property name with a &quot;X-&quot; prefix
propertyData<sup>2</sup> = (string) Value type TEXT
params<sup>3</sup> = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config ); // initiate new CALENDAR
// <span class="comment">set some X-properties.. .</span>
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;, &quot;Calendar Sample&quot; )
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;, &quot;Calendar Description&quot; );
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
<a name="iCalcreator_component_object_methods"></a><h3>3.1.3 iCalcreator component object methods</h3>
<a name="deleteComponent"></a><h4>3.1.3.1 deleteComponent</h4>
<p>
Remove component from the iCalcreator object instance.
</p>
<p>
FALSE is returned if no component exists or when end-of-components at consecutive function calls.
</p>
<p class="label">format 1</p>
Remove component with order number (1st=1, 2nd=2.. .).
<p class="format">vcalendar::deleteComponent( orderNumber )</p>
<p class="comment">orderNumber = (int) order number</p>
<p class="label">format 2</p>
<P>Remove component with component type (e.g. &quot;vevent&quot;) and order 1 alt. suborder number.</p>
<p class="format">vcalendar::deleteComponent( componentType [, componentSuborderNumber])</p>
<p class="comment">componentType = (string) component type
componentSuborderNumber = (int) order number</p>
<p class="label">format 3</p>
<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>
<p class="format">vcalendar::deleteComponent( <a href="#UID">UID</a> )</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$vcalendar-&gt;deleteComponent( 1 );
$vcalendar-&gt;deleteComponent( &quot;vtodo&quot;, 2 );
$vcalendar-&gt;deleteComponent( &quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;);
.. .
</p>
<p class="label">Example 2</p>
<p>Deleting all components, using format 2 without order number.</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
.. .
while( $vcalendar-&gt;deleteComponent( &quot;vevent&quot;))
continue;
.. .
$vtodo = $vcalendar-&gt;getComponent( &quot;vtodo&quot; );
while( $vtodo-&gt;deleteComponent( &quot;valarm&quot;))
continue;
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
<a name="getComponent"></a><h4>3.1.3.2 getComponent</h4>
<p>Get (next) component from the iCalcreator object instance.</p>
<p>
FALSE is returned if no component exists or when end-of-components at consecutive function calls.
</p>
<p class="label">format 1</p>
<p>Get next component, until end-of-components.</p>
<p class="format">vcalendar::getComponent()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $comp = $vcalendar-&gt;getComponent()) {
.. .
}
.. .
</p>
<p class="label">format 2</p>
<P>Get specific component with order number (1st=1, 2nd=2.. .).</p>
<p class="format">vcalendar::getComponent( orderNumber )</p>
<p class="comment">orderNumber = (int) order number</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( $comp = $vcalendar-&gt;getComponent( 1 )) {
.. .
}
.. .
</p>
<p class="label">format 3</p>
<p>
Get (first/next) component with component type (until end-of-components) alt.
get specific component with component type and suborder number (1st=1, 2nd=2.. .).
</p>
<p class="format">vcalendar::getComponent( componentType [, componentSuborderNumber])</p>
<p class="comment">componentType = (string) component type
componentSuborderNumber = (int) order number</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( $comp = $vcalendar-&gt;getComponent( &quot;vtodo&quot;, 2 )) {
.. .
}
.. .
</p>
<p class="label">format 4</p>
<p>
Get (first/next) component with <a href="#UID">UID</a> as key.
(<a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.)
May be used when trying to find (base) component and corresponding <a href="#RECURRENCE-ID">RECURRENCE-ID</a> components.
</p>
<p class="format">vcalendar::getComponent( <a href="#UID">UID</a> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$uid = &quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;;
if( $comp = $vcalendar-&gt;getComponent( $uid )) {
.. .
}
.. .
</p>
<a name="getComponent5"></a>
<p class="label">format 5</p>
<p>
Get (first/next) component based on specific property contents:
</p>
<dl>
<dt>Supported Descriptive Component Properties
<dd><a href="#CATEGORIES">CATEGORIES</a>
<dd><a href="#LOCATION">LOCATION</a>
<dd><a href="#PRIORITY">PRIORITY</a>
<dd><a href="#RESOURCES">RESOURCES</a>
<dd><a href="#STATUS">STATUS</a>
<dd><a href="#SUMMARY">SUMMARY</a>
<dt>Date and Time Component Properties
<dd><a href="#COMPLETED">COMPLETED</a>
<dd><a href="#DTEND">DTEND</a>
<dd><a href="#DUE">DUE</a>
<dd><a href="#DTSTART">DTSTART</a>
<dt>SupportedRelationship Component Properties
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
<dd><a href="#CONTACT">CONTACT</a>
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>
<dd><a href="#RELATED-TO">RELATED-TO</a>
<dd><a href="#URL">URL</a>
<dd><a href="#UID">UID</a>
<dt>Change Management Component Properties
<dd><a href="#CREATED">CREATED</a>
<dd><a href="#DTSTAMP">DTSTAMP</a>
<dd><a href="#LAST-MODIFIED">LAST-MODIFIED</a>
</dl>
<dl>
<dt><sup>*1</sup>
<dd><a href="#ATTENDEE">ATTENDEE</a> and
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by protocol ex. &quot;MAILTO:chair@ical.net&quot;.
</dl>
<p>
For the property &quot;SUMMARY&quot; ,if a search value (any case) exists within property value, a hit exists.
For the other, non-date, properties an exact (strict case) match is required.
</p>
<p>
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
</p>
<p>
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components,
use <a href="#getProperty2">getProperty</a> (Format 2).
</p>
<p class="format">vcalendar::getComponent( search )</p>
<p class="comment">
search = (array) ( *[ propertyName =&gt; uniqueValue ]), multiple array elements are combined by &quot;OR&quot;
propertyName = (string) property name, above
propertyData = (string) unique property value (strict case),
date format &quot;YYYYMMDD&quot; (if any side is DATE, only dates are used),
datetime format &quot;YYYYMMDDTHHMMSS&quot;</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $comp = $vcalendar-&gt;getComponent( array( &quot;RESOURCES&quot; =&gt; &quot;PC&quot; )) {
.. .
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
<a name="newComponent"></a><h4>3.1.3.3 newComponent</h4>
<P>
Create component (<a href="#VEVENT">VEVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a> / <a href="#VTIMEZONE">VTIMEZONE</a>)
using a iCalcreator object factory-method, returning a reference to the new component.
</p>
<p class="label">Format</p>
<p class="format">vcalendar::newComponent( componentType )</p>
<p class="comment">componentType = (string) component type</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
<a name="replaceComponent"></a><h4>3.1.3.4 replaceComponent</h4>
<P>
Replace calendar component in vcalendar based on component property <a href="#UID">UID</a>
(<a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a>).
If not found, inserted last in component chain.
</p>
<p>
In case of multiple components sharing the same UID (ex. a RECURRENCE-ID property altering a recurrence pattern), the first found is replaced
and it may lead to unpredictable result, to use with care.
</p>
<p>
For a <a href="#VTIMEZONE">VTIMEZONE</a> component, a <a href="#TZID">TZID</a> match is required.
</p>
<p>
A successfull replace returns bool TRUE otherwise FALSE.
</p>
<p class="label">Format</p>
<p class="format">vcalendar::replaceComponent( component )</p>
<p class="comment">component = (object) component object instance</p>
<p class="label">Example</p>
<p class="example">&lt;?php
...
$vcalendar-&gt;replaceComponent( $component );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
<a name="selectComponents"></a><h4>3.1.3.5 selectComponents</h4>
<p class="label">Format 1</p>
<p>
Selects <a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> /
<a href="#VFREEBUSY">VFREEBUSY</a> components from the iCalcreator object instance on based on <b>dates</b>
(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 in the component.
</p>
<p>Requirement:</p>
<ul>
<li>The property <a href="#DTSTART">DTSTART</a> is required. If missing in a <a href="#VTODO">VTODO</a> component, <a href="#DTSTART">DUE</a> is used.</li>
<li>If not using local date, timezone in property <a href="#DTSTART">DTSTART</a> etc. MUST be PHP complient.</li>
</ul>
<p>Limitations:</p>
<ul>
<li>The values &quot;SECONDLY&quot; / &quot;MINUTELY&quot; / &quot;HOURLY&quot; in the &quot;FREQ&quot; rule part are NOT supported.
<li>If using components with properties<br>
<a href="#UID">UID</a> in combination with <a href="#SEQUENCE">SEQUENCE</a> and <a href="#RECURRENCE-ID">RECURRENCE-ID</a><br>
(i.e. altering an individual instance within the recurrence set),<br>
the <a href="#RECURRENCE-ID">RECURRENCE-ID</a> parameter &quot;RANGE&quot; (&quot;THISANDPRIOR&quot; / &quot;THISANDFUTURE&quot;) is NOT (yet) supported.</li>
<li>only one reccurrence a day</li>
<li>a RDATE reccurrence will overwrite any RRULE reccurrence, on an date (Ymd) basis</li>
<li>no X-CURRENT-DTEND if no DTEND (DUE) is set (below)</li>
</ul>
<p>
Returns an array with components (events.. .) or FALSE is returned if no selected component exists.
<p>
<p>Added X-properties in recurrent instances of a <strong>calendar</strong> component:</p>
<ul>
<li>&quot;X-CURRENT-DTSTART&quot;, TEXT content, <i>&quot;Y-m-d&nbsp;[H:i:s [timezone]]&quot;</i> showing the current start date.</li>
<li>&quot;X-CURRENT-DTEND&quot; alt. &quot;X-CURRENT-DUE&quot; (opt), TEXT content, <i>&quot;Y-m-d&nbsp;[H:i:s [timezone]]&quot;</i> showing the current end date.</li>
<li>&quot;X-RECURRENCE&quot;, the RRULE/RDATE recurrence pattarn number (none in the recurrence start), also after an RECURRENCE-ID change</li>
<li>&quot;X-OCCURENCE&quot;, contains, where applicable, single multi-day recurrence event day number (formatted as 'day X of Y')</li>
</ul>
<p class="format">vcalendar::selectComponents([ startYear, startMonth, startDay
[, endYear, endMonth, endDay
[, cType [, flat [, any [, split]]]]]])
</p>
<p class="comment">startYear : (int) start year (4*digit), default current year
(object) start date (datetime)<sup>*</sup>
startMonth : (int) start month (1-2*digit), default current month
(object) end date (datetime)<sup>*</sup>
startDay : (int) start day (1-2*digit), default current day
endYear : (int) end year (4*digit), default startYear
endMonth : (int) end month (1-2*digit), default startMonth
endDay : (int) end day (1-2*digit), default startDay
cType : (mixed) <strong>calendar</strong> component type(-s), (string/array)
(&quot;vevent&quot;, &quot;vtodo&quot;, &quot;vjournal&quot;, &quot;vfreebusy&quot;)
(bool) FALSE (default) =&gt; all
flat : (bool) TRUE =&gt; output : array[] (ignores split)
component where recurrence pattern exists within period
FALSE (default) =&gt; output : array[Year][Month][Day][]
any : (bool) TRUE (default) =&gt; select components with recurrence within period
FALSE =&gt; only components that starts (DTSTART) within period
split : (bool) TRUE (default) =&gt; one component copy for every day it occurs
within the period
FALSE =&gt; one occurrence of component in output array,
start date/recurrence (start) date
<sup>*</sup>When using datetime objects, other start/end arguments are ignored.
valid flat any split
combinations (defaults in upper case)
1 FALSE TRUE TRUE
2 FALSE TRUE false
3 FALSE false [false] (split set to false if flat=FALSE and any=false)
4 true TRUE [false] (split set to false if flat=true)
5 true false [false] (split set to false if flat=true)
If flat is set to FALSE, output array is sorted in 'Y-m-d h-i-s' asc. order.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$events_arr = $vcalendar-&gt;selectComponents( 2007, 11, 1, 2007, 11, 30, &quot;vevent&quot; );
// <span class="comment">select all events occurring 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-&gt;getProperty( &quot;x-current-dtstart&quot; );
<span class="comment">// if member of a recurrence set, returns
// array(&quot; x-current-dtstart&quot;,
// &lt;(string) date(&quot;Y-m-d&nbsp;[H:i:s][timezone/UTC&nbsp;offset]&quot;)&gt;)</span>
$startDate = $event-&gt;getProperty( &quot;dtstart&quot; );
$summary = $event-&gt;getProperty( &quot;summary&quot; );
$description = $event-&gt;getProperty( &quot;description&quot; );
.. .
.. .
</p>
<a name="selectComponents2"></a>
<p class="label">format 2</p>
<p>
Using this format, the iCalcreator object method selects components based on specific property value(-s).
</p>
<dl>
<dt>Supported Descriptive Component Properties
<dd><a href="#CATEGORIES">CATEGORIES</a>
<dd><a href="#LOCATION">LOCATION</a>
<dd><a href="#PRIORITY">PRIORITY</a>
<dd><a href="#RESOURCES">RESOURCES</a>
<dd><a href="#STATUS">STATUS</a>
<dd><a href="#SUMMARY">SUMMARY</a>
<dt>Supported Relationship Component Properties
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
<dd><a href="#CONTACT">CONTACT</a>
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
<dd><a href="#RELATED-TO">RELATED-TO</a>
<dd><a href="#URL">URL</a>
<dd><a href="#UID">UID</a>
</dl>
<dl>
<dt><sup>*1</sup>
<dd><a href="#ATTENDEE">ATTENDEE</a> and
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by (upper case) protocol like &quot;MAILTO:chair@ical.net&quot;.
</dl>
<p>
For the property <a href="#SUMMARY">SUMMARY</a>, if a search value (any case) exists within property value, a hit is found.
For the other properties an exact (strict case) match is required. Multiple search properties may coexist.
</p>
<p>
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components,
use <a href="#getProperty2">getProperty</a> (Format 2).
</p>
<p>
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
</p>
<p class="format">vcalendar::selectComponents( searchArray )</p>
<p>Outputs an array of matched (unique) components in <a href="#UID">UID</a> order.</p>
<p class="comment">searchArray : (array) *( propertyName =&gt; propertyValue )
propertyName : (string) above (any case)
propertyValue : (string) value / (array) ( *[ (string) value] )
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$searchArray = array( &quot;PRIORITY&quot; =&gt; array( 1, 2, 3, 4 ));
$highPrioArr = $vcalendar-&gt;selectComponents( $searchArray );
// <span class="comment">select all components with PRIORITY set to high (1-4)</span>
if( !empty( $highPrioArr )) {
$highPrioCal = new vcalendar( array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; ));
$highPrioCal-&gt;setProperty( "X-WR-CALDESC", "High priority events" );
foreach( $highPrioArr as $highPrioComponent )
$highPrioCal-&gt;setComponent( $highPrioComponent );
$highPrioCal-&gt;returnCalendar();
}
exit;
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
<a name="setComponent"></a><h4>3.1.3.6 setComponent</h4>
<p>
Replace or update component in the iCalcreator object instance.
Also add a <strong>calendar</strong> component to the iCalcreator object instance
when <strong>calendar</strong> component is created with the procedural (<b>non</b>-factory) method,
see example <a href="#vevent_constr">VEVENT</a>, format 2.
</p>
<p>A successful update returns TRUE.</p>
<p class="label">format 1</p>
<p>Insert last in component chain.</p>
<p class="format">vcalendar::setComponent( component )
addComponent( component ) // <span class="comment">alias</span></p>
<p class="comment">component = (object) iCalcreator component instance</p>
<p class="comment">addComponent, may be removed in future versions.</p>
<p class="label">format 2</p>
<p>
Insert/replace component with order number (1st=1, 2nd=2.. .).
If replace and orderNumber is not found, component is inserted last in chain.
</p>
<p class="format">vcalendar::setComponent( component, orderNumber )</p>
<p class="comment">component = (object) iCalcreator component instance
int = (int) order numder</p>
<p class="label">format 3</p>
<p>
Replace component with component type and 1st alt. component order number.
If orderNumber is not found, component is inserted last in chain.
</p>
<p class="format">vcalendar::setComponent( component, componentType [, componentSuborderNo])</p>
<p class="comment">component = (object) iCalcreator component instance
componentType = (string) component type
componentSuborderNo = (int) component Suborder Number</p>
<p class="label">format 4</p>
<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>
<p class="format">vcalendar::setComponent( component, <a href="#UID">UID</a> )</p>
<p class="comment">component = (object) iCalcreator component instance</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$vevent = vcalendar-&gt;getComponent( 1 ); // <span class="comment">fetch first EVENT</span>
$vevent-&gt;setProperty( &quot;dtstart, 2006, 12, 24, 19, 30, 00 );
// <span class="comment">update <a class="ref" href="#DTSTART">DTSTART</a> property</span>
$vcalendar-&gt;setComponent( $vevent, 1 ); // <span class="comment">replace first component</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
<a name="iCalcreator_calendar_methods"></a><h3>3.1.4 iCalcreator calendar methods</h3>
<a name="parse_merge"></a><h4>3.1.4.1 parse and merge</h4>
<p>
Parse iCal file(-s) or string/array <strong>calendar</strong> content into a single iCalcreator object instance (components, properties and parameters),
including multiple vcalendars (within a single ICS file) parse, e.g. Oracle Calendar exports.
</p>
<p>
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, <b>must</b> 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.
</p>
<p>
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.
</p>
<p>
Notice <a href="#date_restriction">date restriction</a>!
</p>
<p>
If major parse error occurs (like file access error, invalid <strong>calendar</strong> file or <strong>calendar</strong> file without components), FALSE is returned.
</p>
<p>
Minor errors like non-standard line-endings, initial and trailing empty lines
as well as files without proper end line(-s) (i.e. missing component end and/or &quot;END:CALENDAR&quot; iCal directives)
are managed.
</p>
<p>
Non-standard iCal properties (except the <a href="#X-PROPERTY_PROP">X-properties</a>) are ignored.
</p>
<p class="label">Format</p>
<p class="format">vcalendar::parse( [ textToParse ] )</p>
<p class="comment">textToParse = (string) calendarContent
ex. result from - file_get_contents( &quot;filename&quot;)
(array) calendarContent
ex. result from - file( &quot;filename&quot;, FILE_IGNORE_NEW_LINES )</p>
<p class="label">parse example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
.. .
</p>
<p class="label">parse example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;url&quot; =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
.. .
</p>
<p class="label">parse example 3</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;url&quot; =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
$vcalendar = new vcalendar( $config );
...
$str = array(
&quot;BEGIN:VCALENDAR&quot;,
&quot;PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.22//&quot;,
&quot;VERSION:2.0&quot;,
&quot;BEGIN:VEVENT&quot;,
&quot;DTSTART:20101224T190000Z&quot;,
&quot;DTEND:20101224T200000Z&quot;,
&quot;DTSTAMP:20101020T103827Z&quot;,
&quot;UID:20101020T113827-1234GkdhFR@test.org&quot;,
&quot;DESCRIPTION:example&quot;,
&quot;END:VEVENT&quot;,
&quot;END:VCALENDAR&quot;);
$vcalendar-&gt;parse( $str );
...
</p>
<p class="label">merge example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file1.ics&quot; );
$vcalendar-&gt;parse();
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file2.ics&quot; );
$vcalendar-&gt;parse();
$vcalendar-&gt;setConfig( &quot;directory&quot;,&nbsp;&quot;export&quot; );
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;icalmerge.ics&quot; );
$vcalendar-&gt;saveCalendar();
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
<a name="createCalendar"></a><h4>3.1.4.2 createCalendar</h4>
Generate and return <strong>calendar</strong> in a string, testing.. .?
<p class="label">Format</p>
<p class="format">vcalendar::createCalendar()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $vcalendar-&gt;createCalendar();
echo $str;
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
<a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
<p>
Redirect the iCalcreator object instance content to user browser. Filename, addressed to browser, is automatically generated if missing or not set;<br>
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
</p>
<p>
NOTE, the method no longer stops PHP script (exit), returns TRUE on success!
</p>
<p class="label">Format</p>
<p class="format">vcalendar::returnCalendar( [ utf8Encode [, gzip [, cdType ]]] )</p>
<p class="comment">utf8Encode = (bool) TRUE: utf8 encoded output,
FALSE: (default) no encoding
gzip = (bool) TRUE: gzip compressed output
Header &quot;Content-Length&quot; only sent when gzip=TRUE
FALSE: (default) no compressing
cdType = (bool) TRUE: (default) Content-Disposition: attachment
FALSE: Content-Disposition: inline</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
.. .
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;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-&gt;setProperty( &quot;duration&quot;, 0, 0, 3 ));
$vevent-&gt;setProperty( &quot;LOCATION&quot;, &quot;Central Plaza&quot; );
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
.. .
$vcalendar-&gt;returnCalendar();
exit;
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$utf8Encode = TRUE;
if( isset( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ) &amp;&amp;
( FALSE !== strpos( strtolower( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ), &quot;gzip&quot; )))
$gzip = TRUE;
else
$gzip = FALSE;
$vcalendar-&gt;returnCalendar( $utf8Encode, $gzip );
exit;
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
<a name="saveCalendar"></a><h4>3.1.4.4 saveCalendar</h4>
<p>
Save the iCalcreator object instance in a file, using preset <a href="#Directory">directory</a> and <a href="#Filename">filename</a>.
Filename is automatically generated if missing or not set;<br>
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
</p>
<p>Return bool TRUE on success, on error FALSE.</p>
<p class="label">Format</p>
<p class="format">vcalendar::saveCalendar()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;setConfig( array( &quot;directory&quot; =&gt; &quot;depot&quot;,
&quot;filename&quot; =&gt; &quot;calendar.ics&quot; ));
if( FALSE === $vcalendar-&gt;saveCalendar()) {
&nbsp;&nbsp;echo &quot;error when saving.. .&quot;
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
<a name="sort"></a><h4>3.1.4.5 sort</h4>
<p class="label">Format 1</p>
<p>
Sort created/parsed <strong>calendar</strong> components on the following (prioritized) keys:<br>
1 - X-CURRENT-DTSTART - X-CURRENT-DTEND/X-CURRENT-DUE<br>
&nbsp;&nbsp;&nbsp;&nbsp;(if created in iCalcreator object method <a href="#selectComponents">selectComponents</a>)<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>
A date value, like &quot;DTSTART;VALUE=DATE:20120717&quot;, are sorted before a datetime value.<br>
<a href="#VTIMEZONE">VTIMEZONE</a> component(-s) is always placed first (ordered by <a href="#TZID">TZID</a>). The
<a href="#VTIMEZONE">STANDARD</a>&nbsp;/&nbsp;<a href="#VTIMEZONE">DAYLIGHT</a>&nbsp; sub-components are sorted (on asc. key <a href="#DTSTART">DTSTART</a>) when calling
<a href="#createCalendar">createCalendar</a> (or <a href="#returnCalender">returnCalender</a>).
<br>
<a href="#VALARM">ALARM</a> sub-components, if exists, are not sorted.
</p>
<p class="format">vcalendar::sort()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$vcalendar-&gt;sort();
$vcalendar-&gt;returnCalendar();
exit;
</p>
<a name="sort2"></a>
<p class="label">Format 2</p>
<p>
Sort created/parsed <strong>calendar</strong> components based on specific property values and ascending order.
If a property is not set in component, an empty sort key is used (i.e. sorted first).
</p>
<p class="format">vcalendar::sort( sortArgument )</p>
<p class="comment">sortArgument: (string) &quot;<a href="#ATTENDEE">ATTENDEE</a>&quot; <sup>*</sup> / &quot;<a href="#CATEGORIES">CATEGORIES</a>&quot; <sup>*</sup> / &quot;<a href="#CONTACT">CONTACT</a>&quot; <sup>*</sup> / &quot;<a href="#DTSTAMP">DTSTAMP</a>&quot; /
&quot;<a href="#LOCATION">LOCATION"</a>&quot; / &quot;<a href="#ORGANIZER">ORGANIZER</a>&quot; / &quot;<a href="#PRIORITY">PRIORITY</a>&quot; /
&quot;<a href="#RESOURCES">RESOURCES</a>&quot; <sup>*</sup> / &quot;<a href="#STATUS">STATUS</a>&quot; / &quot;<a href="#SUMMARY">SUMMARY</a>&quot; / &quot;<a href="#URL">URL</a>&quot; / &quot;<a href="#UID">UID</a>&quot; <sup>**</sup>.
<p class="comment"><sup>*) </sup> For a property where multiple occurrence may exist (<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#CONTACT">CONTACT</a>, <a href="#RESOURCES">RESOURCES</a>) lowest (alphabetic) value is used as sort key.</p>
<p class="comment"><sup>**)</sup> For multiple components with the same <a href="#UID">UID</a>, components with <a href="#RECURRENCE-ID">RECURRENCE-ID</a> / <a href="#SEQUENCE">SEQUENCE</a> set are sorted first (on asc. values) and components without <a href="#RECURRENCE-ID">RECURRENCE-ID</a> last.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
<a name="useCachedCalendar"></a><h4>3.1.4.6 useCachedCalendar</h4>
<p>
If a recent version of (non-empty and saved) <strong>calendar</strong> file exists, an HTTP redirect is sent otherwise FALSE is returned.
</p>
<p>
NOTE, the method no longer stops PHP script (exit), returns bool TRUE on success, FALSE on error!
</p>
<p class="label">Format</p>
<p class="format">vcalendar::useCachedCalendar( [ timeout [, cdType ]] )</p>
<p class="comment">timeout = (int) default 3600 sec
cdType = (bool) TRUE: (default) Content-Disposition: attachment
FALSE: Content-Disposition: inline</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
$vcalendar-&gt;setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
$vcalendar-&gt;useCachedCalendar();
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
<a name="iCalcreatorVersion"></a><h4>3.1.4.7 iCalcreatorVersion</h4>
<p>
This static class method returns the iCalcreator class version number (2.22+).
</p>
<p>
There is also a <em>PHP</em> constant &quot;ICALCREATOR_VERSION&quot; (all versions).
</p>
<p class="label">Format</p>
<p class="format">vcalendar::iCalcreatorVersion()</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
<a name="iCalcreator_configuration_methods"></a><h3>3.1.5 iCalcreator configuration methods</h3>
<a name="configKeys"></a><h4>3.1.5.1 configuration keys</h4>
<p>All configuration keys (allowEmpty, compsInfo etc.) case independent.</p>
<table>
<tr>
<td class="bl bb">key</td>
<td class="bl bb"><strong>calendar</strong></td>
<td class="bl bb">component</td>
<td class="bl bb">remark</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#allowEmpty">allowEmpty</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Compsinfo">Compsinfo</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">getConfig only</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Delimiter">Delimiter</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Directory">Directory</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Filename">Filename</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Dirfile">Dirfile</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">getConfig only</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Filesize">Filesize</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">getConfig only</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Format">Format</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Language">Language</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#NewlineChar">NewlineChar</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#setPropertyNames">setPropertyNames</a></td>
<td class="bl bb center">&nbsp;</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">getConfig only</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#dTZID">TZID</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#Unique_id">Unique_id</a></td>
<td class="bl bb center">*</td>
<td class="bl bb center">*</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
<tr>
<td class="bl bb"><a class="ref" href="#configURL">URL</a></td>
<td class="bl bb center">*</td>
<td class="bl bb">&nbsp;</td>
<td class="bl bb ref">&nbsp;</td>
</tr>
</table>
<br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="getConfig"></a><h4>3.1.5.2 getConfig</h4>
<p class="format">vcalendar::getConfig( [ key ] )</p>
<p class="comment">key = (string) config key</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$filename = $vcalendar-&gt;getConfig( &quot;filename&quot; );
.. .
</p>
In this example, notice <a href="#Filename">Filename</a>
<br>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = $vcalendar-&gt;getConfig();
.. .
</p>
<p class="comment">Output= array( string key =&gt; mixed value
*[, string key =&gt; mixed value] )</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="initConfig"></a><h4>3.1.5.3 calendar/component initialization</h4>
<p class="label">Format</p>
<p>Create a new iCalcreator object instance.</p>
<p class="format">vcalendar::vcalendar( [ config ] )</p>
<p class="comment">config = (array) ( *[, key =&gt; value] )
key = (string) config key
value = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
.. .
</p>
<p>
Do <b>NOT</b> set <a href="#Directory">directory</a>/<a href="#Filename">filename</a> in vcalendar constructor, due to inability to detect error (FALSE) config return.
</p>
<p>Create a new <strong>calendar</strong> component.</p>
<p class="format">vcalendar::component( [ config ] )</p>
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
key = (string) config key
value = (mixed) config value</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vevent = new vevent( $config );
.. .
</p>
<p class="label">Example 3</p>
<p class="example">&lt;?php
.. .
$config = $vcalendar-&gt;getConfig();
$vevent = new vevent( $config );
.. .
</p>
<p>Only component relevant configuration are set. If using the <a href="#newComponent">newComponent</a> function, configuration is set automatically.</p>
<br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="setConfig"></a><h4>3.1.5.4 setConfig</h4>
<p>A successful &quot;setConfig&quot; returns TRUE.</p>
<p class="label">Format 1</p>
<p class="format">vcalendar::setConfig( [ config ] )</p>
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
key = (string) config key
value = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar();
$vcalendar-&gt;setConfig( $config );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vevent = new vevent();
$vevent-&gt;setConfig( $config );
.. .
</p>
<p class="label">Format 2</p>
<p class="format">vcalendar::setConfig( key, value )</p>
<p class="comment">key = (string) config key
value = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$vcalendar = new vcalendar();
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$vevent = new vevent();
$vevent-&gt;setConfig( &quot;unique_id&quot;, &quot;kigkonsult.se&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="allowEmpty"></a><h4>3.1.5.5 Allow empty components</h4>
<p>
Allow or reject empty <strong>calendar</strong> properties. Used in <a href="#createCalendar">createCalendar</a>, <a href="#returnCalender">returnCalender</a> or
create&lt;Property&gt; methods, creating [RFC5545] formats.
</p>
<p>
Default TRUE (allow).
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Compsinfo"></a><h4>3.1.5.6 Component information</h4>
<p>Only to use with iCalcreator object method getConfig.</p>
<p>
Get information about the iCalcreator object instance components. Returns array with basic information
about all components (in array format) within the iCalcreator object instance.
</p>
<p class="comment">Output = array ( *compinfo )
compinfo = array ( &quot;ordno&quot; =&gt; int ordno,
// <span class="commsnt">order number (1st=1, 2nd=2..)</span>
, &quot;type&quot; =&gt; string type
// <span class="comment">component type (vevent, vtodo.. .</span>
, &quot;uid&quot; =&gt; string uid
// <span class="comment">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="comment">for every set property</span>
, &quot;sub&quot; =&gt; array( *compinfo ))
// <span class="comment">if subcomponents exists, an array for each subcomponent</span></p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$compsinfo = $vcalendar-&gt;getConfig( &quot;compsinfo&quot; );
foreach( $compsinfo as compinfo) {
&nbsp;&nbsp;echo &quot; order number : &quot;.$compinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;echo &quot; type : &quot;.$compinfo[&quot;type&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;echo &quot; UID : &quot;.$compinfo[&quot;uid&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;foreach( $compinfo[&quot;props&quot;] as $propertyName =&gt; $propertyCount )
&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; $propertyName = $propertyCount&quot;;
&nbsp;&nbsp;if( is_array( $compinfo[&quot;sub&quot;] )) {
&nbsp;&nbsp;&nbsp;&nbsp;foreach( $compinfo[&quot;sub&quot;] as $subcompinfo ) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; order number : &quot;.$subcompinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* .. dito if subcomponents exists .. . */
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Delimiter"></a><h4>3.1.5.7 Delimiter</h4>
<p>Directory/filename delimiter.</p>
<p>
Default <em>PHP</em> constant DIRECTORY_SEPARATOR. If used, <b>must</b> be set BEFORE filename!
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Directory"></a><h4>3.1.5.8 Directory</h4>
<p>
Local directory to store/read iCal files.
</p>
<p>
Default &quot;<b>.</b>&quot;.
</p>
<p>
Directory <b>must</b> be set BEFORE <a href="#Filename">filename</a> and <b>must</b> exist and be writeable otherwise FALSE is returned.
If set using an config array and together with <a name="Filename"><u>Filename</u></a>, Directory are set automatically first.
When setting directory, the <em>PHP</em> realpath function is applied to speed up parse/saveCalendar methods.
When setting Directory, any previously set <a href="#configURL">URL</a> is removed.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
...
$dir = 'test';
if( FALSE === $vcalendar-&gt;setConfig( array( 'directory' => $dir )))
die( &quot;Invalid directory $dir&quot; );
...
</p>
<p>
For temporary calendar files, you may set directory/<a href="#Filename">filename</a> using <em>PHP</em> functions sys_get_temp_dir() and tempnam().
</p>
<p>
Do <b>NOT</b> set directory/<a href="#Filename">filename</a> in <a href="#vcalendar_constr">vcalendar</a> constructor, due to inability to detect error (FALSE) config return.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Dirfile"></a><h4>3.1.5.9 Dirfile</h4>
<p>
Only available in iCalcreator object method getConfig, returning (string) <a href="#Directory">directory</a>, <a href="#Delimiter">delimiter</a> and <a href="#Filename">filename</a>.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Fileinfo"></a><h4>3.1.5.10 Fileinfo</h4>
<p>
Only available in iCalcreator object method getConfig, giving information in array format about <a href="#Directory">directory</a>,
<a href="#Filename">filename</a> and <a href="#Filesize">filesize</a>.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$fileinfo = $vcalendar-&gt;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 href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Filename"></a><h4>3.1.5.11 Filename</h4>
<p>iCal local file name, default created like (if not set):</p>
<p class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot;;</p>
<p class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.xml&quot;; <span class="comment"> // if <a href="#Format">format</a> set to &quot;xcal&quot;</span></p>
<p>
If not set, filename is created when requested, ex. in iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or getConfig(&quot;filename&quot;).
</p>
<p>
Local filename <b>must</b> be set AFTER setting directory (and opt. delimiter)!
Filename (and opt. directory) <b>must</b> be readable/writeable otherwise FALSE is returned.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
...
$dir = 'test';
if( FALSE === $vcalendar-&gt;setConfig( array( &quot;directory&quot; =&gt; $dir )))
die( &quot;Error when config directory $dir&quot; );
$file = 'temp.ics';
if( FALSE === $vcalendar-&gt;setConfig( array( &quot;filename&quot; =&gt; $file )))
die( &quot;Error when config filename $file&quot; );
...
</p>
<p>
For temporary calendar files, you may set <a href="#Directory">directory</a>/filename</a> using <em>PHP</em> functions sys_get_temp_dir() and tempnam().
</p>
<p>
Do <b>NOT</b> set <a href="#Directory">directory</a>/filename</a> in <a href="#vcalendar_constr">vcalendar</a> constructor, due to inability to detect error (FALSE) config return.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Filesize"></a><h4>3.1.5.12 Filesize</h4>
<p>
Only when getting configuration (using iCalcreator object method getConfig).<br>
Returns the size of the file in bytes, to be invoked<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>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Format"></a><h4>3.1.5.13 Format</h4>
<p>Format for the iCalcreator object instance output, &quot;iCal&quot;/&quot;xCal&quot;, any case.</p>
<p>
&quot;iCal&quot; is default ([RFC5545]), &quot;xCal&quot; force xml formatted output, according to<br>
&quot;draft-ietf-calsch-many-xcal-01.txt&quot; (now obsolete).
</p>
<p>
For converting to and from XML, according to rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;,use functions<br>
- <a href="#iCal2XML">iCal2XML</a> converts an iCalcreator object instance to XML<br>
- <a href="#XML2iCal">XML2iCal</a> converts XML (string/file) to an iCalcreator object instance.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Language"></a><h4>3.1.5.14 Language</h4>
<p>
Language for the iCalcreator object instance and component TEXT value properties as defined in [RFC5646].
</p>
<p>
Default empty.
</p>
<p>
If NOT set in TEXT property parameters, language from component instance &quot;setConfig( &quot;language&quot;, ..)&quot; method will be used, if set,
otherwise language from <strong>calendar</strong> method &quot;setConfig( &quot;language&quot;, ..)&quot; will be used, if set.
</p>
<p>
The <strong>calendar</strong> property PRODID is always recreated when setting (<strong>calendar</strong>) language
(, note <a href="#Unique_id">Unique_id</a>, below).
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="NewlineChar"></a><h4>3.1.5.15 NewlineChar</h4>
<p>
Character(s) used for carriage return + line feed (CR+LF).
</p>
<p>
Default &quot;\r\n&quot; as defined in [RFC5545].
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="setPropertyNames"></a><h4>3.1.5.16 setPropertyNames</h4>
<p>
Returns array of property names for all set properties in component. &quot;X-PROP&quot; will be used when <a href="#X-PROPERTY_PROP">X-properties</a> are set.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="dTZID"></a><h4>3.1.5.17 TZID</h4>
<p>
General timezone, will be used if no TZID parameter is supplied when setting <a href="#DTSTART">DTSTART</a>,
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>, a TZID <b>auto completion</b>.
</p>
<p>
Default empty.
</p>
<p>
Note, some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
and vtimezone component property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>
(to be set manually, examine also the <a href="#createTimezone">createTimezone</a> function).
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Unique_id"></a><h4>3.1.5.18 Unique_id</h4>
<p>
&quot;Unique_id&quot; is used in <strong>calendar</strong> property PRODID and component property <a href="#UID">UID</a>,
both created automatically (, if not setting <a href="#UID">UID</a> manually.
</p>
<p class="quotes">PRODID
The identifier is RECOMMENDED to be the identical syntax to the [RFC 822] addr-spec.
A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which.. .
</p>
<p>
Default <b>AUTOMATICALLY</b> generated by using <em>PHP</em> function gethostbyname( $_SERVER[&quot;SERVER_NAME&quot;] )
when running in a web server environment or &quot;localhost&quot; when using command line interface.
Used when setting other (domain) name than server name.
</p>
<p>
The <strong>calendar</strong> property PRODID is always recreated when setting unique_id.
</p>
<p>
If missing, the component property <a href="#UID">UID</a> is created at first use of iCalcreator object methods <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a> or <a href="#saveCalendar">saveCalendar</a>
</p>
<p>
A strong recommendation is <b>always</b> to set unique_id, creating a new iCalcreator object or component instance,
to ensure accurate creation of all components <a href="#UID">UID</a> property, also before <a href="#parse">parse</a>, in case of missing <a href="#UID">UID</a>.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="configURL"></a><h4>3.1.5.19 URL</h4>
<p>
When reading remote files or resources with URL (using the <a href="#parse">parse()</a> method),
protocol &quot;http&quot; (&quot;webcal&quot;) and &quot;https&quot; are supported.
</p>
<p>
When setting URL, the previously set <a href="#Directory">Directory</a> is removed.
</p>
<p>
A remote file is identified by the file suffix &quot;.ics&quot;, otherwise the URL is classified as a resource.
When setting URL to a remote iCal <u>file</u>, only directory need to be (re-)set,
filename remains unchanged (i.e. 1. set URL, 2. parse, 3. set directory, 4. saveCalendar).
The URL remote file <u>file</u> part can be retrieved by the vcalendar method getConfig( &quot;filename&quot; ).
When using a resource, filename is unset (note <a href="#Filename">filename</a>, above).
</p>
<p class="label">Example</p>
<p>Parse of remote file, then local save in &quot;depot&quot; folder, using original filename</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;url&quot; =&gt; &quot;http://www.iCal.net/depot/calendar.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$vcalendar-&gt;sort();
.. .
.. .
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
$vcalendar-&gt;saveCalendar();
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
<a name="Calendar_component_object_property_function_list"></a><h2>3.2 Calendar component property method list</h2>
<p>
All iCalcreator component object property methods for get/set data.<br>
For property format in detail, see
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
</p>
<a name="DATE_WITH_UTC_TIME"></a>
<span class="label">Notice:</span> for properties and DATE-TIME with <b>UTC</b> time.
<p class="quotes">RFC2445:
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:
</p>
<p class="quotes">DTSTART:19980119T070000Z</p>
<p class="quotes">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.
</p>
<p>
<a name="date_restriction"></a>
<span class="label">Notice:</span> date limitation.<br>
Due to a limitation in <em>PHP</em> date functions, 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; may force a <em>PHP</em> date function 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>
Generic iCalcreator object instance delete property method,simplifying removal of <strong>calendar</strong> properties.<br>
FALSE is returned if no property exists or when end-of-properties at consecutive function calls.
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( [ PropName [, order ] )</p>
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
order = (int) if missing 1st/next occurrence,
used with multiply (property) occurrences</p>
<p class="label">Example</p>
<p>Remove all COMMENT properties in first event component.</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$event = $vcalendar-&gt;getComponent( &quot;vevent&quot; );
while( $event-&gt;deleteProperty( &quot;comment&quot; ))
&nbsp;&nbsp;continue;
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="getProperty_PROP"></a><h3>3.2.2 getProperty</h3>
<a name="geoLocation_PROP"></a>
<p>Generic iCalcreator component get property method, simplifying fetch of properties.</p>
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
<p>Using the non-standard directive &quot;GEOLOCATION&quot;, iCalcreator returns output supporting<br>
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
(only if <a href="#GEO">GEO</a> is set).
</p>
<p class="label">Format</p>
<p class="format">calendarComponent::getProperty( PropName [, order [, complete ]] )</p>
<p class="comment">propName = (string) case independent, [RFc5545] component property names,
unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
order = (int) if missing/FALSE 1st/next occurrence,
otherwise with multiply occurrences (1st=1, 2nd=2.. .)
complete - (bool) 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="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;directory&quot; =&gt; &quot;import&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $vevent = $vcalendar-&gt;getComponent( &quot;vevent&quot; )) {
$dtstart = $vevent-&gt;getProperty( &quot;dtstart&quot; ); // <span class="comment">one occurrence</span>
$description = $vevent-&gt;getProperty( &quot;description&quot; ); // <span class="comment">one occurrence</span>
while( $comment = $vevent-&gt;getProperty( &quot;comment&quot; )) { // <span class="comment">MAY occur more than once</span>
.. .
}
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="parse"></a><h3>3.2.3 parse</h3>
<p>
Parse iCal component property text from a string or an array.
Each string/array row must be strict RFC5545 formatted, i.e. begin with a property name.
</p>
<p>
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;
as well as <a href="#VTIMEZONE">TIMEZONE</a> and standard/daylight subcomponents.
</p>
<p>
If major parse error occurs (like invalid <strong>calendar</strong> structure or no <strong>calendar</strong> components), FALSE is returned.
</p>
<p>
Minor errors like non-standard line-endings, initial and trailing empty lines
as well as files without proper end line(-s) (i.e. missing component end iCal directives)
are managed.
</p>
<p>
Except the <a href="#X-PROPERTY_PROP">X-properties</a>, non-standard properties are ignored.
</p>
<p class="label">Format</p>
<p class="format">calendarComponent::parse( propertyText )</p>
<p class="comment">propertyText = (string) [RFC5545] formatted property,
(array) [RFC5545] formatted properties,
property name <b>must</b> start string / rows(-s)</p>
<p class="label">example</p>
<p class="example">&lt;?php
.. .
$e = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$e-&gt;parse( &quot;DTSTAMP:19970324T1200Z&quot; );
$e-&gt;parse( &quot;SEQUENCE:0&quot; );
$e-&gt;parse( &quot;ORGANIZER:MAILTO:jdoe@host1.com&quot; );
$e-&gt;parse( array(
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com&quot;,
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host2.com&quot;,
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host3.com&quot;,
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host4.com&quot; ));
$e-&gt;parse( &quot;DTSTART:19970324T123000Z&quot; );
$e-&gt;parse( &quot;DTEND:19970324T210000Z&quot; );
$e-&gt;parse( &quot;CATEGORIES:MEETING,PROJECT&quot; );
$e-&gt;parse( &quot;CLASS:PUBLIC&quot; );
$e-&gt;parse( &quot;SUMMARY:Calendaring Interoperability Planning Meeting&quot; );
$e-&gt;parse( &quot;STATUS:DRAFT&quot; );
$e-&gt;parse( &quot;DESCRIPTION:Project xyz Review Meeting Minutes\\n &quot;
. &quot;Agenda\\n &quot;
. &quot;1. Review of project version 1.0 requirements.\\n &quot;
. &quot;2. Definition of project processes.\\n &quot;
. &quot;3. Review of project schedule.\\n &quot;
. &quot;Participants: John Smith, Jane Doe, Jim Dandy\\n &quot;
. &quot;- It was decided that the requirements need to be signed off by \\n &quot;
. &quot;product marketing.\\n &quot;
. &quot;- Project processes were accepted.\\n &quot;
. &quot;- Project schedule needs to account for scheduled holidays and employee\\n &quot;
. &quot; vacation time. Check with HR for specific dates.\\n &quot;
. &quot;- New schedule will be distributed by Friday.\\n &quot;
. &quot;- Next weeks meeting is cancelled. No meeting until 3/23.&quot; );
$e-&gt;parse( &quot;LOCATION:LDB Lobby&quot; );
$e-&gt;parse( &quot;ATTACH;FMTTYPE=application/postscript:ftp://xyz.com/pub/conf/bkgrnd.ps&quot; );
$e-&gt;parse( array( &quot;BEGIN:VALARM&quot;
, &quot;ACTION:AUDIO&quot;
, &quot;TRIGGER;VALUE=DATE-TIME:19970224T070000Z&quot;
, &quot;ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud&quot;
, &quot;REPEAT:4&quot;
, &quot;DURATION:PT1H&quot;
, &quot;X-alarm:non-standard ALARM property&quot;
, &quot;END:VALARM&quot; ));
$e-&gt;parse( &quot;X-xomment:non-standard property will be displayed, comma escaped&quot;);
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="setProperty_PROP"></a><h3>3.2.4 setProperty</h3>
<p>
Generic iCalcreator component object set property method, simplifying insert of properties. For properties where
multiple occurrences are allowed, last parameter is an index, implementing replaceProperty functionality.
</p>
<p>A successful update returns TRUE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY_PROP">X-property</a>.
Proparg_n = (mixed) property content
Last property argument is a (optional) property dependent parameters
array( *[(string) key =&gt; (string) value ] ).
A non-standard (, experimental) parameter key MUST be prefixed by &quot;X-&quot;.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;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-&gt;setProperty( &quot;duration&quot;, 0, 0, 3 ));
$vevent-&gt;setProperty( &quot;LOCATION&quot;, &quot;Central Plaza&quot; );
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="ACTION"></a><h3>3.2.5 ACTION</h3>
<p>
This property defines the action to be invoked when an <a href="#VALARM">VALARM</a> is triggered,
<br> &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;.
This property is REQUIRED and MUST NOT occur more than once. (&quot;PROCEDURE&quot; is deprecated in [RFC5545].)
</p>
<h5>Create ACTION</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createAction()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createAction();
.. .
</p>
<h5>Delete ACTION</h5>
<p>Remove ACTION from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;Action&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;Action&quot; );
.. .
</p>
<h5>Get ACTION</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;Action&quot; )</p>
<p class="comment">output = actionValue<sup>1</sup>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;Action&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; actionValue<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$action = $valarm-&gt;getProperty( &quot;action&quot; );
.. .
</p>
<h5>Set ACTION</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;Action&quot;, actionValue [, xparams ] )</p>
<p class="comment">actionValue<sup>1</sup> = (string) one of &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;action&quot;, &quot;DISPLAY&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="ATTACH"></a><h3>3.2.6 ATTACH</h3>
<p>
The property provides the capability to associate a document object with a <strong>calendar</strong> component. The property is
is REQUIRED and MUST NOT occur more than once in an &quot;ALARM&quot; (&quot;ACTION&quot; &quot;procedure&quot;),
OPTIONAL and MUST NOT occur more than once in an &quot;ALARM&quot; (&quot;ACTION&quot; &quot;audio&quot;) and
OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VALARM">VALARM</a> (&quot;ACTION&quot; &quot;email&quot;) components.
</p>
<p>
The default value type for ATTACH is URI. The value type can also be set to BINARY to indicate inline binary encoded content (params<sup>2</sup>).
</p>
<p>
If using other parameters than the recommended &quot;FMTTYPE&quot; and the mandatory &quot;ENCODING&quot; (=&quot;BASE64&quot;)and &quot;VALUE&quot; (=&quot;BINARY&quot;)
for an inline binary encoded attachment,
please use only characters within the ASCII character set in parameter name and content,
to ensure proper line folding when using <a href="#createCalendar">createCalendar</a> and/or <a href="#returnCalendar">returnCalendar</a>.
</p>
<h5>Create ATTACH</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createAttach()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createAttach();
.. .
</p>
<h5>Delete ATTACH</h5>
<p>Remove ATTACH from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;ATTACH&quot; )</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;ATTACH&quot; );
.. .
</p>
<p class="label">Example 2</p>
Delete ATTACH property no 2.
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;ATTACH&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
Deleting all ATTACH properties.
<p class="example">&lt;?php
.. .
while( $valarm-&gt;deleteProperty( &quot;ATTACH&quot; ))
continue;
.. .
</p>
<h5>Get ATTACH</h5>
<p>If set, returns property value(-s), otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;Attach&quot; )</p>
<p class="comment">output = attachValue<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;ATTACH&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value,
<p class="comment">output = array( &quot;value&quot; =&gt; attachValue<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;Attach&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo ATTACH</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$attach = $valarm-&gt;getProperty( &quot;attach&quot; );
.. .
</p>
<h5>Set ATTACH</h5>
<p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;attach&quot;, attachValue<sup>1</sup> [, params [, propOrderNo ]] )</p>
<p class="comment">attachValue<sup>1</sup> = (string) URI / inline binary encoded content
params<sup>2</sup> = (array ) ( [ &quot;ENCODING&quot; =&gt; &quot;BASE64&quot;, &quot;VALUE&quot; =&gt; &quot;BINARY&quot; ]
[, &quot;FMTTYPE&quot; =&gt; contentType ]
*[,&nbsp;xparams ] )
contentType = (string) The parameter value MUST be the TEXT for either an IANA
registered content type or a non-standard content type.
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;attach&quot;
, &quot;ftp://domain.com/pub/docs/agenda.doc&quot;
, array( &quot;FMTTYPE&quot; =&gt; &quot;application/binary&quot; ));
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="ATTENDEE"></a><h3>3.2.7 ATTENDEE</h3>
<p>
The property defines an "Attendee" within a <strong>calendar</strong> component and is OPTIONAL and MUST NOT occur more than once
in a VALARM (&quot;ACTION&quot; &quot;email&quot;), OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
</p>
<p>This value type for ATTENDEE is URI, a <strong>calendar</strong> user address.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) ATTENDEE values.</p>
<p>You can export <strong>calendar</strong> ATTENDEE values as <a href="#iCal2vCards">vCards</a>.
<h5>Create ATTENDEE</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createAttendee()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createAttendee();
.. .
</p>
<h5>Delete ATTENDEE</h5>
<p>Remove ATTENDEE from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;ATTENDEE&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) ATTENDEE property</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;ATTENDEE&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete ATTENDEE property no 2.</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;ATTENDEE&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
Deleting all ATTENDEE properties.
<p class="example">&lt;?php
.. .
while( $valarm-&gt;deleteProperty( &quot;ATTENDEE&quot; ))
continue;
.. .
</p>
<h5>Get ATTENDEE</h5>
<p>If set, returns property value(-s), otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;Attendee&quot; )</p>
<p class="comment">output = attendeeValue<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;ATTENDEE&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; attendeeValue<sup>1</sup>
, &quot;params&quot; =&gt; array( params<sup>2</sup> ))</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;ATTENDEE&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = attendeeValue<sup>1</sup></p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$attendee = $valarm-&gt;getProperty( &quot;attendee&quot; );
.. .
</p>
<h5>Set ATTENDEE</h5>
<p>
Insert property value. If exist, default parameter values are removed after input (params<sup>2</sup>).
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738 ),
if missing, &quot;mailto:&quot; is set (indicating an internet mail address).
Also MEMBER and DIR parameters must be prefixed by protocol. DELEGATED-TO, DELEGATED-FROM, SENT-BY parameters
must use protocol &quot;mailto:&quot;, prefixed if missing (indicating an internet mail address).
</p>
<p>
The CN, ROLE, PARTSTAT, RSVP, CUTYPE, MEMBER, DELEGATED-TO,DELEGATED-FROM, SENT-BY and DIR
properties are not accepted (i.e. removed) in a "VFREEBUSY" or "VALARM" "ATTENDEE" property content.
</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;attendee&quot;, attendeeValue [, params [, propOrderNo ]] )</p>
<p class="comment">attendeeValue<sup>1</sup> = (string) a <strong>calendar</strong> user address, a URI as defined by
[RFC 1738] or any other IANA registered form
for a URI.
params<sup>2</sup> = (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)
/ (string) x-name
(Experimental type)
/ iana-token
(string) (Other IANA registered type)
MEMBER = "MEMBER" =&gt; array( *[ (string) &quot;single member
of the group or list membership&quot;])
ROLE = "ROLE" =&gt; &quot;CHAIR&quot;
(Indicates chair of the <strong>calendar</strong>
entity)
/ &quot;REQ-PARTICIPANT&quot;
(required participation, <b>Default</b>)
/ &quot;OPT-PARTICIPANT&quot;
(optional participation)
/ &quot;NON-PARTICIPANT&quot;
(information purposes only)
/ (string) x-name
(Experimental role)
/ (string) 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)
/ (string) x-name
(Experimental status)
/ (string) iana-token
(Other IANA registered status)
RSVP = &quot;RSVP&quot; =&gt; (string) &quot;TRUE&quot;
/ &quot;FALSE&quot;, <b>Default</b> (reply expectation)
DELEGATED-TO = &quot;DELEGATED-TO&quot; =&gt; array(*[(string) &quot;single <strong>calendar</strong> user
to specified by the property
has delegated participation&quot;])
DELEGATED-FROM = &quot;DELEGATED-FROM&quot; =&gt; array( *[ (string) &quot;single <strong>calendar</strong> user that
have delegated their
participation to the
<strong>calendar</strong> user specified
by the property&quot; ] )
SENT-BY = &quot;SENT-BY&quot; =&gt; (string) single <strong>calendar</strong> user that is
acting on behalf
of the <strong>calendar</strong> user
specified by the property&quot;
LANGUAGE = &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; (applies to the CN parameter value)
CN = &quot;CN&quot; =&gt; (string) &quot;common name to be associated with the <strong>calendar</strong>
user specified by the property&quot;
DIR = &quot;DIR&quot; =&gt; (string) &quot;reference to a directory entry associated with
the <strong>calendar</strong> user specified by the property&quot;
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p>
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;attendee&quot;
, &quot;attendee1@ical.net&quot;
$vevent-&gt;setProperty( &quot;attendee&quot;
, &quot;attendee2@ical.net&quot;
, array( &quot;cutype&quot; =&gt; &quot;INDIVIDUAL&quot;
, &quot;member&quot; =&gt; array( &quot;member1@ical.net&quot;
, &quot;member2@ical.net&quot;
, &quot;member3@ical.net&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;part1@ical.net&quot;
, &quot;part2@ical.net&quot;
, &quot;part3@ical.net&quot; )
, &quot;delegateD-FROM&quot; =&gt;array( &quot;cio@ical.net&quot;
, &quot;vice.cio@ical.net&quot;)
, &quot;SENT-BY&quot; =&gt; &quot;secretary@ical.net&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/info.doc&quot;
, &quot;x-agenda&quot; =&gt; &quot;status reports&quot; <span class="comment">// xparam</span>
, &quot;x-length&quot; =&gt; &quot;15 min&quot; )); <span class="comment">// xparam</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="CATEGORIES"></a><h3>3.2.8 CATEGORIES</h3>
<p>
This property defines the categories for a <strong>calendar</strong> component and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p>
The value type for CATEGORIES is TEXT.
</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) CATEGORIES values.</p>
<h5>Create CATEGORIES</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createCategories()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createCategories();
.. .
</p>
<h5>Delete CATEGORIES</h5>
<p>Remove CATEGORIES from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;CATEGORIES&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) CATEGORIES property</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;CATEGORIES&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete CATEGORIES property no 2.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;CATEGORIES&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all CATEGORIES properties.</p>
<p class="example">&lt;?php
.. .
while( $vevent-&gt;deleteProperty( &quot;CATEGORIES&quot; ))
continue;
.. .
</p>
<h5>Get CATEGORIES</h5>
<p>If set, returns property value(-s), otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot; )</p>
<p class="comment">output = categoryValue<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; categories<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>3</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo CATEGORIES</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$categories = $valarm-&gt;getProperty( &quot;categories&quot; );
.. .
</p>
<h5>Set CATEGORIES</h5>
<p>Insert property value.</p>
<p>
In spite of the fact that CATEGORIES may contain a (comma separated) list of values,
a strong recommendation is to split a CATEGORIES &quot;list&quot; into multiple single CATEGORIES entries.
</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;categories&quot;, categories [, params [, propOrderNo ]] )</p>
<p class="comment">categories<sup>1</sup> = (string) categoryValue / (array) ( *categoryValue )
categoryValue<sup>2</sup> = (string) textual categories or subtypes of the <strong>calendar</strong> component,
can be specified as a list of categories
separated by the COMMA character
params<sup>3</sup> = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;&lt;lang<sup>*</sup>&gt;&quot;] *[, xparams] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;categories&quot;, &quot;project_x&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="CLASS"></a><h3>3.2.9 CLASS</h3>
<p>
This property defines the access classification for a <strong>calendar</strong> component and is OPTIONAL
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<h5>Create CLASS</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createClass()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createClass();
.. .
</p>
<h5>Delete CLASS</h5>
<p>Remove CLASS from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;CLASS&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vjournal-&gt;deleteProperty( &quot;CLASS&quot; );
.. .
</p>
<h5>Get CLASS</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;CLASS&quot; )</p>
<p class="comment">output = classValue<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;CLASS&quot;, FALSE , TRUE )</p>
<p class="comment">output = array &quot;value&quot; =&gt; classValue<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$class = $valarm-&gt;getProperty( &quot;class&quot; );
.. .
</p>
<h5>Set CLASS</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;class&quot;, classvalue [, xparams ] )</p>
<p class="comment">classvalue<sup>1</sup> = &quot;PUBLIC&quot;
/ &quot;PRIVATE&quot;
/ &quot;CONFIDENTIAL&quot;
/ (string) iana-token
/ (string) x-name
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;class&quot;, &quot;CONFIDENTIAL&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="COMMENT"></a><h3>3.2.10 COMMENT</h3>
<p>
This property specifies non-processing information intended to provide a comment to the <strong>calendar</strong> user
and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>, <a href="#VFREEBUSY">VFREEBUSY</a>, <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
</p>
<p>The value type for COMMENT is TEXT.</p>
<h5>Create COMMENT</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createComment()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createComment();
.. .
</p>
<h5>Delete COMMENT</h5>
<p>Remove COMMENT from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;COMMENT&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) COMMENT property</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;COMMENT&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete COMMENT property no 2.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;COMMENT&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all COMMENT properties.</p>
<p class="example">&lt;?php
.. .
while( $vevent-&gt;deleteProperty( &quot;COMMENT&quot; ))
continue;
.. .
</p>
<h5>Get COMMENT</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot; )</p>
<p class="comment">output = commentValue<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; commentValue<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo COMMENT</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$comment = $vevent-&gt;getProperty( &quot;comment&quot; );
.. .
</p>
<h5>Set COMMENT</h5>
<p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;comment&quot;, commentValue [, params [, propOrderNo ]] )</p>
<p class="comment">commentValue<sup>1</sup> = (string) Value type Text
params<sup>2</sup> = (array) (
[ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
[, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
*[, xparams ] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;comment&quot;, &quot;this is a comment&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="COMPLETED"></a><h3>3.2.11 COMPLETED</h3>
<p>
This property defines the date and time that a <a href="#VTODO">VTODO</a> was actually completed and is OPTIONAL and MUST NOT occur more than once.
</p>
<p>The value type for COMPLETED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="CONTACT"></a><h3>3.2.12 CONTACT</h3>
<p>
The property is used to represent textual contact information or alternately a reference to textual contact information
associated with the <strong>calendar</strong> component. The property is OPTIONAL and MUST NOT occur more than once in
a VFREEBUSY or MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and
<a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p>The value type for CONTACT is TEXT.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) CONTACT values.</p>
<p>You can export <strong>calendar</strong> CONTACT values as <a href="#iCal2vCards">vCards</a>.
<h5>Create CONTACT</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createContact()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createContact();
.. .
</p>
<h5>Delete CONTACT</h5>
<p>Remove CONTACT from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;CONTACT&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) CONTACT property<p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;CONTACT&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete CONTACT property no 2.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;CONTACT&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all CONTACT properties.</p>
<p class="example">&lt;?php
.. .
while( $vevent-&gt;deleteProperty( &quot;CONTACT&quot; ))
continue;
.. .
</p>
<h5>Get CONTACT</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot; )</p>
<p class="comment">output = contactValue<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; contactValue<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo CONTACT</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$contact = $vevent-&gt;getProperty( &quot;contact&quot; );
.. .
</p>
<h5>Set CONTACT</h5>
<p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;contact&quot;, contactValue [, params [, propOrderNo ]] )</p>
<p class="comment">contactValue<sup>1</sup> = (string) Value type TEXT
params<sup>2</sup> = (array) (
[ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
[, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
*[, xparams] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$c-&gt;setProperty( &quot;contact&quot;, &quot;tel 012-34 56 789&quot; )
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="CREATED"></a><h3>3.2.13 CREATED</h3>
<p>
This property specifies the date and time that the <strong>calendar</strong> information was created by
the <strong>calendar</strong> user agent in the <strong>calendar</strong> store.
Note: This is analogous to the creation date and time for a file in the file system.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
<a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p>The value type for CREATED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
<h5>Create CREATED</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createCreated()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createCreated();
.. .
</p>
<h5>Delete CREATED</h5>
<p>Remove CREATED from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;CREATED&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;CREATED&quot; );
.. .
</p>
<h5>Get CREATED</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;CREATED&quot; )</p>
<p class="comment">output = createdDate<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;CREATED&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; createdDate<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$created = $vevent-&gt;getProperty( &quot;CREATED&quot; );
.. .
</p>
<h5>Set CREATED</h5>
<p>
Insert property value. Input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or,
if &quot;offset&quot; parameter is used, converted to a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a local datetime to UTC datetime.
</p>
<p>The current UTC date-time is set if invoked without parameters.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;created&quot;, [ createdDate [, xparams ]] )</p>
<p class="comment">createdDate<sup>1</sup> = (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; offset ]] )
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
[, offset ]] )
createdDate = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
createdDate = (string) date/datetime string<sup>*</sup>
offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
<br>date/datetime string<sup>*</sup> recommended formats
&quot;20110625&quot;, &quot;2011-06-25&quot;, &quot;2011/06/26&quot;
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
trailing characters (digits), if exists, will be interpreted as offset
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
$vtodo = &amp; $vcalendar-&gt;newComponent( &quot;vtodo&quot; );
.. .
$vtodo-&gt;setProperty( &quot;created&quot;, 2006, 8, 11, 14, 30, 35 ); // <span class="comment">11 august 2006 14.30.35 UTC</span>
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$date = array(&quot;year&quot; =&gt; 2006, &quot;month&quot; =&gt; 10, &quot;day&quot; =&gt; 10,
&quot;hour&quot; =&gt; 10, &quot;min&quot; =&gt; 0, &quot;sec&quot; =&gt; 0, &quot;tz&quot; =&gt; &quot;+0200&quot;);
// <span class="comment">local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
$vtodo-&gt;setProperty( &quot;created&quot;, $date );
.. .
</p>
<p class="label">Example 3</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;created&quot; ); // <span class="comment">current UTC date-time is set if invoked without parameters</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="DESCRIPTION"></a><h3>3.2.14 DESCRIPTION</h3>
<p>
This property provides a more complete textual description of the <strong>calendar</strong> component,
than that provided by the <a href="#SUMMARY">SUMMARY</a> property (, analogous to a mail BODY).
The property is OPTIONAL, MUST NOT occur more than once within <a href="#VEVENT">VEVENT</a>,
<a href="#VTODO">VTODO</a> or <a href="#VALARM">VALARM</a> (PROCEDURE) but can be specified multiple
times within a <a href="#VJOURNAL">VJOURNAL</a> <strong>calendar</strong> component. The property is REQUIRED in <a href="#VALARM">VALARM</a> (DISPLAY, EMAIL) component.
</p>
<p>The value type for DESCRIPTION is TEXT.</p>
<h5>Create DESCRIPTION</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createDescription()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createDescription();
.. .
</p>
<h5>Delete DESCRIPTION</h5>
<p>Remove DESCRIPTION from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;DESCRIPTION&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) DESCRIPTION property.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;DESCRIPTION&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete DESCRIPTION property no 2.</p>
<p class="example">&lt;?php
.. .
$vjournal-&gt;deleteProperty( &quot;DESCRIPTION&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all DESCRIPTION properties.</p>
<p class="example">&lt;?php
.. .
while( $vjournal-&gt;deleteProperty( &quot;DESCRIPTION&quot; ))
continue;
.. .
</p>
<h5>Get DESCRIPTION</h5>
<p>If set, returns property value(-s), otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;DESCRIPTION&quot; )</p>
<p class="comment">output = descriptionValue<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;DESCRIPTION&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; descriptionValue<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$description = $vevent-&gt;getProperty( &quot;description&quot; );
.. .
</p>
<h5>Set DESCRIPTION</h5>
<p>Insert property value.</p>
<br>
Parameters will be ordered as prescribed in [RFC5545].
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;description&quot;, descriptionValue [, params [, propOrderNo ]] )</p>
<p class="comment">descriptionValue<sup>1</sup> = (string) Value type TEXT
params<sup>2</sup> = (array) (
[ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
[, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
*[, xparams ] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;description&quot;, &quot;This is a description&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="DTEND"></a><h3>3.2.15 DTEND</h3>
<p>
This property specifies the date and time that a <strong>calendar</strong> component ends.
The property is OPTIONAL and MUST NOT occur more than once in VFREEBUSY and VEVENT. In VEVENT, it only occurs
if DURATION NOT occurs.
</p>
<p>
The default value type for DTEND is DATE-TIME, can be set to a DATE value type.
</p>
<p class="quotes">
The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
</p>
<p>
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.
</p>
<h5>Create DTEND</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createDtend()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createDtend();
.. .
</p>
<h5>Delete DTEND</h5>
<p>Remove DTEND from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;DTEND&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;DTEND&quot; );
.. .
</p>
<h5>Get DTEND</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;DTEND&quot; )</p>
<p class="comment">output = dtendDate<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;DTEND&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; dtendDate<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$dtend = $vevent-&gt;getProperty( &quot;dtend&quot; );
.. .
</p>
<h5>Set DTEND</h5>
<p>
Insert property value. If DATE value type is expected, &quot;VALUE&quot; = &quot;DATE&quot; <b>must</b> be set
(in params<sup>2</sup>) otherwise DATE-TIME (default) value type is set.
</p>
<p>
If no timezone parameter (tz or tzidparam below) is set (i.e.local time) and config <a href="#dTZID">TZID</a> is set,
date-time values will be set WITH timezone from config.
Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a datetime from one time zone to another.
</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;dtend&quot;, dtendDate [, params<sup>2</sup> ] )
<p class="comment">dtendDate<sup>1</sup> = (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; tz ]] )
dtendDate = (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]]
dtendDate = array( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]] )
dtendDate = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [,&quot;tz&quot; =&gt; tz])
// <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
// <span class="comment">timestamp with tz=offset will result in a local DATE-TIME</span>
dtendDate = (string) date/datetime string<sup>*</sup>
// <span class="comment">Within the "VFREEBUSY" <strong>calendar</strong> component,</span>
// <span class="comment">the time MUST be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
tz = (string) &lt;timezone identifier&gt; / offset
// <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset</span>
// <span class="comment">will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
params<sup>2</sup> = (array) ([ tzidparam/datetimeparam/dateparam ] *[,xparams])
tzidparam = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
// <span class="comment">output as local date-time with timezone identifier</span>
// <span class="comment">if tzidparam=&quot;GMT&quot;/&quot;UTC&quot; then</span>
// <span class="comment">output date-time is suffixed by 'Z'</span>
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">default, output as date-time</span>
dateparam = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="comment">output as DATE, ex. all-day event</span>
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
<br>date/datetime string<sup>*</sup> recommended formats
&quot;20110625&quot;, &quot;2011-06-25&quot;, &quot;2011/06/26&quot;
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 16, 30, 0 ); <span class="comment">// 11 august 2006 16.30.00 local date</span>
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$vfreebusy-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 16, 30, 0, &quot;-040000&quot; );
<span class="comment">// 11 august 2006 16.30.00 -040000</span>
<span class="comment">// local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
.. .
</p>
<p class="label">Example 3</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;dtend&quot;
, array( &quot;year&quot; =&gt;, 2006, &quot;month&quot; =&gt; 8, &quot;day&quot;=&gt; 11 )
, array( &quot;VALUE&quot; =&gt; &quot;DATE&quot; ));
<span class="comment">// end of an all-day event</span>
.. .
</p>
<p class="label">Example 4</p>
<p class="example">&lt;?php
.. .
$calendar->setConfig( 'TZID', 'Europe/Stockholm' );
.. .
$vevent-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 7, 30, 0 );
<span class="comment">// output: DTEND;TZID=Europe/Stockholm:20060811T073000</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="DTSTAMP"></a><h3>3.2.16 DTSTAMP</h3>
<p>
The property indicates the date/time the instance of the <strong>iCalendar</strong> object was created and is OPTIONAL and
MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>
and <a href="#VFREEBUSY">VFREEBUSY</a> components. However, DTSTAMP is <b>AUTOMATICALL§Y GENERATED</b> in iCalcreator when creating a component.
</p>
<p>
DTSTAMP may be required when importing iCal files into some <strong>calendar</strong> software<br>(MS etc.),
as well as (<strong>calendar</strong>) <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and<br>"X-WR-TIMEZONE",
<a href="#METHOD">METHOD</a> property (value PUBLISH etc.) and the (also auto created) <a href="#UID">UID</a> property.
</p>
<p>The value type for DTSTAMP is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) DTSTAMP values.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="DTSTART"></a><h3>3.2.17 DTSTART</h3>
<p>
This property specifies when the <strong>calendar</strong> component begins.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
<a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
</p>
<p>The default value type for DTSTART is DATE-TIME, can be set to a DATE value type.</p>
<p>
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="comment">opt., in effect midnight of the day <u>before</u> the date!!</span>
</p>
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="DUE"></a><h3>3.2.18 DUE</h3>
<p>
This property defines the date and time when a <a href="#VTODO">VTODO</a> is expected to be completed
and is OPTIONAL and MUST NOT occur more than once and only if DURATION NOT occurs.
</p>
<p>
The default value type for DUE is DATE-TIME, can be set to a DATE value type.
</p>
<p class="quotes">
The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
</p>
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="DURATION"></a><h3>3.2.19 DURATION</h3>
<p>The property specifies a positive duration of time.</p>
<dl>
<dt>In a <a href="#VEVENT">VEVENT</a>
<dd>it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DTEND. If one occurs, so MUST NOT the other.<br>
<dt>In a <a href="#VTODO">VTODO</a>
<dd>it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DUE. If one occurs, so MUST NOT the other.<br>
<dt>In a <a href="#VFREEBUSY">VFREEBUSY</a>
<dd>it is OPTIONAL and MUST NOT occur more than once. ([RFC2445])<br>
<dd>it can not appear. ([RFC5545])<br>
<dt>In a <a href="#VALARM">VALARM</a>
<dd>it is OPTIONAL and MUST NOT occur more than once and MUST occur in pair with TRIGGER. If one occurs, so MUST the other.
</dl>
<p>
If any hour/minute/second duration part is set, all parts are included in output (ex. one hour duration: &quot;PT1H0M0S&quot;).
</p>
<h5>Create DURATION</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createDuration()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createDuration();
.. .
</p>
<h5>Delete DURATION</h5>
<p>Remove DURATION from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;DURATION&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;DURATION&quot; );
.. .
</p>
<h5>Get DURATION</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;DURATION&quot; )</p>
<p class="comment">output = duration<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;DURATION&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; duration<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$duration = $vtodo-&gt;getProperty( &quot;duration&quot; );
.. .
</p>
<p class="label">option</p>
<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 the added DURATION value (incl. opt. timezone).
</p>
<h5>Set DURATION</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;duration&quot;, duration [, xparams ] )</p>
<p class="comment">
duration<sup>1</sup> = (array) ( &quot;week&quot; =&gt; (int) week )
duration<sup>1</sup> = 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 ])
duration = (array) ( &quot;sec&quot; =&gt; (int) sec )
duration = (array) ( (int) week/false
[, (int) day/false
[, (int) hour
, (int) min
, (int) sec ]] )
duration = (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;
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example 1</p>
<p>One day duration.</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;setProperty &quot;duration&quot; , array( &quot;day&quot; =&gt; 1 ));
.. .
</p>
<p class="label">Example 2</p>
<p>Four hours duration.</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;setProperty( &quot;duration&quot;, &quot;PT4H&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="EXDATE"></a><h3>3.2.20 EXDATE</h3>
<p>
This property defines the list of date/time exceptions for a recurring <strong>calendar</strong> component and is OPTIONAL
and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p>The default value type for EXDATE is DATE-TIME, can be set to a DATE value type.</p>
<h5>Create EXDATE</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createExdate()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createExdate();
.. .
</p>
<h5>Delete EXDATE</h5>
<p>Remove EXDATE from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;EXDATE&quot; )</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;EXDATE&quot; );
.. .
</p>
<p class="label">Example 2</p>
<P>Delete EXDATE property no 2.</p>
<p class="example">&lt;?php
.. .
$vjournal-&gt;deleteProperty( &quot;EXDATE&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all EXDATE properties.</p>
<p class="example">&lt;?php
.. .
while( $vjournal-&gt;deleteProperty( &quot;EXDATE&quot; ))
continue;
.. .
</p>
<h5>Get EXDATE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;EXDATE&quot; )<p>
<p class="comment">output = exdates<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;exdate&quot;, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; exdates<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;EXDATE&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo EXDATE</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$exdate = $vtodo-&gt;getProperty( &quot;exdate&quot; );
.. .
</p>
<h5>Set EXDATE</h5>
<p>Insert property value.</p>
<p>The value type for EXDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
<p>
If DATE value type is set in params (&quot;VALUE&quot; = &quot;DATE&quot;), all timezone or offset in dates are ignored.<br>
If no &quot;VALUE&quot; value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
</p>
<p>
If &quot;TZID&quot; is set in params,
all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
If no &quot;TZID&quot; is set in params and timezone in 1st date, all remaining dates are within this timezone and param &quot;TZID&quot; is set.<br>
If none of the above rules are applicable, DATE-TIME and local date is set default.
</p>
<p>
Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
</p>
<p>EXDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
<p>
In spite of the fact that EXDATE may contain a (comma separated) list of values,
a strong recommendation is to split a EXDATE &quot;list&quot; into multiple single EXDATE entries.
</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;exdate&quot;, exdates [, params [, propOrderNo ]] )</p>
<p class="comment">exdates<sup>1</sup> = (array) ( date *[, date ] )
date = array( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]] )
date<sup>1</sup> = (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; tz ]] )
date = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [, &quot;tz&quot; =&gt; tz])
// <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
date = (string) date/datetime string<sup>*</sup>
tz = (string) &lt;timezone identifier&gt; / offset
// <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
params<sup>2</sup> = (array) ([(datetimeparam/dateparam)&nbsp;/ tzidparam] *[,xparams])
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">default, output as date-time</span>
dateparam = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="comment">output as DATE</span>
tzidparam = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
<br>date/datetime string<sup>*</sup> recommended formats
&quot;20110625&quot;, &quot;2011-06-25&quot;, &quot;2011/06/26&quot;
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="commsnt">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;exdate&quot;, array( array( 2006, 8, 14, 16, 0, 0 ));
<span class="comment">// exclude 2006-08-14 16.00.00 (local date) from recurrence pattern</span>
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;exdate&quot;
, array( array(&quot;year&quot; =&gt;,2006,&quot;month&quot; =&gt; 8,&quot;day&quot;=&gt; 11))
, array( &quot;VALUE&quot; =&gt; &quot;DATE&quot; ));
<span class="comment">// exclude 2006-08-11 from recurrence pattern;</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="EXRULE"></a><h3>3.2.21 EXRULE</h3>
<p>
This property defines a rule or repeating pattern for an exception to a recurrence set and is OPTIONAL
and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p>EXRULE is deprecated in [RFC5545]!</p>
<h5>Create EXRULE</h5>
<p>If set, returns [RFC2445] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createExrule()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createExrule();
.. .
</p>
<h5>Delete EXRULE</h5>
<p>Remove EXRULE from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;EXRULE&quot; )</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;EXRULE&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete EXRULE property no 2.</p>
<p class="example">&lt;?php
.. .
$vjournal-&gt;deleteProperty( &quot;EXRULE&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all EXRULE properties.</p>
<p class="example">&lt;?php
.. .
while( $vjournal-&gt;deleteProperty( &quot;EXRULE&quot; ))
continue;
.. .
</p>
<h5>Get EXRULE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;EXRULE&quot; )</p>
<p class="comment">output = recur<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;exrule&quot;, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; recur<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;EXRULE&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo EXRULE</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$exrule = $vtodo-&gt;getProperty( &quot;exrule&quot; );
.. .
</p>
<h5>Set EXRULE</h5>
<p>
Insert property value.
Notice, use function <a href="#transformDateTime">transformDateTime</a>to change a local datetime to a UTC datetime.
</p>
<p>Parameters, will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;exrule&quot;, recur [, xparams [, propOrderNo ]] )</p>
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
<p class="comment">recur<sup>1</sup> = (array) ( "FREQ" =&gt; freq
// <span class="comment">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="comment">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; (string) 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 // <span class="comment">a DATE value or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value</span>
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 ])
date = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
date = (string) date/datetime string<sup>*</sup>
byseclist = seconds
byseclist = (array) (seconds *(, seconds ))
seconds = 1DIGIT / 2DIGIT ;0 to 59
byminlist = minutes
byminlist = (array) ( minutes *(, minutes ))
minutes = 1DIGIT / 2DIGIT ;0 to 59
byhrlist = hour
byhrlist = (array) ( hour *(, hour ))
hour = 1DIGIT / 2DIGIT ;0 to 23
bywdaylist = weekdaynum
bywdaylist = (array) ( weekdaynum *("," weekdaynum ))
weekdaynum = (array) ( [([plus] ordwk / minus ordwk)], &quot;DAY&quot; =&gt; 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 and SATURDAY days of the week.
bymodaylist = monthdaynum
bymodaylist = (array) ( monthdaynum *(, monthdaynum ))
monthdaynum = ( [plus] ordmoday ) / ( minus ordmoday )
ordmoday = 1DIGIT / 2DIGIT ;1 to 31
byyrdaylist = yeardaynum
byyrdaylist = (array) ( yeardaynum *(, yeardaynum ))
yeardaynum = ( [plus] ordyrday ) / ( minus ordyrday )
ordyrday = 1DIGIT / 2DIGIT / 3DIGIT ;1 to 366
bywknolist = weeknum
bywknolist = (array) ( weeknum *(, weeknum ))
weeknum = ( [plus] ordwk ) / ( minus ordwk )
bymolist = monthnum
bymolist = (array) ( monthnum *(, monthnum ))
monthnum = 1DIGIT / 2DIGIT ;1 to 12
bysplist = setposday
bysplist = (array) ( setposday *(, setposday ))
setposday = yeardaynum
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
<br>date/datetime string<sup>*</sup> recommended formats
&quot;20110625&quot;, &quot;2011-06-25&quot;, &quot;2011/06/26&quot;
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty(&nbsp;&quot;Exrule&quot;
,&nbsp;array( &quot;FREQ&quot; =&gt; &quot;MONTHLY&quot;
, &quot;UNTIL&quot; =&gt; &quot;20060831&quot;
// <span class="comment">DATE / DATE-TIME in <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> format; string/array, see <a class="ref" 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;key&quot; =&gt; &quot;xparamValue&quot; ));
$vtodo-&gt;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; )
, array( &quot;key&quot; =&gt; &quot;xparamValue&quot; ));
// <span class="comment">(*) single value/array of values</span>
// <span class="comment">(**) single value array /array of arrays</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="FREEBUSY_PROP"></a><h3>3.2.22 FREEBUSY</h3>
<p>
The property defines one or more free or busy time intervals in a <a href="#VFREEBUSY">VFREEBUSY</a>
<strong>calendar</strong> component.
<p>
<p>The value type for FREEBUSY is PERIOD. A PERIOD is a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/DATE-TIME or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/duration.</p>
<h5>Create FREEBUSY</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createFreebusy()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createfreebusy();
.. .
</p>
<h5>Delete FREEBUSY</h5>
<p>Remove FREEBUSY from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;FREEBUSY&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) FREEBUSY property</p>
<p class="example">&lt;?php
.. .
$vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete FREEBUSY property no 2.</p>
<p class="example">&lt;?php
.. .
$vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all FREEBUSY properties.</p>
<p class="example">&lt;?php
.. .
while( $vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot; ))
continue;
.. .
</p>
<h5>Get FREEBUSY</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot; )</p>
<p class="comment">output = array( &quot;fbtype&quot; =&gt; freebusytype<sup>1</sup> , periods<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; array(&quot;fbtype&quot; =&gt; freebusytype<sup>1</sup> ,periods<sup>2</sup>)
, &quot;params&quot; =&gt; xparams<sup>3</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo FREEBUSY</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$freebusy = $vfreebusy-&gt;getProperty( &quot;FREEBUSY&quot; );
.. .
</p>
<h5>Set FREEBUSY</h5>
Insert property value. A FREEBUSY input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;freebusy&quot;,freebusytype,fbperiods [,xparams [,propOrderNo ]] )</p>
<p class="comment">freebusytype<sup>1</sup> = one of &quot;FREE&quot;
/ &quot;BUSY&quot; <b>Default</b>
/ &quot;BUSY-UNAVAILABLE&quot;
/ &quot;BUSY-TENTATIVE&quot;
/ x-name
fbperiods = (array) ( periods<sup>2</sup> )&nbsp;
periods<sup>2</sup> = (array) ( startdate, enddate/duration ) /
(array) ( *[, (array) ( startdate, enddate/duration )] )
startdate/enddate = (array) ( (int) year
, (int) month
, (int) day
, (int) hour
, (int) min
, (int) sec )
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 ) // <span class="comment">output format</span>
startdate/enddate = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
startdate/enddate = (string) datetime string<sup>*</sup>
// <span class="comment">startdate/enddate MUST be an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
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="comment">output format</span>
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;
xparams<sup>3 </sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
<br>date/datetime string<sup>*</sup> recommended formats
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example</p>
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
<p class="example">&lt;?php
.. .
$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="comment">duration for 6 hours</span>
$fdur8 = &quot;P2D&quot;; // <span class="comment">duration two days</span>
$freebusy-&gt;setProperty &quot;freebusy&quot;
, &quot;FREE&quot;
, array( array( $fdate1, $fdate2 )
, array( $fdate3, $fdur6 )
, array( $fdate4, $fdate5 )));
$freebusy-&gt;setProperty(&quot;freebusy&quot;
, &quot;Busy&quot;
, array( array( array( $fdate1, $fdate2 )
, array( $fdate3, $fdur8 )
, array( $fdate4, $fdur7 )
, array( $fdate1, $fdate3 )));
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="GEO"></a><h3>3.2.23 GEO</h3>
<p>
This property specifies information related to the global position for the activity specified by
<a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components and is OPTIONAL and MUST NOT occur more than once.
</p>
<p>Value type for latitude and longitude is FLOAT.</p>
<p class="quotes">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.</p>
<p>The output (float) latitude and longitude values are presented up to six decimals.</p>
<p>Using the non-standard directive &quot;GEOLOCATION&quot; when calling iCalcreator
<a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
getProperty method, iCalcreator returns output supporting<br>
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;<br>
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
(only if <a href="#GEO">GEO</a> is set).
</p>
<h5>Create GEO</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createGeo()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createGeo();
.. .
</p>
<h5>Delete GEO</h5>
<p>Remove GEO from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;GEO&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;GEO&quot; );
.. .
</p>
<h5>Get GEO</h5>
<p>If set, returns GEO property value (latitude/longitude) as prescribed in [RFC5545], otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::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="label">Format 2</p>
<p class="format">calendarComponent::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; xparams<sup>1</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$geo = $vevent-&gt;getProperty( &quot;GEO&quot; );
.. .
</p>
<h5>Set GEO</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;geo&quot;, latitude, longitude [, xparams ] )</p>
<p class="comment">latitude = (float) latitude
longitude = (float) longitude
xparams<sup>1</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;geo&quot;, 11.23456, -23.45678 );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="LAST-MODIFIED"></a><h3>3.2.24 LAST-MODIFIED</h3>
<p>
The property specifies the date and time that the information associated with the <strong>calendar</strong>
component was last revised in the <strong>calendar</strong> store.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
<a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VTIMEZONE">VTIMEZONE</a> components.
</p>
<p>The value type for LAST-MODIFIED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="LOCATION"></a><h3>3.2.25 LOCATION</h3>
<p>
The property defines the intended venue for the activity defined by a <strong>calendar</strong> component.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
</p>
<p>The value type for LOCATION is TEXT.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) LOCATION values.</p>
<p>Using the non-standard directive &quot;GEOLOCATION&quot; when calling iCalcreator
<a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
getProperty method, iCalcreator returns output supporting<br>
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
(only if <a href="#GEO">GEO</a> is set).
</p>
<h5>Create LOCATION</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createLocation()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createLocation();
.. .
</p>
<h5>Delete LOCATION</h5>
<p>Remove LOCATION from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;LOCATION&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;LOCATION&quot; );
.. .
</p>
<h5>Get LOCATION</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;LOCATION&quot; )</p>
<p class="comment">output = location<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;LOCATION&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; location<sup>1</sup>
, &quot;params&quot; =&gt; param<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$location = $vevent-&gt;getProperty( &quot;LOCATION&quot; );
.. .
</p>
<h5>Set LOCATION</h5>
<p>Insert property value.</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;location&quot;, location [, param] )</p>
<p class="comment">location<sup>1</sup> = (string) Value type TEXT
params<sup>2</sup> = (array) ( [&quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
[, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
*[, xparams ]
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;location&quot;, &quot;Buckingham Palace&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="ORGANIZER"></a><h3>3.2.26 ORGANIZER</h3>
<p>
The property defines the organizer for a <strong>calendar</strong> component and is OPTIONAL
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
<a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
</p>
<p>This value type for ORGANIZER is URI, a <strong>calendar</strong> user address.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) ORGANIZER values.</p>
<p>You can export <strong>calendar</strong> ORGANIZER values as <a href="#iCal2vCards">vCards</a>.
<h5>Create ORGANIZER</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createOrganizer()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createOrganizer();
.. .
</p>
<h5>Delete ORGANIZER</h5>
<p>Remove ORGANIZER from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;ORGANIZER&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;ORGANIZER&quot; );
.. .
</p>
<h5>Get ORGANIZER</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;ORGANIZER&quot; )</p>
<p class="comment">output = organizer<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;ORGANIZER&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; organizer<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$organizer = $vevent-&gt;getProperty( &quot;ORGANIZER&quot; );
.. .
</p>
<h5>Set ORGANIZER</h5>
<p>Insert property value.
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738), &quot;mailto:&quot; prefixed if missing.
Also DIR parameter must be prefixed by protocol.
SENT-BY parameter must use protocol &quot;mailto:&quot;, prefixed if missing.
</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;organizer&quot;, organizer [, params] )</p>
<p class="comment">organizer<sup>1</sup> = (string) a <strong>calendar</strong> user address (cal-address), a URI as defined by
[RFC 1738] or any other IANA registered form for a URI.
params<sup>2</sup> = (array) ( [ &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; (applies to the CN parameter value) ]
[, &quot;CN&quot; =&gt; (string) &quot;common name to be associated with the
<strong>calendar</strong> user specified by the property&quot;]
[, &quot;DIR&quot; =&gt; (string) &quot;reference to a directory entry associated
with the <strong>calendar</strong> user specified by the property&quot; ]
[, &quot;SENT-BY&quot; =&gt; (string) (cal-address, above)
&quot;single <strong>calendar</strong> user that is acting on behalf
of the <strong>calendar</strong> user specified by the property&quot; ]
*[, xparams ]
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$dir = &quot;ldap://domain.com:6666/o=3DDC%20Comp,c=3DUS??(cn=3DJohn%20Doe)&quot;;
$vevent-&gt;setProperty( &quot;organizer&quot;
, &quot;ical@domain.com&quot;
, array( &quot;CN&quot; =&gt; &quot;John Doe&quot;
, &quot;DIR&quot; =&gt; $dir
, &quot;SENT-BY&quot; =&gt; &quot;secretary@domain.com&quot;
, &quot;X-Key1&quot; =&gt; &quot;X-Value1&quot;
, &quot;X-Key2&quot; =&gt; &quot;X-Value2&quot; ));
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="PERCENT-COMPLETE"></a><h3>3.2.27 PERCENT-COMPLETE</h3>
<p>
This property is used by an assignee or delegatee of a <a href="#VTODO">VTODO</a> to
convey the percent completion of a <a href="#VTODO">VTODO</a> to the Organizer and is
OPTIONAL and MUST NOT occur more than once.
</p>
<p>
The property value is a positive integer between zero and one hundred.
A value of "0" indicates the <a href="#VTODO">VTODO</a> has not yet been started.
A value of "100" indicates that the <a href="#VTODO">VTODO</a> has been completed.
Integer values in between indicate the percent partially complete.
</p>
<h5>Create PERCENT-COMPLETE</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createPercentComplete()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createPercentComplete();
.. .
</p>
<h5>Delete PERCENT-COMPLETE</h5>
<p>Remove PERCENT-COMPLETE from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;PERCENT-COMPLETE&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;PERCENT-COMPLETE&quot; )
.. .
</p>
<h5>Get PERCENT-COMPLETE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;PERCENT-COMPLETE&quot; )</p>
<p class="comment">output = percent<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; percent<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$percent = $vtodo-&gt;getProperty( &quot;PERCENT-COMPLETE&quot; );
.. .
</p>
<h5>Set PERCENT-COMPLETE</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;Percent-Complete&quot;, percent [, xparams ] )</p>
<p class="comment">percent<sup>1</sup> = (int) Value type INTEGER
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;setProperty( &quot;percent-complete&quot;, 90 );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="PRIORITY"></a><h3>3.2.28 PRIORITY</h3>
<p>
The property defines the relative priority for a <strong>calendar</strong> component and is OPTIONAL
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
</p>
<p>
The priority is specified as an integer in the range zero to nine.<br>
A value of zero (US-ASCII decimal 48) specifies an undefined priority.<br>
A value of one (US-ASCII decimal 49) is the highest priority.<br>
A value of two (US-ASCII decimal 50) is the second highest priority.<br>
Subsequent numbers specify a decreasing ordinal priority.<br>
A value of nine (US-ASCII decimal 58) is the lowest priority.
</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) PRIORITY values.</p>
<h5>Create PRIORITY</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createPriority()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createPriority();
.. .
</p>
<h5>Delete PRIORITY</h5>
<p>Remove PRIORITY from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;PRIORITY&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;PRIORITY&quot; );
.. .
</p>
<h5>Get PRIORITY</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot; )</p>
<p class="comment">output = priority<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; priority<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$priority = $vevent-&gt;getProperty( &quot;priority&quot; );
.. .
</p>
<h5>Set PRIORITY</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;priority&quot;, priority [, xparams ] )</p>
<p class="comment">priority<sup>1</sup> = (int) Value type INTEGER
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;priority&quot;, 3 );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="RDATE"></a><h3>3.2.29 RDATE</h3>
<p>
This property defines the list of date/times for a recurrence set and is OPTIONAL and MAY occur
more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>,
<a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
</p>
<p>
The default value type for RDATE is DATE-TIME, can be set to DATE or PERIOD (params<sup>2</sup>).
In <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components, RDATE MUST be specified as a date-time value type with local time value.
</p>
<h5>Create RDATE</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createRdate()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createRdate();
.. .
</p>
<h5>Delete RDATE</h5>
<p>Remove RDATE from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;RDATE&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) RDATE property.</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;RDATE&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete RDATE property no 2.</p>
<p class="example">&lt;?php
.. .
$vjournal-&gt;deleteProperty( &quot;RDATE&quot;, 2 );</p>
<p class="label">Example 3</p>
<p>Delete all RDATE properties.</p>
<p class="example">&lt;?php
.. .
while( $vjournal-&gt;deleteProperty( &quot;RDATE&quot; ))
continue;
.. .
</p>
<h5>Get RDATE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot; )</p>
<p class="comment">output = dates<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; dates<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo RDATE</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$rdates = $vevent-&gt;getProperty( &quot;RDATE&quot; );
.. .
</p>
<h5>Set RDATE</h5>
<p>Insert property value.</p>
<p>The value type for RDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
<p>
If DATE value type is set in params (&quot;VALUE&quot; = &quot;DATE&quot;), all timezone or offset in dates are ignored.<br>
If no &quot;VALUE&quot; value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
</p>
<p>
If &quot;TZID&quot; is set in params,
all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
If no &quot;TZID&quot; is set in params and timezone in 1st date, all remaining dates are within this timezone and param &quot;TZID&quot; is set.<br>
If none of the above rules are applicable, DATE-TIME and local date is set default.
</p>
<p>
Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
</p>
<p>RDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
<p>
In spite of the fact that RDATE may contain a (comma separated) list of values,
a strong recommendation is to split a RDATE &quot;list&quot; into multiple single RDATE entries.
</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;rdate&quot;, dates [, params [, propOrderNo ]] )</p>
<p class="comment">dates<sup>1</sup> = (array) ( date2 *[, date2 ] )
date2 = date / (array) ( startdate, enddate/duration )
startdate = date
enddate = date
date = (array) ( (int) year
, (int) month
, (int) day
[, (int) int hour
, (int) min
, (int) day
, 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; tz ]] )
// <span class="comment">output format</span>
date = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [, &quot;tz&quot; =&gt; tz ] )
// <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
date = (string) date/datetime string<sup>*</sup>
tz = &lt;timezone identifier&gt; / offset
// <span class="comment">timezone will be used as tzidparam, if tzidparam not set</span>
offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
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="comment">output format, only used keys</span>
duration = (array) ( &quot;sec&quot; =&gt; (int) sec );
duration = (string) duration like &quot;P15DT5H0M20S&quot;
params<sup>2</sup> = ([tzidparam ( / datetimeparam / dateparam / periodparam )] *[, xparams ] )
tzidparam = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
// <span class="comment">output as local DATE-TIME with timezone identifier</span>
// <span class="comment">if tzidparam=&quot;GMT&quot;/&quot;UTC&quot; then</span>
// <span class="comment">output date-time is suffixed by 'Z'</span>
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">default, output as DATE-TIME</span>
dateparam = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="comment">output as DATE</span>
periodparam = &quot;VALUE&quot; =&gt; &quot;PERIOD&quot; // <span class="comment">output as PERIOD (datetime)</span>
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
<br>date/datetime string<sup>*</sup> recommended formats
&quot;20110625&quot;, &quot;2011-06-25&quot;, &quot;2011/06/26&quot;
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example</p>
See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).<br>
<p class="example">&lt;?php
.. .
// $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 );
$rdate8 = array( &quot;year&quot; =&gt; 2007, &quot;month&quot; =&gt; 7, &quot;day&quot; =&gt; 7 );
$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="comment">// duration for 6 hours</span>
$rdur8 = array( &quot;week&quot; =&gt; 8 );
<span class="comment">// duration for 8 weeks</span>
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate1 ));
<span class="comment">// one recurrence date, date in 7-params format (DATE-TIME)</span>
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate1, $rdate2 ));
<span class="comment">// two dates, date 7-params format (DATE-TIME)</span>
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate1, $rdate2 )
, array( $rdate3, $rdate4 ))
, array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
<span class="comment">// Both fromdate and enddate must have 7 params (DATE-TIME) !!!</span>
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate2, $rdur6 ))
, array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
<span class="comment">// one duration (fromdate-duration)</span>
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate1, $date2 )
, array( $rdate3, $rdur7 ))
, array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
<span class="comment">// period, pairs of fromdate+enddate and fromdate-duration</span>
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate5, $date8 ))
, array( &quot;VALUE&quot; => &quot;DATE&quot; ));
<span class="comment">// dates in DATE format</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="RECURRENCE-ID"></a><h3>3.2.30 RECURRENCE-ID</h3>
<p>
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> <strong>calendar</strong> component and is OPTIONAL and MAY NOT occur more than once.
</p>
<p>
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<sup>2</sup>).
</p>
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
<p>
The calendar method <a href="#sort2">SORT</a> with argument <a href="#UID">UID</a> also use RECURRENCE-ID / <a href="#SEQUENCE">SEQUENCE</a> as
sort parameters.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="RELATED-TO"></a><h3>3.2.31 RELATED-TO</h3>
<p>
The property is used to represent a relationship or reference between one <strong>calendar</strong> component and another
and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p>
The property value consists of the persistent, globally unique identifier of another <strong>calendar</strong> component.
This value would be represented in a <strong>calendar</strong> component by the <a href="#UID">UID</a> property.
</p>
<p>
The value type for RELATED-TO is TEXT.
</p>
<h5>Create RELATED-TO</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createRelatedTo()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createRelatedTo();
.. .
</p>
<h5>Delete RELATED-TO</h5>
<p>Remove RELATED-TO from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;RELATED-TO&quot; )</p>
<p class="label">Example 1</p>
<p>Delete /single/first) RELATED-TO property</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;RELATED-TO&quot; )</p>
<p class="label">Example 2</p>
<p>Delete RELATED-TO property no 2.</p>
<p class="example">&lt;?php
.. .
$vjournal-&gt;deleteProperty( &quot;RELATED-TO&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all RELATED-TO properties.</p>
<p class="example">&lt;?php
.. .
while( $vjournal-&gt;deleteProperty( &quot;RELATED-TO&quot; ))
continue;
.. .
</p>
<h5>Get RELATED-TO</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot; )</p>
<p class="comment">output = relid<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot;, propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; relid<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo RELATED-TO</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$relatedId = $vtodo-&gt;getProperty( &quot;RELATED-TO&quot; );
.. .
</p>
<h5>Set RELATED-TO</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;Related-To&quot;, relid [, params [, propOrderNo ]] )</p>
<p class="comment">relid<sup>1</sup> = (string) Value type TEXT.
params<sup>2</sup> = (array) ( [ reltype ] *[, xparams] )
reltype = &quot;RELTYPE&quot; =&gt; (&quot;PARENT&quot; (Default)
/ &quot;CHILD&quot;
/ &quot;SIBLING&quot;
/ (string) iana-token
/ (string) x-name )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;setProperty( &quot;related-to&quot;, &quot;19960401-080045-4000F192713@host.com&quot;);
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="REPEAT"></a><h3>3.2.32 REPEAT</h3>
<p>
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.
</p>
<p>The value type for REPEAT is INTEGER.</p>
<h5>Create REPEAT</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createRepeat()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createRepeat();
.. .
</p>
<h5>Delete REPEAT</h5>
<p>Remove REPEAT from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;REPEAT&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;REPEAT&quot; );
.. .
</p>
<h5>Get REPEAT</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;REPEAT&quot; )</p>
<p class="comment">output = repeatTimes<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;REPEAT&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; repeatTimes<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$repeat = $vtodo-&gt;getProperty( &quot;REPEAT&quot; );
.. .
</p>
<h5>Set REPEAT</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;repeat&quot;, repeatTimes [, xparams ] )</p>
<p class="comment">repeatTimes<sup>1</sup> = (int) Value type INTEGER
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;repeat&quot;, 2 );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="REQUEST-STATUS"></a><h3>3.2.33 REQUEST-STATUS</h3>
<p>
This property defines the status code returned for a scheduling request and is OPTIONAL and
MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
</p>
<p>The value type for REQUEST-STATUS is TEXT and consists of</p>
<dl>
<dt>a short return status component,
<dd>(in output) a PERIOD character separated 3-tuple of integers, ex 3.11
<dt>a longer return status description component
<dt>optionally a statusspecific data component
</dl>
<h5>Create REQUEST-STATUS</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createRequestStatus()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createRequestStatus();
.. .
</p>
<h5>Delete REQUEST-STATUS</h5>
<p>Remove REQUEST-STATUS from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;REQUEST-STATUS&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) REQUEST-STATUS property.</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;REQUEST-STATUS&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete REQUEST-STATUS property no 2.</p>
<p class="example">&lt;?php
.. .
$vjournal-&gt;deleteProperty( &quot;REQUEST-STATUS&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all REQUEST-STATUS properties.</p>
<p class="example">&lt;?php
.. .
while( $vjournal-&gt;deleteProperty( &quot;REQUEST-STATUS&quot; ))
continue;
.. .
</p>
<h5>Get REQUEST-STATUS</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot; )</p>
<p class="comment">output = array( &quot;statcode&quot; =&gt; statcode<sup>1</sup>
, &quot;text&quot; =&gt; errtext<sup>2</sup>
[ , &quot;extdata&quot; =&gt; extraData<sup>3</sup> ] )</p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot;, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; array( &quot;statcode&quot; =&gt; statcode<sup>1</sup>
, &quot;text&quot; =&gt; errtext<sup>2</sup>
[ , &quot;extdata&quot; =&gt; extraData<sup>3</sup> ] )
, &quot;params&quot; =&gt; params<sup>4</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo REQUEST-STATUS</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$requestStatus = $vtodo-&gt;getProperty( &quot;REQUEST-STATUS&quot; );
.. .
</p>
<h5>Set REQUEST-STATUS</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;Request-Status&quot;
, statcode, errtext [,extraData/FALSE [,params [,propOrderNo]]])</p>
<p class="comment">statcode<sup>1</sup> = (int) Hierarchical, numeric return status code
(1*DIGIT &quot;.&quot; 1*DIGIT 1*DIGIT)
errtext<sup>2</sup> = (string) Textual status description
extraData<sup>3</sup> = (string) Textual exception data.
For example, the offending property name and value
or complete property line.
params<sup>4</sup> = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams ] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vfreebusy-&gt;setProperty(&quot;request-status&quot;
, 2.00
, &quot;Invalid property value&quot;
, &quot;DTSTART:96-Apr-31&quot;);
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="RESOURCES"></a><h3>3.2.34 RESOURCES</h3>
<p>
This property defines the equipment or resources anticipated for an activity specified by a <strong>calendar</strong> entity
and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
</p>
<p>The value type for RESOURCES is TEXT.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) RESOURCES values.</p>
<h5>Create RESOURCES</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createResources()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createResources();
.. .
</p>
<h5>Delete RESOURCES</h5>
<p>Remove RESOURCES from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;RESOURCES&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) RESOURCES property.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;RESOURCES&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete RESOURCES property no 2.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;RESOURCES&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Delete all RESOURCES properties.<p>
<p class="example">&lt;?php
.. .
while( $vevent-&gt;deleteProperty( &quot;RESOURCES&quot; ))
continue;
.. .
</p>
<h5>Get RESOURCES</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot; )</p>
<p class="comment">output = resources<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot;, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; resources<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo RESOURCES</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$resources = $vtodo-&gt;getProperty( &quot;RESOURCES&quot; );
.. .
</p>
<h5>Set RESOURCES</h5>
<p>Insert property value.</p>
<p>
In spite of the fact that RESOURCES may contain a (comma separated) list of values,
a strong recommendation is to split a RESOURCES &quot;list&quot; into multiple single RESOURCES entries.
</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;resources&quot;, resources [, params [, propOrderNo ]] )</p>
<p class="comment">resources<sup>1</sup> = (string) resource / (array) ( *resource )
resource = (string) textual resources or subtypes of the <strong>calendar</strong> component,
can be specified as a list of resources
separated by the COMMA character.
params<sup>2</sup> = (array) (
[ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
[, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
*[, xparams] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;resources&quot;, &quot;COMPUTER PROJECTOR&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="RRULE"></a><h3>3.2.35 RRULE</h3>
<p>
This property defines a rule or repeating pattern for recurring <a href="#VEVENT">EVENTs</a>, <a href="#VTODO">TODOs</a>,
<a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> definitions and is OPTIONAL and MAY occur more than once ([RFC2445]),
SHOULD NOT occur more than once ([RFC5545]).
</p>
<h5>Create RRULE</h5>
<p>If set, returns iCal formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createRrule()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createRrule();
.. .
</p>
<h5>Delete RRULE</h5>
<p>Remove RRULE from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;RRULE&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) RRULE property.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;RRULE&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete RRULE property no 2.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;RRULE&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Delete all RRULE properties.</p>
<p class="example">&lt;?php
.. .
while( $vevent-&gt;deleteProperty( &quot;RRULE&quot; ))
continue;
.. .
</p>
<h5>Get RRULE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot; )</p>
<p class="comment">output = recur<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot;, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; recur<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo RRULE</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$rrules = $vtodo-&gt;getProperty( &quot;RRULE&quot; );
.. .
</p>
<h5>Set RRULE</h5>
<p>Insert property value.</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;rrule&quot;, recur [, xparams [, propOrderNo ]] )</p>
<p>
For rules example see <a href="#EXRULE">Exrule</a> format and in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
</p>
<p class="comment">recur<sup>1</sup> = see <a href="#EXRULE">Exrule</a>
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="SEQUENCE"></a><h3>3.2.36 SEQUENCE</h3>
<p>
This property defines the revision sequence number of the <strong>calendar</strong> component within a sequence of revisions.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
<a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p class="quotes">
It is monotonically incremented by the <a href="#ORGANIZER">ORGANIZER's</a> CUA (Calendar
User Agent) each time the <a href="#ORGANIZER">ORGANIZER</a> makes a significant revision
to the <strong>calendar</strong> component.
<br><br>
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 <strong>calendar</strong> 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>.
</p>
<p>The value type of SEQUENCE is INTEGER.</p>
<p>The calendar method <a href="#sort2">SORT</a> with argument <a href="#UID">UID</a> also use <a href="#RECURRENCE-ID">RECURRENCE-ID</a> / SEQUENCE as
sort parameters.</p>
<h5>Create SEQUENCE</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createSequence()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createSequence();
.. .
</p>
<h5>Delete SEQUENCE</h5>
<p>Remove SEQUENCE from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;SEQUENCE&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;SEQUENCE&quot; );
.. .
</p>
<h5>Get SEQUENCE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;SEQUENCE&quot; )</p>
<p class="comment">output = sequence<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;SEQUENCE&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; sequence<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$sequence = $vtodo-&gt;getProperty( &quot;SEQUENCE&quot; );
.. .
</p>
<h5>Set SEQUENCE</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;sequence&quot; [, sequence [, xparams ]] )</p>
<p class="comment">sequence<sup>1</sup> = (int) Value type INTEGER
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;sequence&quot;, 2 ); <span class="comment">// set sequence number to 2</span>
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;sequence&quot; ); <span class="comment">// force sequence number to be set to 0
// or, if sequence exists, incremented by 1</span>
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="STATUS"></a><h3>3.2.37 STATUS</h3>
<p>
This property defines the overall status or confirmation for the <strong>calendar</strong> component.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
and <a href="#VJOURNAL">VJOURNAL</a> components.
</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) STATUS values.</p>
<h5>Create STATUS</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createStatus()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createStatus();
.. .
</p>
<h5>Delete STATUS</h5>
<p>Remove STATUS from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;STATUS&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;deleteProperty( &quot;STATUS&quot; );
.. .
</p>
<h5>Get STATUS</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;STATUS&quot; )</p>
<p class="comment">output = status<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;STATUS&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; status<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$status = $vtodo-&gt;getProperty( &quot;STATUS&quot; );
.. .
</p>
<h5>Set STATUS</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;status&quot;, status [, xparams ] )</p>
<p class="comment"> // <span class="comment">Status values for a <a href="#vevent">VEVENT</a></span>
status<sup>1</sup> = &quot;TENTATIVE&quot; // <span class="comment">Indicates event is tentative</span>
/ &quot;CONFIRMED&quot; // <span class="comment">Indicates event is definite</span>
/ &quot;CANCELLED&quot; // <span class="comment">Indicates event was cancelled</span>
// <span class="comment">Status values for <a href="#VTODO">VTODO</a></span>
status<sup>1</sup> = &quot;NEEDS-ACTION&quot; // <span class="comment">Indicates to-do needs action</span>
/ &quot;COMPLETED&quot; // <span class="comment">Indicates to-do completed</span>
/ &quot;IN-PROCESS&quot; // <span class="comment">Indicates to-do in process of</span>
/ &quot;CANCELLED&quot; // <span class="comment">Indicates to-do was cancelled</span>
// <span class="commsnt">Status values for <a href="#VJOURNAL">VJOURNAL</a></span>
status<sup>1</sup> = &quot;DRAFT&quot; // <span class="comment">Indicates journal is draft</span>
/ &quot;FINAL&quot; // <span class="comment">Indicates journal is final</span>
/ &quot;CANCELLED&quot; // <span class="comment">Indicates journal is removed</span>
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;Status&quot;, &quot;COMPLETED&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="SUMMARY"></a><h3>3.2.38 SUMMARY</h3>
<p>
This property defines a short (&quot;one line&quot;) summary or subject for the <strong>calendar</strong> component.
(In &quot;[RFC5545], Recommended Practices&quot;, up to 255 characters) (, analogous to a mail SUBJECT).
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
and <a href="#VJOURNAL">VJOURNAL</a> components. The property is REQUIRED and MUST occur once in
<a href="#VALARM">VALARM</a> (EMAIL) <strong>calendar</strong> component.
</p>
<p>The value type for SUMMARY is TEXT.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) SUMMARY values.</p>
<h5>Create SUMMARY</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createSummary()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createSummary();
.. .
</p>
<h5>Delete SUMMARY</h5>
<p>Remove SUMMARY from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;SUMMARY&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;SUMMARY&quot; );
.. .
</p>
<h5>Get SUMMARY</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;SUMMARY&quot; )</p>
<p class="comment">output = summary<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;SUMMARY&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; summary<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$summary = $vtodo-&gt;getProperty( &quot;SUMMARY&quot; );
.. .
</p>
<h5>Set SUMMARY</h5>
<p>Insert property value.</p>
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;summary&quot;, summary [, params ] )</p>
<p CLASS="comment">summary<sup>1</sup> = (string) Value type TEXT,
a short, one line summary about the activity or journal entry.
params<sup>2</sup> = array( [&quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
[, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
*[, xparams ] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;This is a summary&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="TRANSP"></a><h3>3.2.39 TRANSP</h3>
<p>
This property defines whether an <a href="#VEVENT">EVENT</a> is transparent or not to busy time searches and is OPTIONAL and MUST NOT occur more than once.
</p>
<h5>Create TRANSP</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createTransp()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createTransp();
.. .
</p>
<h5>Delete TRANSP</h5>
<p>Remove TRANSP from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;TRANSP&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;TRANSP&quot; );
.. .
</p>
<h5>Get TRANSP</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;TRANSP&quot; )</p>
<p class="comment">output = transp<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;TRANSP&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; transp<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$transp = $vtodo-&gt;getProperty( &quot;TRANSP&quot; );
.. .
</p>
<h5>Set TRANSP</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;transp&quot;, transp [, xparams ] )</p>
<p class="comment">transp<sup>1</sup> = &quot;OPAQUE&quot; / &quot;TRANSPARENT&quot;
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty( &quot;transp&quot;, &quot;TRANSPARENT&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="TRIGGER"></a><h3>3.2.40 TRIGGER</h3>
<p>
This property specifies when an <a href="#VALARM">ALARM</a> will trigger and is REQUIRED and MUST NOT occur more than once.
</p>
<p>
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> DATE-TIME value.
</p>
<h5>Create TRIGGER</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">valarm::createTrigger()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createTrigger();
.. .
</p>
<h5>Delete TRIGGER</h5>
<p>Remove TRIGGER from component.</p>
<p class="label">Format</p>
<p class="format">valarm::deleteProperty( &quot;TRIGGER&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;deleteProperty( &quot;TRIGGER&quot; );
.. .
</p>
<h5>Get TRIGGER</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">valarm::getProperty( &quot;TRIGGER&quot; )</p>
<p class="comment">output = duration/date</p>
<p class="label">Format 2</p>
<p class="format">valarm::getProperty( &quot;TRIGGER&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; duration<sup>1</sup>/date<sup>3</sup> )
, &quot;params&quot; =&gt; params<sup>4</sup> )
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$trigger = $vtodo-&gt;getProperty( &quot;TRIGGER&quot; );
.. .
</p>
<h5>Set TRIGGER</h5>
<p>Insert property value.</p>
<p>Note, use function <a href="#transformDateTime">transformDateTime</a> to change a (local) datetime to UTC time zone.</p>
<p class="label">Format 1</p>
<p class="format">valarm::setProperty( &quot;trigger&quot;, duration<sup>1</sup> [, params<sup>4</sup> ] )</p>
<p class="label">Format 2</p>
<p class="format">valarm::setProperty( &quot;trigger&quot;, duration<sup>2</sup> [, params<sup>4</sup> ] )</p>
<p class="label">Format 3</p>
<p class="format">valqarm::setProperty( &quot;trigger&quot;, date<sup>3</sup> [, params<sup>4</sup> ] )</p>
<p class="label">Format</p>
<p class="format">valarm::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
[, relatedStart
[, before
[, params<sup>4</sup> ]]]]] )</p>
<p class="comment">duration<sup>1</sup> = (array) ( &quot;week&quot; =&gt; (int) week
, &quot;relatedStart&quot; =&gt; relatedStart
, &quot;before&quot; =&gt; before )
duration<sup>1</sup> = (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; relatedStart
, &quot;before&quot; =&gt; before )
relatedStart = (bool) TRUE : related start (default),
FALSE : related end
before = (booL) TRUE : before relatedStart (default),
FALSE : after relatedStart
duration<sup>2</sup> = (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<sup>3</sup> = (array) ( &quot;year&quot; =&gt; (int) year // <span class="comment"><a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
, &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 ])
date<sup>3</sup> = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment"><a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
date<sup>3</sup> = (string) datetime string<sup>*</sup>
params<sup>4</sup> = (array) ( [[ reltype [, trigRelparam ]] / datetimeparam ] *[, xparams ] )
reltyp = &quot;RELATED&quot; =&gt; &quot;START&quot; (default) / &quot;END&quot;
trigRelparam = &quot;VALUE&quot; =&gt; &quot;DURATION&quot;
datetimeparam= &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">mandatory if DATE-TIME</span>
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
<br>datetime string<sup>*</sup> recommended formats
&quot;20110625&quot;, &quot;2011-06-25&quot;, &quot;2011/06/26&quot;
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p>A duration, 1 hour 2 min 3 sec, before start</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;trigger&quot;
, FALSE, FALSE, FALSE, FALSE, 1, 2, 3 );
.. .
</p>
<p class="label">Example 2</p>
<p>A duration, 1 hour 2 min 3 sec, before start</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;trigger&quot;
, array (&quot;hour&quot;=&gt;1,&quot;min&quot;=&gt;2,&quot;sec&quot;=&gt;3 );
.. .
</p>
<p class="label">Example 3</p>
<p>A duration, 1 hour 2 min 3 sec, before start</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;trigger&quot;
, &quot;PT1H2M3S&quot; );
.. .
</p>
<p class="label">Example 4</p>
<p>A duration, 1 week after end.</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;trigger&quot;
, FALSE, FALSE, FALSE, 1
, FALSE, FALSE, FALSE, FALSE, FALSE );
.. .
</p>
<p class="label">Example 5</p>
<p>A duration, 1 week after end.</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;trigger&quot;
, array ( &quot;week&quot; =&gt; 1
, &quot;relatedStart&quot; =&gt; FALSE
, &quot;before&quot; =&gt; FALSE ));
.. .
</p>
<p class="label">Example 6</p>
<p>A duration, 1 week after end.</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;setProperty( &quot;trigger&quot;
, &quot;P1W&quot;
, array( &quot;related&quot; =&gt; &quot;END&quot; ));
.. .
</p>
<p class="label">Example 7</p>
<p class="example">&lt;?php
.. .
$valarm-&gt;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 )
, array( &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; ));
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="TZID"></a><h3>3.2.41 TZID</h3>
<p>
This property specifies the text value that uniquely identifies the <a href="#VTIMEZONE">VTIMEZONE</a>
<strong>calendar</strong> component and is REQUIRED, but MUST NOT occur more than once.
</p>
<p>The value type for TZID is TEXT.</p>
<h5>Create TZID</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vtimezone::createTzid()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createTzid();
.. .
</p>
<h5>Delete TZID</h5>
<p>Remove TZID from component.</p>
<p class="label">Format</p>
<p class="format">vtimezone::deleteProperty( &quot;TZID&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtimezone-&gt;deleteProperty( &quot;TZID&quot; );
.. .
</p>
<h5>Get TZID</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">vtimezone::getProperty( &quot;TZID&quot; )</p>
<p class="comment">output = tzid<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">vtimezone::getProperty( &quot;TZID&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; tzid<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$tzid = $vtimezone-&gt;getProperty( &quot;TZID&quot; );
.. .
</p>
<h5>Set TZID</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vtimezone::setProperty( &quot;tzid&quot;, tzid [, xparams ] )</p>
<p class="comment">tzid<sup>1</sup> = (string) Value type TEXT
xparams<sup>2</sup> = (array)( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty( &quot;tzid&quot;, &quot;US-Eastern&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="TZNAME"></a><h3>3.2.42 TZNAME</h3>
<p>
This property specifies the customary designation for a <a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> description
and is OPTIONAL and MAY occur more than once.
</p>
<p>The value type for TZNAME is TEXT.</p>
<h5>Create TZNAME</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vtimezone::createTzname()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createTzname();
.. .
</p>
<h5>Delete TZNAME</h5>
<p>Remove TZNAME from component.</p>
<p class="label">Format</p>
<p class="format">vtimezone::deleteProperty( &quot;TZNAME&quot; )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) TZNAME property.</p>
<p class="example">&lt;?php
.. .
$vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete TZNAME property no 2.</p>
<p class="example">&lt;?php
.. .
$vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot;, 2 );
.. .
</p>
<p class="label">Example 3</p>
<p>Deleting all TZNAME properties.</p>
<p class="example">&lt;?php
.. .
while( $vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot; ))
continue;
.. .
</p>
<h5>Get TZNAME</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot; )</p>
<p class="comment">output = tzname<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot;, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( &quot;value&quot; =&gt; tzname<sup>1</sup>
, &quot;params&quot; =&gt; params<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot;, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo TZNAME</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$tzname = $timezonestandard-&gt;getProperty( &quot;TZNAME&quot; );
.. .
</p>
<h5>Set TZNAME</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vtimezone::setProperty( &quot;tzname&quot;, tzname [, params [, propOrderNo ]] )</p>
<p class="comment">tzname<sup>1</sup> = (string) Value type TEXT
params<sup>2</sup> = (array) ( [ &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; ]*[, xparams ] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
$standard-&gt;setProperty( &quot;tzname&quot;, &quot;EST&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="TZOFFSETFROM"></a><h3>3.2.43 TZOFFSETFROM</h3>
<p>
This property specifies the offset which is in use prior to this <a href="#VTIMEZONE">TIMEZONE</a> observance.
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
</p>
<p>The value type is UTC-OFFSET, &quot;+&quot; / &quot;-&quot; time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
<h5>Create TZOFFSETFROM</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vtimezone::createTzoffsetfrom()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createTzoffsetfrom();
.. .
</p>
<h5>Delete TZOFFSETFROM</h5>
<p>Remove TZOFFSETFROM from component.</p>
<p class="label">Format</p>
<p class="format">vtimezone::deleteProperty( &quot;TZOFFSETFROM&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtimezonestd-&gt;deleteProperty( &quot;TZOFFSETFROM&quot; );
.. .
</p>
<h5>Get TZOFFSETFROM</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">vtimezone::getProperty( &quot;TZOFFSETFROM&quot; )</p>
<p class="comment">output = tzoffsetfrom<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">vtimezone::getProperty( &quot;TZOFFSETFROM&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; tzoffsetfrom<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$tzoffsetfrom = $timezonestandard-&gt;getProperty( &quot;TZOFFSETFROM&quot; );
.. .
</p>
<h5>Set TZOFFSETFROM</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vtimezone::setProperty( &quot;tzoffsetfrom&quot;, tzoffsetfrom [, xparams ] )</p>
<p class="comment">tzoffsetfrom<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
xparams<sup>2</sup> = (array) ( *[ /string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
$standard-&gt;setProperty( &quot;tzname&quot;, &quot;EST&quot; );
$standard-&gt;setProperty( &quot;tzoffsetfrom&quot;, &quot;-0500&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="TZOFFSETTO"></a><h3>3.2.44 TZOFFSETTO</h3>
<p>
This property specifies the offset which is in use in this <a href="#VTIMEZONE">TIMEZONE</a> observance.
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
</p>
<p>The value type is UTC-OFFSET, &quot;+&quot; / &quot;-&quot; time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
<h5>Create TZOFFSETTO</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vtimezone::createTzoffsetto()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createTzoffsetto();
.. .
</p>
<h5>Delete TZOFFSETTO</h5>
<p>Remove TZOFFSETTO from component.</p>
<p class="label">Format</p>
<p class="format">vtimezone::deleteProperty( &quot;TZOFFSETTO&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$daylight-&gt;deleteProperty( &quot;TZOFFSETTO&quot; );
.. .
</p>
<h5>Get TZOFFSETTO</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">vtimezone::getProperty( &quot;TZOFFSETTO&quot; )</p>
<p class="comment">output = tzoffsetto<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">vtimezone::getProperty( &quot;TZOFFSETTO&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; tzoffsetto<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$tzoffsetto = $timezonestandard-&gt;getProperty( &quot;TZOFFSETTO&quot; );
.. .
</p>
<h5>Set TZOFFSETTO</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vtimezone::setProperty( &quot;tzoffsetto&quot;, tzoffsetto [, xparams ] )</p>
<p class="comment">tzoffsetto<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
.. .
$daylight = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
$daylight-&gt;setProperty( &quot;tzoffsetto&quot;, &quot;1345&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="TZURL"></a><h3>3.2.45 TZURL</h3>
<p>
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. The property
is OPTIONAL and MUST NOT occur more than once.
</p>
<p> The value type is URI.</p>
<h5>Create TZURL</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">vtimezone::createTzurl()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createTzurl();
.. .
</p>
<h5>Delete TZURL</h5>
<p>Remove TZURL from component.</p>
<p class="label">Format</p>
<p class="format">vtimezone::deleteProperty( &quot;TZURL&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtimezone-&gt;deleteProperty( &quot;TZURL&quot; );
.. .
</p>
<h5>Get TZURL</h5>
<p>If set, returns property value, otherwise FALSE.</p>.
<p class="label">Format 1</p>
<p class="format">vtimezone::getProperty( &quot;TZURL&quot; )</p>
<p class="comment">output = tzurl<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">vtimezone::getProperty( &quot;TZURL&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; tzurl<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$tzurl = $timezonestandard-&gt;getProperty( &quot;TZURL&quot; );
.. .
</p>
<h5>Set TZURL</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">vtimezone::setProperty( &quot;tzurl&quot;, tzurl [, xparams ] )</p>
<p class="comment">tzurl<sup>1</sup> = (string) Value type URI
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$tz = &quot;http://zones.stds_r_us.net/tz/US-Eastern&quot; );
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101T000000&quot; );
$vtimezone-&gt;setProperty( &quot;tzurl&quot;, $tz );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="UID"></a><h3>3.2.46 UID</h3>
<p>
The persistent, globally <b>U</b>nique <b>ID</b>entifier for the <strong>calendar</strong> component.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
<a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.<br>
However, UID is <b>AUTOMATICALLY</b> generated in iCalcreator and configuration <a href="#Unique_id">unique_id</a>
is used when auto-creating component UID.
</p>
<p>UID generated format :</p>
<p class="format">date(&quot;Ymd\THisT&quot;).&quot;-&quot;.[microSec][random].&quot;@&quot;.<a href="#Unique_id">unique_id</a></p>
<p>
microSec = microseconds, 4 pos<br>
random = 6 characters aA-zZ, 0-9
</p>
<p class="label">Example</p>
<p class="example">&quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;</p>
<p>
UID may be required when importing iCal files into some <strong>calendar</strong> software (MS etc.),
as well as (<strong>calendar</strong>) properties <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE",
<a href="#METHOD">METHOD</a> (value PUBLISH etc.) and the (also automatically created) <a href="#DTSTAMP">DTSTAMP</a> property.
</p>
<p>The value type for UID is TEXT.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) UID values.</p>
<h5>Create UID</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createUid()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createUid();
.. .
</p>
<h5>Delete UID</h5>
<p>
If UID is remove from a component, UID will automatically be recreated when iCalcreator object output methods
like <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a>
or <a href="#saveCalendar">saveCalendar</a> is executed.
</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;UID&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;UID&quot; );
.. .
</p>
<h5>Get UID</h5>
<p>If set, returns property, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;UID&quot; )</p>
<p class="comment">output = uid<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;UID&quot;, FALSE , TRUE )</p>
<p class="comment">output = array( &quot;value&quot; =&gt; uid<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$uid = $vevent-&gt;getProperty( &quot;UID&quot; );
.. .
</p>
<h5>Set UID</h5>
<p>Insert property value, overrides any previously set or auto-created UID.</p>
<p>
Do <b>NOT</b> use an integer UID or only a component name in UID (ex. &quot;vevent&quot;),
this may cause malfunction in iCalcreator object method <a href="#setComponent">setComponent</a> with index or UID argument.
</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;uid&quot;, uid [, xparams ] )</p>
<p class="comment">uid<sup>1</sup> = (string) Value type TEXT
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setProperty(&quot;uid&quot;,&quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;);
.. .
</p>
<p>
BUT, due to poorly created iCal media files, a digit UID is accepted in the setProperty( UID ) and <a href="#parse_merge">parse()</a> methods.
Do check for component digit UIDs and remove it (will force a (auto) UID recreation) or (re-)set it manually.
</p>
<p class="example">&lt;?php
.. .
if( ctype_digit( $vevent-&gt;getProperty( &quot;UID&quot; )))
$vevent-&gt;deleteProperty( &quot;UID&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="URL"></a><h3>3.2.47 URL</h3>
<p>
This property defines a Uniform Resource Locator (URL) associated with the <strong>iCalendar</strong> object.
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
<a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
</p>
<p> The value type is URI.</p>
<p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) URL values.</p>
<h5>Create URL</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createUrl()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createUrl();
.. .
</p>
<h5>Delete URL</h5>
<p>Remove URL from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;URL&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;URL&quot; );
.. .
</p>
<h5>Get URL</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;URL&quot; )</p>
<p class="comment">output = url<sup>1</sup></p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty( &quot;URL&quot;, FALSE , TRUE )</p>
<p class="comment">output = array &quot;value&quot; =&gt; url<sup>1</sup>
, &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$url = $vevent-&gt;getProperty( &quot;URL&quot; );
.. .
</p>
<h5>Set URL</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( &quot;url&quot;, url [, xparams ] )</p>
<p class="comment">url<sup>1</sup> = (string) Value type URI
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vtodo-&gt;setProperty( &quot;url&quot;, &quot;http://www.icaldomain.net&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a name="X-PROPERTY_PROP"></a><h3>3.2.48 X-PROPERTY</h3>
<p>
A component, non-standard property with a TEXT value and a name with an &quot;X-&quot; prefix. In a component,
an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
</p>
<p>The value type is TEXT.</p>
<h5>Create X-PROPERTY</h5>
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::createXprop()</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$str = $component-&gt;createxProp();
.. .
</p>
<h5>Delete X-PROPERTY</h5>
<p>Remove X-PROPERTY from component.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::deleteProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
<p class="label">Example 1</p>
<p>Deleting x-property named &quot;X-PROPERTY&quot;.</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;deleteProperty( &quot;X-PROPERTY&quot; );
.. .
</p>
<p class="label">Example 2</p>
<p>Deleting all x-properties.</p>
<p class="example">&lt;?php
.. .
while( $vevent-&gt;deleteProperty())
continue;
.. .
</p>
<h5>Get X-property</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">calendarComponent::getProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
<p class="comment">output = array( propertyName<sup>1</sup>
, propertyData<sup>2</sup> )</p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getProperty()</p>
<p class="comment">output = array( propertyName<sup>1</sup>
, propertyData<sup>2</sup> )</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( propertyName<sup>1</sup>
, array ( &quot;value&quot; =&gt; propertyData<sup>2</sup> )
, &quot;params&quot; =&gt; params<sup>3</sup>))</p>
<p class="label">Format 4</p>
<p class="format">calendarComponent::getProperty( FALSE, propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">Get propOrderNo X-property</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot;, &quot;file.ics&quot; ); );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
if( FALSE !== ( $d = $vcalendar-&gt;getProperty( &quot;X-WR-TIMEZONE&quot; )))
echo $d[1]; <span class="comment">// $d = array( &quot;X-WR-TIMEZONE&quot;, propertyData<sup>2</sup> )</span>
.. .
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot;, &quot;file.ics&quot; ); );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( )) {<span class="comment">// $xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
.. .
</p>
<p class="label">Example 3</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot;, &quot;file.ics&quot; ); );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( &quot;X-ABC-MMSUBJ&quot; )) {
.. . <span class="comment">// $xprop = array( &quot;X-ABC-MMSUBJ&quot;, propertyData<sup>2</sup> )</span>
.. .
</p>
<p class="label">Example 4</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot;, &quot;file.ics&quot; ); );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
while( $xprop = $vcalendar-&gt;getProperty( FALSE, FALSE, TRUE )) {
/*<span class="comment"> $xprop = array( propertyName<sup>1</sup>
, array( &quot;value&quot; =&gt; propertyData<sup>2</sup> )
, &quot;params&quot; =&gt; params<sup>3</sup> )</span>
*/
.. .
</p>
<h5>Set X-property</h5>
<p>Insert property name and value. If an x-prop with the same name already exists, it will be replaced.</p>
<p class="label">Format</p>
<p class="format">calendarComponent::setProperty( propertyName, propertyData [, params ] )</p>
<p class="comment">propertyName<sup>1</sup> = (string) Any property name with a &quot;X-&quot; prefix
propertyData<sup>2</sup> = (string) Value type TEXT
params<sup>3</sup> = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams] )
xparams = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
lang<sup>*</sup> = as defined in [RFC5646]</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$component-&gt;setProperty(&quot;X-ABC-MMSUBJ&quot;,&quot;http://load.noise.org/mysubj.wav&quot;);
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a NAME="iCalcreator_component_configuration_methods"></a><h2>3.3 iCalcreator Component configuration methods</h2>
<a name="Language_PROP"></a><h3>3.3.1 Language</h3>
Language for specific <strong>calendar</strong> component as defined in [RFC5646].<br>
Language set at component level can be overridden by specific component property parameter.<br>
A successful &quot;setConfig&quot; returns TRUE.
<h5>Get language</h5>
Language for <strong>calendar</strong> (only if language is set at component level).
<p class="label">Format</p>
<p class="format">calendarComponent::getConfig( &quot;language&quot; )</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$lang = $vevent-&gt;getConfig( &quot;language&quot; );
.. .
</p>
<h5>Set LANGUAGE</h5>
<p class="label">Format</p>
<p class="format">calendarComponent::setConfig( &quot;language&quot;, lang )</p>
<p class="comment">lang = (string) language</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$vevent-&gt;setConfig( &quot;language&quot;, &quot;en&quot; );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
<a name="iCalcreator_component_object_misc_methods"></a><h2>3.4 iCalcreator component object misc. methods</h2>
<p>Calendar component subcomponent functions.</p>
<a name="deleteComponent_PROP"></a><h4>3.4.1 deleteComponent</h4>
Remove subcomponent from component.
<p class="label">Format</p>
<p class="format">calendarComponent::deleteComponent( orderNumber )</p>
<p class="comment">orderNumber = (int) component order Number</p>
<p class="comment">Remove component with order number (1st=1, 2nd=2.. .).</p>
<p class="format">calendarComponent::deleteComponent( componentType [, componentSuborderNumber])</p>
<p class="comment">componentType = (string) component type
componentSuborderNumber = (int) component suborder number</p>
<p class="comment">Remove component with component type (ex. &quot;vevent&quot;)
and order 1 alt. suborder number.</p>
<p class="format">calendarComponent::deleteComponent( <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">timezone</a> components.</p>
<p class="label">Example 1</p>
<p>Delete first subcomponent.</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$comp1 = $vcalendar-&gt;getComponent();
$comp1-&gt;deleteComponent( 1 );
.. .
</p>
<p class="label">Example 2</p>
<p>Delete all subcomponents.</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$comp1 = $vcalendar-&gt;getComponent();
while( $comp1-&gt;deleteComponent( &quot;valarm&quot; )
continue;
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
<a name="getComponent_PROP"></a><h4>3.4.2 getComponent</h4>
Get subComponent from component.
<p class="label">Format 1</p>
<p class="format">calendarComponent::getComponent()</p>
<p class="comment">Get next component until end-of-components.</p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::getComponent( int orderNumber )</p>
<p class="comment">orderNumber = (int) component order number</p>
<p class="comment">Get component with order number (1st=1, 2nd=2.. .).</p>
<p class="label">Format 3</p>
<p class="format">calendarComponent::getComponent( string componentType [, int componentSuborderNumber])</p>
<p class="comment">componentType = (string) component type
componentSuborderNumber = (int) component suborder number</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="label">Format 4</p>
<p class="format">calendarComponent::getComponent( <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">timezone</a> components.</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
&quot;filename&quot; =&gt; &quot;file.ics&quot; );
$vcalendar = new vcalendar( $config );
$vcalendar-&gt;parse();
$comp1 = $vcalendar-&gt;getComponent());
while( $subComp = $comp1-&gt;getComponent()) {
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
<a name="newComponent_PROP"></a><h4>3.4.3 newComponent</h4>
Create subcomponent (<a href="#VALARM">ALARN</a> / <a href="#VTIMEZONE">VTIMEZONE STANDARD</a> / <a href="#VTIMEZONE">VTIMEZONE DAYLIGHT</a>)
using a component factory-method, returning a reference to the new component.
<p class="label">Format</p>
<p class="format">calendarComponent::newComponent( componentType )</p>
<p class="comment">componentType = (string) component type</p>
<p class="label">Example 1</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config );
...
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
// <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
$vevent-&gt;setProperty( &quot;dtstart&quot;, 2006, 12, 24, 19, 30, 00 );
$vevent-&gt;setProperty(.. .
...
$valarm = &amp; $vevent-&gt;newComponent( &quot;valarm&quot; );
$valarm-&gt;setProperty( &quot;trigger&quot;, .. .
...
</p>
<p class="label">Example 2</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
$vcalendar = new vcalendar( $config );
...
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
$vtimezone-&gt;setProperty(.. .
...
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
$standard-&gt;setProperty(.. .
...
$daylight = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
$daylight-&gt;setProperty(.. .
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
<a name="setComponent_PROP"></a><h4>3.4.4 setComponent</h4>
Add <strong>calendar</strong> component to the iCalcreator object instance or replace/update component in the iCalcreator object instance.
<p class="label">Format 1</p>
<p class="format">calendarComponent::setComponent( component )
addSubComponent( component ) // <span class="comment">alias</span></p>
<p class="comment">Insert last in component chain.</p>
<p class="label">Format 2</p>
<p class="format">calendarComponent::setComponent( component, int orderNumber )</p>
<p class="comment">orderNumber = (int) component order number</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="label">Format 3</p>
<p class="format">calendarComponent::setComponent( component, componentType [,componentSuborderNumber])</p>
<p class="comment">componentType = (string) component type
componentSuborderNumber = (int) 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="label">Example</p>
<p class="example">&lt;?php
.. .
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
.. .
$vevent = new vevent();
// <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
$vevent-&gt;setProperty( &quot;dtstart&quot;, 2006, 12, 24, 19, 30, 00 );
$vevent-&gt;setProperty(.. .
.. .
$valarm = new valarm();
$valarm-&gt;setProperty( &quot;trigger&quot;, .. .
.. .
$vevent-&gt;setComponent( $valarm );
$vcalendar-&gt;setComponent( $vevent );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
<a name="iCalUtilityFunctions"></a><h1>4 iCalUtilityFunctions</h1>
<p>
iCalUtilityFunctions class contains static functions used by iCalcreator,
also usable outside the iCalcreator class.
</p>
<dl>
<dt>&quot;External&quot; functions
<dd><a href="#convEolChar">4.1 convEolChar</a>
<dd><a href="#createTimezone">4.2 createTimezone</a>
<dd><a href="#ms2phpTZ">4.3 ms2phpTZ</a>
<dd><a href="#transformDateTime">4.4 transformDateTime</a>
<dt>&quot;Internal&quot; functions
<dd><a href="#mddtuf">4.5 Misc. date/duration/timestamp util. functions</a>
</dl>
<a name="convEolChar"></a><h4>4.1 convEolChar</h4>
<p>Removes any line-endings that may include spaces or tabs (\t)
and convert all line endings (iCal default &quot;\r\n&quot;),
takes care of &quot;\r\n&quot;, &quot;\r&quot; and &quot;\n&quot; and mixed &quot;\r\n&quot;+&quot;\r&quot;, &quot;\r\n&quot;+&quot;\n&quot;.
</p>
<p>Returns string with controlled and corrected line endings.</p>
<p class="label">Format</p>
<p class="format">iCalUtilityFunctions::convEolChar( str, nl )</p>
<p class="comment">str = (string) string to adjust
nl = line ending to convert to
</p>
<br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
<a name="createTimezone"></a><h4>4.2 createTimezone</h4>
<p>
The function, applied on a iCalcrator object instance and using a <em>PHP</em> valid timezone (as argument)
creates <a href="#VTIMEZONE">vtimezone</a>, <a href="#STANDARD">standard</a> and <a href="#DAYLIGHT">daylight</a> components,
based on <em>PHP</em> DateTimeZone class and the time zone transition dates.
(<em>PHP</em> 5 >= 5.2.0)
</p>
<p>
Recommendation is to call the function <b>after</b> editing components (and without (period) from/to arguments, below),
it will automatically create timezone components, starting seven month before lowest <a href="#DTSTART">DTSTART</a>
value and end 18 month after the higest.
</p>
<p>
If no time zone transition exists within date arguments or within the &quot;<a href="#DTSTART">DTSTART</a>&quot;s span,
then the time zone transition with the highest transistion date before &quot;from&quot; date is used as base.
If still missing, timezone components are created, using current date.
</p>
<p>
Note, only when timezone NOT is UTC.
For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
</p>
<p>
FALSE is returned if not using a <em>PHP</em> valid timezone.
</p>
<p class="label">Format</p>
<p class="format">iCalUtilityFunctions::createTimezone( calendar, timezone [, xprops, [, from [, to ]]] )</p>
<p class="comment">calendar = (object) iCalcreator instance
timezone = (string) an <em>PHP</em> (DateTimeZone) valid timezone
xprops = (array) ( *[ x-propName =&gt; value ] ), timezone non-standard properties
from = (int) timestamp, period start date<sup>*</sup>
to = (int) timestamp, period end date<sup>*</sup>
<sup>*</sup> if empty &quot;from&quot; and &quot;to&quot; arguments, the calendar <a href="#getProperty2">getProperty</a> method (with &quot;<a href="#DTSTART">DTSTART</a>&quot; as argument)
is used to get the lowest (modified, minus 7 month) and highest (modified, plus 15 month) dates.
</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$tz = &quot;Europe/Stockholm&quot;;
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; $tz );
$c = new vcalendar( $config );
$c-&gt;setProperty( "X-WR-TIMEZONE", $tz );
.. .
.. . // <span class="comment">insert components or parse an iCal file</span>
.. .
$xprops = array( &quot;X-LIC-LOCATION&quot; => $tz );
iCalUtilityFunctions::createTimezone( $c, $tz, $xprops );
.. .
</p>
<p>
Output example (when using iCalcreator object createCalendar or returnCalendar methods):
</p>
<p class="example">BEGIN:VTIMEZONE
TZID:Europe/Stockholm
X-LIC-LOCATION:Europe/Stockholm
BEGIN:STANDARD
DTSTART:20111030T003000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20110327T002000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
END:DAYLIGHT
END:VTIMEZONE
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
<a name="ms2phpTZ"></a><h4>4.3 ms2phpTZ</h4>
<p>
Conversion (very simple) of a MS timezone to a <em>PHP</em>5 valid (Date-)timezone,<br>
matching (MS) UTC offset and time zone descriptors, based on <em>PHP</em> DateTimeZone class.
(<em>PHP</em> 5 >= 5.2.0)
</p>
<p>If TRUE is returned, the MS timezone argument (below) is converted to a <em>PHP</em>5 time zone, otherwise unaltered.</p>
<p class="label">Format</p>
<p class="format">iCalUtilityFunctions::ms2phpTZ( timezone )</p>
<p class="comment">timezone = (string) MS timezone (input), PHP5 timezone (output)</p>
<p class="label">Example</p>
<p class="example">&lt;?php
.. .
$search = '"(UTC-06:00) Central Time (US & Canada)"';
echo "MS tz:'$search'&lt;br&gt;\n";
if( FALSE !== iCalUtilityFunctions::ms2phpTZ( $search ))
echo "PHP tz:'$search'&lt;br&gt;\n";
.. .
</p>
<br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
<a name="transformDateTime"></a><h4>4.4 transformDateTime</h4>
<p>
Transforms a datetime from a time zone to another. (Requires <em>PHP</em> >= 5.2.0 and <em>PHP</em> DateTimeZone acceptable time zones).
</p>
<p>
FALSE is returned if not using a &quot;strtotime&quot; acceptable datetime string or unacceptable <em>PHP</em> time zones.
If TRUE, the dateTime argument (below) is converted to the new time zone, otherwise unaltered.
</p>
<p>
A DATE input (&lt;year&gt;&lt;month&gt;&lt;day&gt;) will be expanded to a DATETIME (&lt;year&gt;&lt;month&gt;&lt;day&gt;000000) before transform.
</p>
<p class="label">Format</p>
<p class="format">iCalUtilityFunctions::transformDateTime( dateTime, timezoneFrom [, timezoneTo [, format ]] )</p>
<p class="comment">
dateTime = (array) ( &quot;year&quot; =&gt; (int) year // <span class="comment">input</span>
, &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 ] )
dateTime = (array) ( (int) year // <span class="comment">input</span>
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec ] )
dateTime = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">input</span>
dateTime = (string) datetime string<sup>*</sup> // <span class="comment">input</span>
dateTime = (string) datetime string // <span class="comment">on successful output</span>
timezoneFrom = (string) a <em>PHP</em> (DateTimeZone) valid time zone
timezoneTo = (string) a <em>PHP</em> (DateTimeZone) valid time zone, default &quot;UTC&quot;
format = (string) output format (any date formatting, default &quot;Ymd\THis&quot;)
<br>datetime string<sup>*</sup> recommended formats
&quot;20110625&quot;, &quot;2011-06-25&quot;, &quot;2011/06/26&quot;
&quot;20110625051015&quot;, &quot;20110625 051015&quot;
&quot;20110625T051015&quot;, &quot;20110625t051015&quot;
&quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
&quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
<span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example</p>
<p>Convert from time zone &quot;Europe/Stockholm&quot; to &quot;UTC&quot;</p>
<p class="example">&lt;?php
.. .
$d = date( &quot;Y-m-d H:i:s&quot; );
$tzFr = &quot;Europe/Stockholm&quot;;
if( FALSE !== iCalUtilityFunctions::transformDateTime( $d, $tzFr ))
$event-&gt;setProperty( &quot;dtstart&quot;, $d.&quot;Z&quot; );
else
$event-&gt;setProperty( &quot;dtstart&quot;, $d, array( &quot;TZID&quot; => $tzFr ));
.. .
</p>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
<a name="mddtuf"></a><h4>4.5 Misc. date/duration/timestamp util. functions</h4>
<p>
iCalUtilityFunctions static date(-time)/timestamp functions.
Please examine the class file for more information about arguments and output.
</p>
<dl>
<dt>iCalUtilityFunctions::_chkDateArr( $datetime, $parno=FALSE )
<dd>Returns internal date-time/date formatted (keyed) array for an input date-time/date array (keyed or unkeyed)
<dt>iCalUtilityFunctions::_chkdatecfg( $theDate, & $parno, & $params )
<dd>Check date(-time) and params arrays for an opt. timezone and if it is a DATE-TIME or DATE (updates $parno and (opt) $params)
<dt>iCalUtilityFunctions::_date2strdate( $datetime, $parno=6 )
<dd>Returns formatted output (string) for calendar component property data value type date/date-time
<dt>iCalUtilityFunctions::_duration2arr( $duration )
<dd>Returns internal duration formatted (keyed) array for input in array format
<dt>iCalUtilityFunctions::_duration2date( $startdate, $duration )
<dd>Returns a datetime (keyed) array for a startdate+duration
<dt>iCalUtilityFunctions::_durationStr2arr( $duration )
<dd>Returns internal duration formatted (keyed) array for an input string (iCal) formatted duration
<dt>iCalUtilityFunctions::_duration2str( $duration )
<dd>Returns a formatted string for a calendar component property data value type duration
<dt>iCalUtilityFunctions::_isArrayDate( $input )
<dd>Returns bool TRUE if input contains a (array formatted) date/time
<dt>iCalUtilityFunctions::_isArrayTimestampDate( $input )
<dd>Returns bool TRUE if input array contains a timestamp date
<dt>iCalUtilityFunctions::_isOffset( $input )
<dd>Returns bool TRUE if input string contains (trailing) UTC/iCal offset
<dt>iCalUtilityFunctions::offsetSec2His( $seconds )
<dd>Returns iCal offset [-/+]hhmm[ss] (string) from UTC offset seconds
<dt>iCalUtilityFunctions::_strDate2arr( & $input )
<dd>Convert a date from specific string to (keyed) array format, returns TRUE on success
<dt>iCalUtilityFunctions::_strdate2date( $datetime, $parno=FALSE, $wtz=null )
<dd>Returns internal date-time/date formatted (keyed) array for input date-time/date in string fromat
<dt>iCalUtilityFunctions::_timestamp2date( $timestamp, $parno=6, $wtz=null )
<dd>Returns internal date-time/date formatted (keyed) array, based on a timestamp, default UTC or adjusted for offset/timezone
<dt>iCalUtilityFunctions::_tz2offset( $tz )
<dd>Returns seconds (int) from an offset, [+/-]HHmm[ss], used when correcting UTC to localtime or v.v.
</dl>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
<a name="helperFunctions"></a><h1>5 Helper functions</h1>
<p>The helper functions extend the utility of iCalcreator.</p>
<a name="XMLhelpers"></a><h3>5.1 iCal and XML helper functions</h3>
<p>
The XML helper functions convert iCal into XML and parse XML into iCal.
XML is defined by [RFC6321], &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;.
</p>
<a name="iCal2XML"></a><h4>5.1.1 iCal2XML</h4>
<p>The iCal2XML function converts an iCalcreator object instance to XML.</p>
<p>
Requires <em>PHP</em> 5 and &quot;libxml&quot; <em>PHP</em> extension (--enable-libxml) and utilizes the SimpleXML extension.
Before <em>PHP</em> 5.1.2, &quot;--enable-simplexml&quot; (at compile time) is required to enable this extension, after <em>PHP</em> 5.1.2 enabled by default.
</p>
<p>An rfc6321 XML string is returned.</p>
<p class="label">Format</p>
<p class="format">iCal2XML( iCalobj )</p>
<p class="comment">iCalobj = (object) iCalcreator instance</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
<a name="XML2iCal"></a><h4>5.1.2 XML2iCal</h4>
<p>
The XML2iCal function, with the two entry functions: XMLstr2iCal and XMLfile2iCal, parse an XML string/file to an iCalcreator instance.
The function is <b>not</b> using the <em>PHP</em> SimpleXML extension.
</p>
<p>
On success, an iCalcreator instance is returned.
</p>
<p>
On XML parse error, FALSE is returned.
</p>
<h5>XMLstr2iCal</h5>
<p>
The function accepts a well-formed (rfc6321) XML string as argument.
</p>
<p class="label">Format</p>
<p class="format">XMLstr2iCal( xmlstr [, config] )</p>
<p class="comment">xmlstr = (string) rfc6321 XML
config = (array) iCalcreator config array (opt)</p>
<h5>XMLfile2iCal</h5>
<p>
The function accepts an XML (rfc6321) local file or a remote URI, as argument.
</p>
<p class="label">Format</p>
<p class="format">XMLfile2iCal( xmlfile [, config] )</p>
<p class="comment">xmlfile = (string) rfc6321 XML file name or resource
config = (array) iCalcreator config array (opt)</p>
<h5>XML2iCal</h5>
<p>
This function is doing the hard work in XMLstr2iCal/XMLfile2iCal functions.
</p>
<p class="label">Format</p>
<p class="format">XML2iCal( xmlstr [, config] )</p>
<p class="comment">xmlstr = (string) rfc6321 XML
config = (array) iCalcreator config array (opt)</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
<a name="vCardhelpers"></a><h3>5.2 vCard helper functions</h3>
<p>
The purpose of the vCard helper functions are to produce simplified vCard output.
</p>
<a name="iCal2vCard"></a><h4>5.2.1 iCal2vCard</h4>
<p>
Convert single <a href="#ATTENDEE">ATTENDEE</a>, <a href="#CONTACT">CONTACT</a> or
<a href="#ORGANIZER">ORGANIZER</a> URI (in email format) to simplified vCard output or saved in vCard file.
</p>
<p>
If argument directory is set, vCards are saved in (directory/) files, named like &lt;firstName&gt;.&lt;familyName&gt;.&quot;ext&quot;.
</p>
<p>
Returns vCard string or TRUE if a valid directory is used as argument (and file write ok)
otherwise FALSE.
</p>
<p class="label">Format</p>
<p class="format">iCal2vCard( email [ ,version [ ,directory [ ,ext ]]] )</p>
<p class="comment">
email = (string) ATTENDEE, CONTACT or ORGANIZER URI in email format
version = (string) vCard version, default &quot;2.1&quot;, opt. &quot;3.0&quot;/&quot;4.0&quot;
directory = (string) if and where to save vCards files (write rights required), default FALSE
ext = (string) vCard file extension, default &quot;vcf&quot;
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
<a name="iCal2vCards"></a><h4>5.2.2 iCal2vCards</h4>
<p>
Collect and convert all <a href="#ATTENDEE">ATTENDEE</a>s, <a href="#CONTACT">CONTACT</a>s and
<a href="#ORGANIZER">ORGANIZER</a>s (URI, in email format) to simplified vCard (string) output or
saved in vCard files, using <a href="#iCal2vCard">iCal2vCard</a> function (above).
</p>
<p>
The file name formatting and return values are described above in <a href="#iCal2vCard">iCal2vCard</a> function.
</p>
<p class="label">Format</p>
<p class="format">iCal2vCards( vcalendar [ ,version [ ,directory [ ,ext ]]] )</p>
<p class="comment">
vcalendar = (object) iCalcreator object instance
version = (string) vCard version, default &quot;2.1&quot;, opt. &quot;3.0&quot;/&quot;4.0&quot;
directory = (string) if and where to save vCards files (write rights required), default FALSE
ext = (string) vCard file extension, default &quot;vcf&quot;
</p>
<p class="comment">
Return (bool) TRUE if argument directory is not null, otherwise vCard string.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
<a name="TZhelpers"></a><h3>5.3 time zone helper functions</h3>
<p>
Additional functions to use with vtimezone components.
</p>
<p>
The <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function
creates time zone transition information, based on vtimezone components contents in a iCalcreator calendar instance.
</p>
<p>
The <a href="#getTzOffsetForDate">getTzOffsetForDate</a> function returns UTC offset information for specific date (timestamp) based on output from <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function.
</p>
<p>
Before calling the functions <a href="#getTzOffsetForDate">getTzOffsetForDate</a> and <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a>,
set time zone 'GMT' ('date_default_timezone_set')!
</p>
<a name="getTzOffsetForDate"></a><h4>5.3.1 getTzOffsetForDate</h4>
<p>
The <a href="#getTzOffsetForDate">getTzOffsetForDate</a> function returns UTC offset information for specific date (timezone) based on output from <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function.
</p>
<p>
Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
</p>
<p>
Returns array, time zone data for specific date (timestamp) with keys for
</p>
<ul>
<li>&quot;offsetHis&quot; (+/-Hi[s])
<li>&quot;offsetSec&quot;( UTC offset in seconds)
<li>&quot;tzname&quot; (standard/daylight time zone name)
</ul>
<p class="label">Format</p>
<p class="format">getTzOffsetForDate( timezonesarray, tzid, timestamp )</p>
<p class="comment">timezonesarray = (array) output from getTimezonesAsDateArrays, below
tzid = (string) time zone identifier
timestamp = (mixed) the date in question (timestamp)
or UTC datetime (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 )</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
<a name="getTimezonesAsDateArrays"></a><h4>5.3.2 getTimezonesAsDateArrays</h4>
<p>
The function creates time zone transition information,
based on vtimezone component contents in a iCalcreator calendar instance,
using sub-function expandTimezoneDates.
</p>
<p>
Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
</p>
<p>
Returns an array containing time zone data from vtimezone standard/daylight instances (input to <a href="#getTzOffsetForDate">getTzOffsetForDate</a>, above).
</p>
<p class="label">Format</p>
<p class="format">getTimezonesAsDateArrays( iCalobj )</p>
<p class="comment">iCalobj= (object) iCalcreator calendar instance</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
<a name="Copyright_and_Licence"></a><h1>6 COPYRIGHT AND LICENSE</h1>
<a name="Copyright"></a><h4>6.1 Copyright</h4>
<p>
iCalcreator v2.22<br>
Copyright &copy; 2007-2015 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
<a href="http://kigkonsult.se/support/index.php" title="kigkonsult.se support" target="_blank">kigkonsult.se support</a><br>
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
</p>
<a name="Licence"></a><h4>6.2 License</h4>
<p>
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.
</p>
<p>
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.
</p>
<p>
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://kigkonsult.se/downloads/dl.php?f=LGPL" target="_blank">here</a>.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Copyright_and_Licence">[up]</a>
</body>
</html>