<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>iCalcreator 2.12 manual</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="author" content="Kjell-Inge Gustafsson - kigkonsult">
<meta name="copyright" content="2007-2012 Kjell-Inge Gustafsson - kigkonsult">
<meta name="keywords" content="ical, calendar, calender, xcal, xml, icalender, rfc2445, vcalender, php, create">
<meta name="description" content="using iCalcreator v2.12">
<style type="text/css">
* {
BACKGROUND-COLOR: white;
COLOR : black;
}
a {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : small;
}
a.ref {
xbackground-color: transparent;
background-color: inherit;
FONT-FAMILY : monospace, arial;
FONT-SIZE : small;
FONT-STYLE : normal;
TEXT-DECORATION : none;
}
body {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : small;
MARGIN-LEFT : 10px;
WIDTH : 600px;
}
h1 {
BACKGROUND-COLOR: silver;
BORDER : thin solid black;
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : x-large;
FONT-WEIGHT : bold;
DISPLAY : block;
}
h2 {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : large;
}
h3 {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : medium;
}
h4 {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : small;
FONT-WEIGHT : bold;
}
h5 {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : small;
FONT-WEIGHT : normal;
TEXT-DECORATION : underline;
}
p {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : small;
}
td {
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : small;
}
.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 {
background-color: transparent;
FONT-FAMILY : monospace;
FONT-SIZE : medium;
FONT-STYLE : italic;
FONT-WEIGHT : 300;
WHITE-SPACE : pre;
}
span.comment {
background-color: transparent;
FONT-FAMILY : monospace;
FONT-SIZE : medium;
}
.example {
background-color: #DCDCDC;
FONT-FAMILY : Courier, "Courier New";
FONT-SIZE : small;
FONT-WEIGHT : 500;
LINE-HEIGHT : 1.2em;
WHITE-SPACE : pre;
}
.format {
BORDER : gray dotted thin;
FONT-FAMILY : Courier, "Courier New";
FONT-SIZE : small;
FONT-WEIGHT : 500;
LINE-HEIGHT : 1.5em;
WHITE-SPACE : pre;
}
.header {
BACKGROUND-COLOR: silver;
BORDER : thin solid black;
FONT-FAMILY : "Lucida Grande","Lucida Sans Unicode", "Bitstream Vera Sans", Lucida, Arial, Geneva, Helvetica, sans-serif;
FONT-SIZE : xx-large;
WIDTH : 600px;
}
.label {
FONT-FAMILY : arial;
FONT-SIZE : small;
FONT-WEIGHT : bold;
LETTER-SPACING : 0.1em;
}
.quotes {
background-color: transparent;
FONT-FAMILY : arial;
FONT-SIZE : small;
xFONT-STYLE : italic;
FONT-WEIGHT : 300;
LETTER-SPACING : 0.2em;
WHITE-SPACE : pre;
}
.ref {
BACKGROUND-COLOR: transparent;
FONT-FAMILY : monospace, arial;
FONT-SIZE : x-small;
xFONT-STYLE : italic;
xFONT-WEIGHT : 600;
VERTICAL-ALIGN : top;
LETTER-SPACING : 0.2em;
}
.top {
VERTICAL-ALIGN : top;
}
</style>
</head>
<body>
<a name="top"></a>
<p class="header">iCalcreator v2.12</p>
<p>
iCalcreator v2.12<br>
copyright (c) 2007-2012 Kjell-Inge Gustafsson, kigkonsult<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>Description:</h2>
<p/>
iCalcreator is a <em>PHP</em> implementation of RFC2445/RFC2446 to manage iCal/xCal formatted files.
</p>
<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>
iCalcreator features create, parse, edit and select <strong>calendar</strong> and <strong>calendar</strong> components.
</p>
<p>
The iCalcreator package, built of a <strong>calendar</strong> class with support of a function class and helper functions, are <strong>calendar</strong>
component property oriented. Development environment is <em>PHP</em> version 5.x but coding is done
to meet 4.x backward compatibility and may work. Some functions requires <em>PHP</em> >= 5.2.0.
</p>
<p>
The iCalcreator main class, utility class and helper functions are included in the "iCalcreator.class.php" file.
</p>
<p>
More iCalcreator supplementary and "howto" 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>
<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>"Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)"
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
<dd>"iCalendar Transport-Independent Interoperability Protocol (iTIP)"<br>Scheduling Events, BusyTime, To-dos and Journal Entries
</dl>
<p class="quotes">. ..allows for the capture and exchange of information<br>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, "xCal: The XML Format for <strong>iCalendar</strong>", 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>"xCal: The XML Format for <strong>iCalendar</strong>"
</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>
<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">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 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 / 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>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Support"></a><h2>1.4 Support</h2>
<p>
The main support channel is using iCalcreator
<a title="Sourceforge" href="http://sourceforge.net/projects/icalcreator/forums/" target="_blank">Sourceforge</a> forum.
</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 services for software support, design and development of customizations and adaptations
of <em>PHP</em>/<em>MySQL</em> solutions
with a special focus on software long term utility and reliability,
supported through our agile acquire/design/transition process model.
</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>
<a name="Basic"></a><h3>1.6.1 Basic</h3>
<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 "[folder/]iCalcreator.class.php";</p>
<p>to your <em>PHP</em>-script.</p>
<p>
If using <em>PHP</em> version 5.1 or higher, the default timezone need to be set/altered, now "Europe/Stockholm",
line 50 in the iCalcreator.class.php file.
</p>
<p>
When creating a new <strong>calendar</strong>/component instance, review <a href="#Calendar_configuration_functions">config</a> settings.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Boost"></a><h3>1.6.2 Boost performance</h3>
<p>
To really boost performance, kigkonsult can now offer <em>PHP</em> (4 and 5) packages (iCalcreator etc) in byte coded files,
using <a href="http://www.ioncube.com" target="_blank"><u>ionCube</u></a> encoder.
</p>
<p>
Encoded files use a platform independent file format, and can be run on any platform for which ionCube supply a (free) Loader.
Currently supported platforms are Windows (e.g. NT, XP, W2K), Intel Linux, FreeBSD, NetBSD, OpenBSD, OS X, and Sparc Solaris.
</p>
<p>
Visit kigkonsult.se contact <a href="http://kigkonsult.se/contact/index.php" target="_blank"><u>page</u></a> for information and purchase.
</p>
<p>
Use basic install (above), install ionCube Loader (requires an update of "php.ini" or additional file in "/etc/php.d" folder AND the execute rights to use the <i>PHP</i> "dl" function) and simply replace the <em>PHP</em> class files with the encoded files.
</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">(a <a href="/wiki/Universally_Unique_Identifier" title="Universally Unique Identifier" class="mw-redirect">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 href="#VTIMEZONE">vtimezone</a> component
<dd><a href="#X-PROPERTY">X-LIC-LOCATION</a> x-property
</dl>
<p class="label">Example</p>
<p>Recommendation is also to set <a href="#Unique_id">unique_id</a> when creating a new vcalendar/component instance,
to ensure accurate setting of all components <a href="#UID">UID</a> property, even before <a href="#parse_merge">parse</a>.</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vcalendar->setProperty( "method", "PUBLISH" )
$vcalendar->setProperty( "x-wr-calname", "Calendar Sample" );
$vcalendar->setProperty( "X-WR-CALDESC", "Calendar Description" );
$uuid = "3E26604A-50F4-4449-8B3E-E4F4932D05B5";
$vcalendar->setProperty( "X-WR-RELCALID", $uuid );
$vcalendar->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
<a name="Addendum"></a><h2>1.8 Addendum</h2>
<p>
Download iCalcreator <a title="download iCalcreator coding samples" href="http://kigkonsult.se/downloads/index.php#iCalcreator" target="_blank">coding samples</a>.
</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>
If you are downloading the iCalcreatorusing sub-package, there are free iCal/xCal icons in the images directory, to use as buttons on a web page.
</p>
<p>
The <em>PHP</em> coding in this document or "coding samples" (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.dagbladet.no/development/phpcodingstandard/" target="_blank">http://www.dagbladet.no/development/phpcodingstandard/</a>
<!-- <a href="http://ez.no/ezpublish/documentation/development/standards/php" target="_blank">http://ez.no/ezpublish/documentation/development/standards/php</a> -->
<dd><a href="http://framework.zend.com/manual/en/coding-standard.overview.html" target="_blank">http://framework.zend.com/manual/en/coding-standard.overview.html</a>
<!-- <a href="http://gforge.org/docman/view.php/1/2/coding-standards.html" target="_blank">http://gforge.org/docman/view.php/1/2/coding-standards.html</a> -->
<dd><a href="http://pear.php.net/manual/en/standards.php" target="_blank">http://pear.php.net/manual/en/standards.php</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="#Basic">1.6.1 Basic</a><br>
<a href="#Boost">1.6.2 Boost performance</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="#Calendar_object_functions">3.1 Calendar object functions</a><br>
<br>
<a href="#Calendar_object_constructors">3.1.1 Constructors</a><br>
<a href="#vcalendar">3.1.1.1 vcalendar</a><br>
<a href="#vevent">3.1.1.2 vevent</a><br>
<a href="#vtodo">3.1.1.3 vtodo</a><br>
<a href="#vjournal">3.1.1.4 vjournal</a><br>
<a href="#vfreebusy">3.1.1.5 vfreebusy</a><br>
<a href="#valarm">3.1.1.6 valarm</a><br>
<a href="#vtimezone">3.1.1.7 vtimezone</a><br>
<a href="#standard">3.1.1.8 standard</a><br>
<a href="#daylight">3.1.1.9 daylight</a><br>
<br>
<a href="#Calendar_property_functions">3.1.2 Calendar property functions</a><br>
<a href="#deleteProperty">3.1.2.1 deleteProperty</a><br>
<a href="#getProperty">3.1.2.2 getProperty</a><br>
<a href="#setProperty">3.1.2.3 setProperty</a><br>
<a href="#CALSCALE">3.1.2.4 CALSCALE</a><br>
<a href="#METHOD">3.1.2.5 METHOD</a><br>
<a href="#VERSION">3.1.2.6 VERSION</a><br>
<a href="#X-PROPERTY">3.1.2.7 X-PROPERTY</a><br>
<br>
<a href="#Calendar_component_functions">3.1.3 Calendar component functions</a><br>
<a href="#deleteComponent">3.1.3.1 deleteComponent</a><br>
<a href="#getComponent">3.1.3.2 getComponent</a><br>
<a href="#newComponent">3.1.3.3 newComponent</a><br>
<a href="#selectComponents">3.1.3.4 selectComponents</a><br>
<a href="#setComponent">3.1.3.5 setComponent</a><br>
<br>
<a href="#Calendar_inputoutput_functions">3.1.4 Calendar input/output functions</a><br>
<a href="#parse_merge">3.1.4.1 parse and merge</a><br>
<a href="#createCalendar">3.1.4.2 createCalendar</a><br>
<a href="#returnCalendar">3.1.4.3 returnCalendar</a><br>
<a href="#saveCalendar">3.1.4.4 saveCalendar</a><br>
<a href="#sort">3.1.4.5 sort</a><br>
<a href="#useCachedCalendar">3.1.4.6 useCachedCalendar</a><br>
<br>
<a href="#Calendar_configuration_functions">3.1.5 Calendar configuration functions</a><br>
<a href="#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="#Fileinfo">3.1.5.9 Fileinfo</a><br>
<a href="#Filename">3.1.5.10 Filename</a><br>
<a href="#Filesize">3.1.5.11 Filesize</a><br>
<a href="#Format">3.1.5.12 Format</a><br>
<a href="#Language">3.1.5.13 Language</a><br>
<a href="#NewlineChar">3.1.5.14 NewlineChar</a><br>
<a href="#dTZID">3.1.5.15 TZID</a><br>
<a href="#Unique_id">3.1.5.16 Unique_id</a><br>
<a href="#configURL">3.1.5.17 URL</a><br>
<br>
<a href="#Calendar_component_object_property_function_list">3.2 Calendar component/object property function 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>
<br>
<a href="#ACTION">3.2.5 ACTION</a><br>
<a href="#ATTACH">3.2.6 ATTACH</a><br>
<a href="#ATTENDEE">3.2.7 ATTENDEE</a><br>
<a href="#CATEGORIES">3.2.8 CATEGORIES</a><br>
<a href="#CLASS">3.2.9 CLASS</a><br>
<a href="#COMMENT">3.2.10 COMMENT</a><br>
<a href="#COMPLETED">3.2.11 COMPLETED</a><br>
<a href="#CONTACT">3.2.12 CONTACT</a><br>
<a href="#CREATED">3.2.13 CREATED</a><br>
<a href="#DESCRIPTION">3.2.14 DESCRIPTION</a><br>
<a href="#DTEND">3.2.15 DTEND</a><br>
<a href="#DTSTAMP">3.2.16 DTSTAMP</a><br>
<a href="#DTSTART">3.2.17 DTSTART</a><br>
<a href="#DUE">3.2.18 DUE</a><br>
<a href="#DURATION">3.2.19 DURATION</a><br>
<a href="#EXDATE">3.2.20 EXDATE</a><br>
<a href="#EXRULE">3.2.21 EXRULE</a><br>
<a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a><br>
<a href="#GEO">3.2.23 GEO</a><br>
<a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a><br>
<a href="#LOCATION">3.2.25 LOCATION</a><br>
<a href="#ORGANIZER">3.2.26 ORGANIZER</a><br>
<a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a><br>
<a href="#PRIORITY">3.2.28 PRIORITY</a><br>
<a href="#RDATE">3.2.29 RDATE</a><br>
<a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a><br>
<a href="#RELATED-TO">3.2.31 RELATED-TO</a><br>
<a href="#REPEAT">3.2.32 REPEAT</a><br>
<a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a><br>
<a href="#RESOURCES">3.2.34 RESOURCES</a><br>
<a href="#RRULE">3.2.35 RRULE</a><br>
<a href="#SEQUENCE">3.2.36 SEQUENCE</a><br>
<a href="#STATUS">3.2.37 STATUS</a><br>
<a href="#SUMMARY">3.2.38 SUMMARY</a><br>
<a href="#TRANSP">3.2.39 TRANSP</a><br>
<a href="#TRIGGER">3.2.40 TRIGGER</a><br>
<a href="#TZID">3.2.41 TZID</a><br>
<a href="#TZNAME">3.2.42 TZNAME</a><br>
<a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a><br>
<a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a><br>
<a href="#TZURL">3.2.45 TZURL</a><br>
<a href="#UID">3.2.46 UID</a><br>
<a href="#URL">3.2.47 URL</a><br>
<a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a><br>
<br>
<a href="#Calendar_component_configuration_functions">3.3 Calendar Component configuration functions</a><br>
<br>
<a href="#Language_PROP">3.3.1 Language</a><br>
<br>
<a href="#Calendar_component_object_misc_functions">3.4 Calendar component object misc. functions</a><br>
<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="#createTimezone">4.1 createTimezone</a><br>
<a href="#ms2phpTZ">4.2 ms2phpTZ</a><br>
<a href="#transformDateTime">4.3 transformDateTime</a><br>
<br>
<a href="#helperFunctions">5. Helper functions</a><br>
<a href="#iCal2XML">5.1 iCal2XML</a><br>
<a href="#XML2iCal">5.2 XML2iCal</a><br>
<a href="#TZhelpers">5.3 time zone helper functions</a><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">5. COPYRIGHT AND LICENSE</a><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*("BEGIN" ":" "VCALENDAR" CRLF</p>
<p class="center">icalbody</p>
<p class="center">"END" ":" "VCALENDAR" CRLF)</p>
<p>icalbody = calprops component</p>
<p>calprops = 2*(</p>
<p class="center">"prodid" and "version" are both REQUIRED, but MUST NOT occur more than once
<p class="center">prodid / <a href="#VERSION">version</a> /</p>
<p class="center">"calscale"and "method"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 = "BEGIN" ":" iana-token CRLF</p>
<p class="center">1*contentline</p>
<p class="center">"END" ":" iana-token CRLF</p>
<p class="center">x-comp = "BEGIN" ":" x-name CRLF</p>
<p class="center">1*contentline</p>
<p class="center">"END" ":" 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">"BEGIN" ":" "VEVENT" CRLF</p>
<p class="center">eventprop *alarmc</p>
<p class="center">"END" ":" "VEVENT" 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 "<a href="#DTEND">dtend</a>" or "<a href="#DURATION">duration</a>" may appear in a "eventprop", </p>
<p class="center">but "<a href="#DTEND">dtend</a>" and "<a href="#DURATION">duration</a>" MUST NOT occur in the same "eventprop"</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">"BEGIN" ":" "VTODO" CRLF</p>
<p class="center">todoprop *alarmc</p>
<p class="center">"END" ":" "VTODO" 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 "<a href="#DUE">due</a>" or "<a href="#DURATION">duration</a>" may appear in a "todoprop",</p>
<p class="center"> but "<a href="#DUE">due</a>" and "<a href="#DURATION">duration</a>" MUST NOT occur in the same "todoprop"</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 = "BEGIN" ":" "VJOURNAL" CRLF</p>
<p class="center">jourprop</p>
<p class="center">"END" ":" "VJOURNAL" 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">"BEGIN" ":" "VFREEBUSY" CRLF</p>
<p class="center">fbprop</p>
<p class="center">"END" ":" "VFREEBUSY" 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">"BEGIN" ":" "VALARM" CRLF</p>
<p class="center">(audioprop / dispprop / emailprop / procprop)</p>
<p class="center">"END" ":" "VALARM" CRLF</p>
<p>audioprop = 2*(</p>
<p class="center">"<a href="#ACTION">action</a>" and "<a href="#TRIGGER">trigger</a>" 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">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" 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">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" 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">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" 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">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" 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">"<a href="#DESCRIPTION">description</a>" 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">"BEGIN" ":" "VTIMEZONE" CRLF</p>
<p>2*(</p>
<p class="center">"<a href="#TZID">tzid</a>" is required, but MUST NOT occur more than once</p>
<p class="center"><a href="#TZID">tzid</a> / </p>
<p class="center">"<a href="#LAST-MODIFIED">last-mod</a>" and "<a href="#TZURL">tzurl</a>" 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 "standardc" or "daylightc" 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">"END" ":" "VTIMEZONE" CRLF</p>
<p class="center">standardc = "BEGIN" ":" "STANDARD" CRLF</p>
<p class="center">tzprop</p>
<p class="center">"END" ":" "STANDARD" CRLF</p>
<p class="center">daylightc = "BEGIN" ":" "DAYLIGHT" CRLF</p>
<p class="center">tzprop</p>
<p class="center">"END" ":" "DAYLIGHT" 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 / 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"> </td>
</tr>
<tr>
<td> </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 a l a r m</a></td>
</tr>
<tr>
<td class="bb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb">0-1</td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb">1-m</td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#COMPLETED">completed</a></td>
<td class="blb"> </td>
<td class="blb">0-1</td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb">0-1</td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#DUE">due</a></td>
<td class="blb"> </td>
<td class="blb">0*1</td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb">0-1</td>
<td class="blb">0 / 1=1</td>
<td class="blb">0 / 1=1</td>
<td class="blb">0 / 1=1</td>
<td class="blb">0 / 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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#FREEBUSY_PROP">freebusy</a></td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb">0-m</td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#PERCENT-COMPLETE">percent</a></td>
<td class="blb"> </td>
<td class="blb">0-1</td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#REPEAT">repeat</a></td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb">0 / 1=1</td>
<td class="blb">0 / 1=1</td>
<td class="blb">0 / 1=1</td>
<td class="blb">0 / 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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb">1</td>
<td class="blb"> </td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#TRANSP">transp</a></td>
<td class="blb">0-1</td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
</tr>
<tr>
<td class="bb"><a class="ref" href="#TRIGGER">trigger</a></td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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"> </td>
<td class="blb"> </td>
<td class="blb"> </td>
<td class="blb"> </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 <strong>calendar</strong> functions <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="Calendar_object_functions"></a><h2>3.1 Calendar object functions</h2>
<a name="Calendar_object_constructors"></a><h3>3.1.1 Constructors</h3>
<a name="vcalendar"></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()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vevent"></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 a <strong>calendar</strong> factory-method, returning a reference to the new component.</p>
<p class="format">newComponent( "vevent" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vevent = & $vcalendar->newComponent( "vevent" );
$vevent->setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VEVENT">VEVENT</a> object.</p>
<p class="format">vevent()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vevent = new vevent();
$vevent->setProperty(...
...
$vcalendar->setComponent( $vevent );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vtodo"></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 a <strong>calendar</strong> factory-method, returning a reference to the new component.</p>
<p class="format">newComponent( "vtodo" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtodo = & $vcalendar->newComponent( "vtodo" );
$vtodo->setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTODO">VTODO</a> object.</p>
<p class="format">vtodo()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtodo = new vtodo();
$vtodo->setProperty(...
...
$vcalendar->setComponent( $vtodo );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vjournal"></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 a <strong>calendar</strong> factory-method, returning a reference to the new component.</p>
<p class="format">newComponent( "vjournal" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vjournal = & $vcalendar->newComponent( "vjournal" );
$vjournal->setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VJOURNAL">VJOURNAL</a> object.</p>
<p class="format">vjournal()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vjournal = new vjournal();
$vjournal->setProperty(...
...
$vcalendar->setComponent( $vjournal );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vfreebusy"></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 a <strong>calendar</strong> factory-method, returning a reference to the new component.</p>
<p class="format">newComponent( "vfreebusy" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vfreebusy = & $vcalendar->newComponent( "vfreebusy" );
$vfreebusy->setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object.</p>
<p class="format">vfreebusy()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vfreebusy = new vfreebusy();
$vfreebusy->setProperty(...
...
$vcalendar->setComponent( $vfreebusy );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="valarm"></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 a component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">newComponent( "valarm" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vevent = & $vcalendar->newComponent( "vevent" );
$vevent->setProperty(...
...
$valarm = & $vevent->newComponent( "valarm" );
$valarm->setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VALARM">VALARM</a> object.</p>
<p class="format">valarm()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vevent = new vevent();
$vevent->setProperty(...
...
$valarm = new valarm();
$valarm->setProperty(...
...
$vevent->setComponent( $valarm );
...
$vcalendar->setComponent( $vevent );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="vtimezone"></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 a <strong>calendar</strong> factory-method, returning a reference to the new component.</p>
<p class="format">newComponent( "vtimezone" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object.</p>
<p class="format">vtimezone()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone();
$vtimezone->setProperty(...
...
$vcalendar->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"></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 a component factory-method, returning a reference to the new (sub-)component.</p>
<p class="format">newComponent( "standard" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty(...
...
$standard = & $vtimezone->newComponent( "standard" );
$standard->setProperty(...
...
$daylight = & $vtimezone->newComponent( "daylight" );
$daylight->setProperty(...
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> STANDARD object.</p>
<p class="format">vtimezone( "standard" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone();
$vtimezone->setProperty(...
...
$standard = new vtimezone( "standard" );
$standard->setProperty(...
...
$vtimezone->setComponent( $standard );
...
$daylight = new vtimezone( "daylight" );
$daylight->setProperty(...
...
$vtimezone->setComponent( $daylight );
...
$vcalendar->setComponent( $vtimezone );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="daylight"></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">newComponent( "standard" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
...
$standard = & $vtimezone->newComponent( "standard" );
...
$daylight = & $vtimezone->newComponent( "daylight" );
...
</p>
<p class="label">Format 2</p>
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> DAYLIGHT object.</p>
<p class="format">vtimezone( "daylight" )</p>
<p class="label">Example</p>
<p class="example"></p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtimezone = new vtimezone();
...
$standard = new vtimezone( "standard" );
...
$vtimezone->setComponent( $standard );
$daylight = new vtimezone( "daylight" );
...
$vtimezone->setComponent( $daylight );
$vcalendar->setComponent( $vtimezone );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
<a name="Calendar_property_functions"></a><h3>3.1.2 Calendar property functions</h3>
<a name="deleteProperty"></a><h4>3.1.2.1 deleteProperty</h4>
<p>Generic <strong>calendar</strong> deleteProperty function, 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">deleteProperty( [ PropName [, order=1 ] )</p>
<p class="comment">propName = (string) case independent, rfc2445 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">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
if( !$vcalendar->deleteProperty( "method" ))
echo "METHOD property not found";
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_property_functions">[up]</a>
<a name="getProperty"></a><h4>3.1.2.2 getProperty</h4>
<p class="label">Format 1</p>
<p>Generic <strong>calendar</strong> getProperty function, 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">getProperty( [ PropName [, order=1 [, complete=FALSE ]]] )</p>
<p class="comment">propName = (string) case independent, rfc2445 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( "value"=> <value> ,"params" => <parameter array>)
</p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$calscale = $vcalendar->getProperty( "calscale" );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $xprop = $vcalendar->getProperty( )) { // <span class="ref">get x-properties</span>
.. .
</p>
<a name="getProperty2"></a>
<p class="label">Format 2</p>
<p>
Ability to fetch specific property (unique) values and number of occurrences. Supported properties are
<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#DTSTART">DTSTART</a>, <a href="#LOCATION">LOCATION</a>, <a href="#ORGANIZER">ORGANIZER</a>, <a href="#PRIORITY">PRIORITY</a>, <a href="#RESOURCES">RESOURCES</a>,
<a href="#STATUS">STATUS</a>, <a href="#SUMMARY">SUMMARY</a>, <a href="#UID">UID</a> or "RECURRENCE-ID-UID" (alt. "R-UID" ).
The search includes in <b>ALL</b> components within <strong>calendar</strong>.
</p>
<p>
Outputs an array( *[ (string) unique-property-value => (int) number_of_occurrence ] )<br>or an empty array if no hits.
The array is sorted by (asc.) key.
</p>
<p>
If a property contains multiple values (ex. "CATAGORIES:course1,courseB" or "RESOURCES:pc,developer"), they are split into unique values.
</p>
<p>To select components based on property values, see <a href="#selectComponents2">selectComponents</a> (Format 2).</p>
<p class="format">getProperty( PropName )</p>
<p class="comment">propName = (string) case independent, property name
Using <a href="#DTSTART">DTSTART</a> as argument returns dates in format "YYYYMMDD" (please note, except
the origin start date (<a href="#DTSTART">DTSTART</a>), dates within a RDATE/RRULE recurrence set are NOT
included).
Using "RECURRENCE-ID-UID"returns <a href="#UID">UID</a> values for component(-s) where <a href="#RECURRENCE-ID">RECURRENCE-ID</a>
is set.
The <a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> values are prefixed by "protocol" like
"MAILTO:hide@address.com".
</p>
<p class="label">Example 1</p>
<p>Fetch all attendees in <strong>calendar</strong>.</p>
<p class="example">.. .
$attendees = $vcalendar->getProperty( "ATTENDEE" );
foreach( $attendees as $attendee => $occurrCount ) {
.. .
</p>
<p class="label">Example 2</p>
<p>Fetch all DTSTARTs in <strong>calendar</strong>.</p>
<p class="example">.. .
$startDates = $vcalendar->getProperty( "DTSTART" );
foreach( $startDates as $startDate => $occurrCount ) {
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_property_functions">[up]</a>
<a name="setProperty"></a><h4>3.1.2.3 setProperty</h4>
<p>Generic <strong>calendar</strong> setProperty function,simplifying insert of <strong>calendar</strong> properties.</p>
<p>A successful update returns TRUE.</p>
<p class="label">Format</p>
<p class="format">setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
<p class="comment">propName = (string) case independent, strict rfc2445 <strong>calendar</strong> property names,
unknown propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
Proparg = (mixed) property argument
</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config ); // <span class="ref">initiate new CALENDAR</span>
$vcalendar->setProperty( "calscale", "GREGORIAN" );
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_property_functions">[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 "GREGORIAN", implied when missing.
</p>
<h5>Create CALSCALE</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createCalscale()</p>
<p class="label">Example</p>
<p class="example">$vcalendar->createCalscale();</p>
<h5>Delete CALSCALE</h5>
<p>Remove CALSCALE from calendar.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "calscale" )</p>
<p class="label">Example</p>
<p class="example">$vcalendar->deleteProperty( "CALSCALE" );</p>
<h5>Get Calscale</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">getProperty( "calscale" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$calscale = $vcalendar->getProperty( "calscale" );
.. .
</p>
<h5>Set CALSCALE</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "calscale", value )</p>
<p class="comment">value = (string) calscale value</p>
<p class="label">Example</p>
<p class="example">
$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config ); // <span class="ref">initiate new CALENDAR</span>
$vcalendar->setProperty( "calscale", "GREGORIAN" );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_property_functions">[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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createMethod()</p>
<p class="label">Example</p>
<p class="example">$vcalendar->createMethod();</p>
<h5>Delete METHOD</h5>
<p>Remove METHOD from calendar.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "METHOD" )</p>
<p class="label">Example</p>
<p class="example">$vcalendar->deleteProperty( "METHOD" );</p>
<h5>Get METHOD</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">getProperty( "method" );</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$method = $vcalendar->getProperty( "method" )
.. .
</p>
<h5>Set METHOD</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "method", value )</p>
<p class="comment">value = (string) method value</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config ); // <span class="ref">initiate new CALENDAR</span>
$vcalendar->setProperty( "method", "PUBLISH" )
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_property_functions">[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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createVersion()</p>
<p class="label">Example</p>
<p class="example">$vcalendar->createVersion();</p>
<h5>Get Version</h5>
<p>Fetch property value.</p>
<p class="label">Format</p>
<p class="format">getProperty( "version" )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$version = $vcalendar->getProperty( "version" )
.. .
</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">setProperty( "version", version )</p>
<p class="comment">version = (string) iCal version</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config ); // <span class="ref">initiate new CALENDAR</span>
$vcalendar->setProperty( "version", "2.0" )
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_property_functions">[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 "X-" 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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createXprop()</p>
<p class="label">Example</p>
<p class="example">$vcalendar->createXprop();</p>
<h5>Delete X-PROPERTY</h5>
<p>Remove X-PROPERTY from <strong>calendar</strong>.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "<X-PROPERTY>" )</p>
<p class="label">Example 1</p>
<p>Delete the x-property named "X-PROPERTY".</p>
<p class="example">$vcalendar->deleteProperty( "X-PROPERTY" );</p>
<p class="label">Example 2</p>
<p>Delete all x-properties.</p>
<p class="example">while( $vcalendar->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">getProperty()</p>
<p class="format">getProperty( "<X-PROPERTY>" )</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>, propertyData<span class="ref">2</span> )</p>
<p class="format">getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>
, array( "value" => propertyData<span class="ref">2</span> )
, "params" => params<span class="ref"> 3</span>))
</p>
<p class="label">Example 1</p>
<p>Read all x-prop values in a loop.</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $xprop = $vcalendar->getProperty( )) {
.. .
</p>
<p class="comment">$xprop = array( propertyName<span class="ref">1</span>, propertyData<span class="ref">2</span> )</p>
<p class="label">Example 2</p>
<p>If exists, read X-WR-TIMEZONE x-prop</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
if( $xprop = $vcalendar->getProperty( "X-WR-TIMEZONE" )) {
.. .
</p>
<p class="comment">$xprop = array( "X-WR-TIMEZONE", propertyData<span class="ref">2</span> )</p>
<p class="label">Example 3</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $xprop = $vcalendar->getProperty( FALSE, FALSE, TRUE )) {
.. .
</p>
<p class="comment">$xprop = array( propertyName<span class="ref">1</span>
, array( "value " => propertyData<span class="ref">2</span> )
, "params "=> params<span class="ref"> 3</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 => X-WR-CALNAME.
<p class="label">Format</p>
<p class="format">setProperty( propertyName, propertyData [, params ] )</p>
<p class="comment">propertyName<span class="ref">1</span> = (string) Any property name with a "X-" prefix
propertyData<span class="ref">2</span> = (string) Value type TEXT
params<span class="ref">3</span> = (array) ( ["LANGUAGE" => (string) "<lang>"] [, xparams] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config ); // initiate new CALENDAR
// <span class="ref">set some X-properties.. .</span>
$vcalendar->setProperty( "x-wr-calname", "Calendar Sample" )
$vcalendar->setProperty( "X-WR-CALDESC", "Calendar Description" );
$vcalendar->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" );
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_property_functions">[up]</a>
<a name="Calendar_component_functions"></a><h3>3.1.3 Calendar component functions</h3>
<a name="deleteComponent"></a><h4>3.1.3.1 deleteComponent</h4>
<p>
Remove component from <strong>calendar</strong>.<br>
FALSE is returned if no property exists or when end-of-properties at consecutive function calls.
</p>
<p class="label">format 1</p>
Remove component with order number (1st=1, 2nd=2.. .).
<p class="format">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. "vevent") and order 1 alt. suborder number.</p>
<p class="format">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">deleteComponent( <a href="#UID">UID</a> )</p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcal = new vcalendar( $config );
$vcal->parse();
$vcal->deleteComponent( 1 );
$vcal->deleteComponent( "vtodo", 2 );
$vcal->deleteComponent( "20070803T194810CEST-hide@address.com");
.. .
</p>
<p class="label">Example 2</p>
<p>Deleting all components, using format 2 without order number.</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcal = new vcalendar( $config );
$vcal->parse();
.. .
while( $vcal->deleteComponent( "vevent"))
continue;
.. .
$vtodo = $vcal->getComponent( "vtodo" );
while( $vtodo->deleteComponent( "valarm"))
continue;
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_functions">[up]</a>
<a name="getComponent"></a><h4>3.1.3.2 getComponent</h4>
<p>Get component from <strong>calendar</strong>.</p>
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
<p class="label">format 1</p>
<p>Get next component, until end-of-components.</p>
<p class="format">getComponent()</p>
<p class="label">format 2</p>
<P>Get specific component with order number (1st=1, 2nd=2.. .).</p>
<p class="format">getComponent( orderNumber )</p>
<p class="comment">orderNumber = (int) order number</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">getComponent( componentType [, componentSuborderNumber])</p>
<p class="comment">componentType = (string) component type
componentSuborderNumber = (int) order number</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.)</p>
<p class="format">getComponent( <a href="#UID">UID</a> )</p>
<p class="label">format 5</p>
<p>Get (first/next) component based on specific property contents;
<a href="#DTSTART">DTSTART</a>, <a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a>, <a href="#CREATED">CREATED</a>, <a href="#COMPLETED">COMPLETED</a>, <a href="#DTSTAMP">DTSTAMP</a>, <a href="#LAST-MODIFIED">LAST-MODIFIED</a>, <a href="#RECURRENCE-ID">RECURRENCE-ID</a>,
<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#LOCATION">LOCATION</a>, <a href="#ORGANIZER">ORGANIZER</a>, <a href="#PRIORITY">PRIORITY</a>, <a href="#RESOURCES">RESOURCES</a>, <a href="#STATUS">STATUS</a>, <a href="#SUMMARY">SUMMARY</a>, <a href="#UID">UID</a>.
For the property "SUMMARY" ,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>
Note, <a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> values must be prefixed by protocol ex."MAILTO:hide@address.com".
</p>
<p class="format">getComponent( search )</p>
<p class="comment">
search = (array) ( *[ propertyName => uniqueValue] )
propertyName = (string) property name, above
propertyData = (string) unique property value (strict case),
date format "YYYYMMDD" (if any side is DATE, only dates are used),
datetime format "YYYYMMDDTHHMMSS"</p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $comp = $vcalendar->getComponent()) {
.. .
}
.. .
</p>
<p class="label">Example 2</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
if( $comp = $vcalendar->getComponent( 1 )) {
.. .
}
.. .
</p>
<p class="label">Example 3</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
if( $comp = $vcalendar->getComponent( "vtodo", 2 ) {
.. .
}
.. .
</p>
<p class="label">Example 4</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$uid = "20070803T194810CEST-hide@address.com";
if($comp = $vcalendar->getComponent( $uid ){
.. .
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_functions">[up]</a>
<a name="newComponent"></a><h4>3.1.3.3 newComponent</h4>
<P>
Create component (<a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a> / <a href="#VTIMEZONE">VTIMEZONE</a>)
using a <strong>calendar</strong> factory-method, returning a reference to the new component.
</p>
<p class="label">Format</p>
<p class="format">newComponent( componentType )</p>
<p class="comment">componentType = (string) component type</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vevent = & $vcalendar->newComponent( "vevent" );
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_functions">[up]</a>
<a name="selectComponents"></a><h4>3.1.3.4 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 <strong>calendar</strong> 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.<br>If missing in a <a href="#VTODO">VTODO</a> component then <a href="#DTSTART">DUE</a> is used.<br>
<li><a href="#sort">sort</a> <b>MUST</b> be executed before "selectComponents", notice example below.
</ul>
<p>Limitations:</p>
<ul>
<li>The values "SECONDLY" / "MINUTELY" / "HOURLY" in the "FREQ" 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. an individual instance within the recurrence set),<br>
the <a href="#RECURRENCE-ID">RECURRENCE-ID</a> parameter "RANGE" ("THISANDPRIOR" / "THISANDFUTURE") is NOT supported.<br>
</ul>
<p>FALSE is returned if no selected component exists.</p>
<p class="format">selectComponents([ startYear, startMonth, startDay
[, endYear, endMonth, endDay
[, cType [, flat [, any [, split]]]]]])
</p>
<p>
Returns an array with components (events.. .).
For all recurrent instances of a <strong>calendar</strong> component, an x-property,
"X-CURRENT-DTSTART" and opt. also "X-CURRENT-DTEND" alt. "X-CURRENT-DUE",
has been created with a TEXT content, "Y-m-d [H:i:s][timezone/UTC offset]"
showing the current start and opt. also end alt. due date.<br>
Also a "X-RECURRENCE" x-property is set with order number (valid if selectComponents is called from DTSTART date).
</p>
<p class="comment">startYear : (int) start year (4*digit), default current year
startMonth : (int) start month (1-2*digit), default current month
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)
("vevent", "vtodo", "vjournal", "vfreebusy")
(bool) FALSE (default) => all
flat : (bool) TRUE => output : array[] (ignores split)
component where recurrence pattern exists within period
FALSE (default) => output : array[Year][Month][Day][]
any : (bool) TRUE (default) => select components with recurrence within period
FALSE => only components that starts (DTSTART) within period
split : (bool) TRUE (default) => one component copy for every day it occurs
within the period
FALSE => one occurrence of component in output array,
start date/recurrence (start) date
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)
</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$vcalendar->sort();
$events_arr = $vcalendar->selectComponents( 2007,11,1,2007,11,30,"vevent");
// <span class="comment">select all events occurring 1-30 nov. 2007</span>
foreach( $events_arr as $year => $year_arr ) {
foreach( $year_arr as $month => $month_arr ) {
foreach( $month_arr as $day => $day_arr ) {
foreach( $day_arr as $event ) {
$currddate = $event->getProperty( "x-current-dtstart" );
<span class="comment">// if member of a recurrence set, returns
// array(" x-current-dtstart",
// <(string) date("Y-m-d [H:i:s][timezone/UTC offset]")>)</span>
$startDate = $event->getProperty( "dtstart" );
$summary = $event->getProperty( "summary" );
$description = $event->getProperty( "description" );
.. .
</p>
<a name="selectComponents2"></a>
<p class="label">format 2</p>
<p>
Using this format, the function selects components based on specific property value(-s),
<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#LOCATION">LOCATION</a>, <a href="#ORGANIZER">ORGANIZER</a>, <a href="#PRIORITY">PRIORITY</a>, <a href="#RESOURCES">RESOURCES</a>, <a href="#STATUS">STATUS</a>, <a href="#SUMMARY">SUMMARY</a> or <a href="#UID">UID</a>.
For the property "SUMMARY" ,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.<br>
<a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by protocol ex. "MAILTO:hide@address.com".
Multiple search properties may coexist.
</p>
<p>To retrieve property values, see <a href="#getProperty2">getProperty</a> (Format 2) on <strong>calendar</strong> level.</p>
<p class="format">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 => propertyValue )
propertyName : (string) above (any case)
propertyValue : (string) value / (array) ( *[ (string) propertyValue] )
</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$vcalendar->sort();
$searchArray = array( "PRIORITY" => array( 1, 2, 3, 4 ));
$highPrioArr = $vcalendar->selectComponents( $searchArray );
// <span class="comment">select all components with PRIORITY set to high (1-4)</span>
if( !empty( $highPrioArr )) {
$highPrioCal = new vcalendar( array( "unique_id" => "kigkonsult.se" ));
$highPrioCal->setProperty( "X-WR-CALDESC", "High priority events" );
foreach( $highPrioArr as $highPrioComponent )
$highPrioCal->setComponent( $highPrioComponent );
$highPrioCal->returnCalendar();
}
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_functions">[up]</a>
<a name="setComponent"></a><h4>3.1.3.5 setComponent</h4>
<p>
Replace or update component in <strong>calendar</strong>.
Also add <strong>calendar</strong> component to <strong>calendar</strong> when <strong>calendar</strong> component is created with the procedural (<b>non</b>-factory) method,
see example <a href="#vevent">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">setComponent( component )
addComponent( component ) // <span class="ref">alias</span></p>
<p class="comment">component = (object) iCalcreator component instance</p>
<p class="comment">addComponent, may be removed i 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">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">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">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">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$vevent = vcalendar->getComponent( 1 ); //<span class="comment">fetch first EVENT</span>
$vevent->setProperty( "dtstart" //<span class="comment">update <a class="ref" href="#DTSTART">DTSTART</a> property</span>
, 2006, 12, 24, 19, 30, 00 );
.. .
$vcalendar->setComponent( $vevent, 1 ); // replace first component
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_functions">[up]</a>
<a name="Calendar_inputoutput_functions"></a><h3>3.1.4 Calendar input/output functions</h3>
<a name="parse_merge"></a><h4>3.1.4.1 parse and merge</h4>
<p>
Parse iCal file(-s) or string/array <strong>calendar</strong> content into a single vcalendar object (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 "allow_url_fopen" is enabled, remote files, URLs; protocol "http" ("webcal"), are supported. A remote file, URL, <b>must</b> be prefixed by "http://" ("webcal://") 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 parse error occurs (like file access error, invalid <strong>calendar</strong> file or <strong>calendar</strong> file without components), FALSE is returned.
</p>
<p class="label">Format</p>
<p class="format">parse( [ textToParse ] )</p>
<p class="comment">textToParse = (string) calendarContent
ex. result from - file_get_contents( "filename")
(array) calendarContent
ex. result from - file( "filename", FILE_IGNORE_NEW_LINES )</p>
<p class="label">parse example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se", "filename" => "file.ics");
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
.. .
</p>
<p class="label">parse example 2</p>
<p class="example">
$config = array( "unique_id" => "kigkonsult.se",
"url" => "http://www.ical.net/calendars/calendar.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
.. .
</p>
<p class="label">parse example 3</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"url" => "http://www.ical.net/calendars/calendar.ics" );
$vcalendar = new vcalendar( $config );
...
$str = array(
"BEGIN:VCALENDAR",
"PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.12//",
"VERSION:2.0",
"BEGIN:VEVENT",
"DTSTART:20101224T190000Z",
"DTEND:20101224T200000Z",
"DTSTAMP:20101020T103827Z",
"UID:20101020T113827-hide@address.com",
"DESCRIPTION:example",
"END:VEVENT",
"END:VCALENDAR");
$vcalendar->parse( $str );
...
</p>
<p class="label">merge example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import" );
$vcalendar = new vcalendar( $config );
$vcalendar->setConfig( "filename", "file1.ics" );
$vcalendar->parse();
$vcalendar->setConfig( "filename", "file2.ics" );
$vcalendar->parse();
$vcalendar->sort();
$vcalendar->setConfig( "directory", "export" );
$vcalendar->setConfig( "filename", "icalmerge.ics" );
$vcalendar->saveCalendar();
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_inputoutput_functions">[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">createCalendar()</p>
<p class="label">Example</p>
<p class="example">.. .
$str = $vcalendar->createCalendar();
echo $str;
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_inputoutput_functions">[up]</a>
<a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
<p>
Redirect <strong>calendar</strong> content to user browser. Filename, addressed to browser, is automatically generated if missing or not set;<br>
<span class="format">$filename = date( "YmdHis" ).".ics" </span>.
</p>
<p class="label">Format</p>
<p class="format">returnCalendar( [ utf8Encode [, gzip ]] )</p>
<p class="comment">utf8Encode = (bool) TRUE: utf8 encoded output, FALSE: (default) no encoding
gzip = (bool) TRUE: gzip compressed output
Header "Content-Length" only sent when gzip=TRUE
FALSE: (default) no compressing</p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
.. .
$vevent = & $vcalendar->newComponent( "vevent" );
$vevent->setProperty( "dtstart", array( "year" => 2007
, "month" => 4
, "day" => 1
, "hour" => 19 ));
$vevent->setProperty( "duration", 0, 0, 3 ));
$vevent->setProperty( "LOCATION", "Central Plaza" );
$vevent->setProperty( "summary", "PHP summit" );
.. .
$vcalendar->returnCalendar();
</p>
<p class="label">Example 2</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$utf8Encode = TRUE;
$hacPar = "HTTP_ACCEPT_ENCODING";
if( isset( $_SERVER[$hacPar] ) &&
( FALSE !== strpos( strtolower( $_SERVER[$hacPar] ), "gzip" )))
$gzip = TRUE;
else
$gzip = FALSE;
$vcalendar->returnCalendar( $utf8Encode, $gzip );
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_inputoutput_functions">[up]</a>
<a name="saveCalendar"></a><h4>3.1.4.4 saveCalendar</h4>
<p>
Save ical <strong>calendar</strong> in a file, uses present directory if directory not set, filename is automatically generated if missing or not set;<br>
<span class="format">$filename = date( "YmdHis" ).".ics" </span>.
</p>
<p>Directory/filename <b>must</b> be writeable, delimiter default <em>PHP</em> constant DIRECTORY_SEPARATOR.</p>
<p>If file error occurs, FALSE is returned.</p>
<p class="label">Format</p>
<p class="format">saveCalendar ( [ directory [, filename [, delimiter ]]] )</p>
<p class="comment">directory = (string) directory, default FALSE
filename = (string file name, default FALSE
delimiter = (string) path directory/filename separator, default FALSE</p>
Parameters for <span class="format">directory/filename/delimiter</span>, kept for backward compatibility,
may be removed i future versions. Recommendation is to use <span class="format">setConfig</span>, Se
example below.
<p class="label">Example</p>
<p class="example">.. .
$vcalendar->setConfig( array( "directory" => "depot",
"filename" => "calendar.ics" ));
$result = $vcalendar->saveCalendar();
if( !$result )
echo "error when saving.. ."
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_inputoutput_functions">[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>
(if created in function <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 href="#VTIMEZONE">VTIMEZONE</a> component is always placed first in chain, including
<a href="#VTIMEZONE">STANDARD</a> / <a href="#VTIMEZONE">DAYLIGHT</a> 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>).
<a href="#VALARM">ALARM</a> sub-components, if exists, are not sorted.
</p>
<p class="format">sort()</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$vcalendar->sort();
$vcalendar->returnCalendar();
</p>
<p class="label">Format 2</p>
<p>Sort created/parsed <strong>calendar</strong> components on specific property values and ascending order.</p>
<p class="format">sort( sortArgument )</p>
<p class="comment">sortArgument: (string) "<a href="#ATTENDEE">ATTENDEE</a>" / "<a href="#CATEGORIES">CATEGORIES</a>" / "<a href="#DTSTAMP">DTSTAMP</a>" /
"<a href="#LOCATION">LOCATION"</a>" / "<a href="#ORGANIZER">ORGANIZER</a>" / "<a href="#RESOURCES">RESOURCES</a>" /
"<a href="#PRIORITY">PRIORITY</a>" / "<a href="#STATUS">STATUS</a>" / "<a href="#SUMMARY">SUMMARY</a>".
For a property where multiple occurrence may exist
(<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#RESOURCES">RESOURCES</a>)
lowest (alphabetic) value is used as sort parameter.</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_inputoutput_functions">[up]</a>
<a name="useCachedCalendar"></a><h4>3.1.4.6 useCachedCalendar</h4>
<p>
If recent version of local (non-empty and saved) <strong>calendar</strong> file exists, an HTTP redirect header is sent otherwise FALSE is returned.
</p>
<p class="label">Format</p>
<p class="format">useCachedCalendar( [ timeout ] )</p>
<p class="format">useCachedCalendar( [ directory [, filename [, delimiter [, timeout ]]]] )</p>
<p class="comment">directory = (string) directory, default FALSE
filename = (string file name, default FALSE
delimiter = (string) path directory/filename separator, default FALSE
timeout = (int) default 3600 sec
Second format with parameters for <span class="format">directory/filename/delimiter</span>,<br>kept for backward compatibility, may be removed i future<br>versions. Recommendation is to use <span class="format">setConfig</span>, Se example below.</p>
<p class="label">Example</p>
<p class="example">.. .
$vcalendar->setConfig( "directory", "depot" );
$vcalendar->setConfig( "filename", "calendar.ics" );
$vcalendar->useCachedCalendar();
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_inputoutput_functions">[up]</a>
<a name="Calendar_configuration_functions"></a><h3>3.1.5 Calendar configuration functions</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"> </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"> </td>
<td class="bl bb ref"> </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"> </td>
<td class="bl bb ref"> </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"> </td>
<td class="bl bb ref"> </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"> </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"> </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"> </td>
<td class="bl bb ref"> </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"> </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"> </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"> </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"> </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"> </td>
<td class="bl bb ref"> </td>
</tr>
</table>
<br>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="getConfig"></a><h4>3.1.5.2 getConfig</h4>
<p class="format">getConfig( [ key ] )</p>
<p class="comment">key = (string) config key</p>
<p class="label">Example 1</p>
<p class="example">.. .
$filename = $vcalendar->getConfig( "filename" );
.. .</p>
In this example, notice <a href="#Filename">Filename</a>
<br>
<p class="label">Example 2</p>
<p class="example">.. .
$config = $vcalendar->getConfig();
.. .</p>
<p class="comment">Output= array( string key => mixed value
*[, string key => mixed value] )</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="initConfig"></a><h4>3.1.5.3 calendar/component initialization</h4>
<p class="label">Format</p>
<p>When creating a new <strong>calendar</strong>.</p>
<p class="format">vcalendar( [ config ] )</p>
<p class="comment">config = (array) ( key => value *[, key => value] )
key = (string) config key
value = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
.. .
</p>
<p>When creating a new <strong>calendar</strong> component.</p>
<p class="format">component( [ config ] )</p>
<p class="comment">config = (array) ( key => value *[, key => value] )
key = (string) config key
value = (mixed) config value</p>
<p class="label">Example 2</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vevent = new vevent( $config );
.. .
</p>
<p class="label">Example 3</p>
<p class="example">. ..
$config = $vcalendar->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="#Calendar_configuration_functions">[up]</a>
<a name="setConfig"></a><h4>3.1.5.4 setConfig</h4>
<p>A successful "setConfig" returns TRUE.</p>
<p class="label">Format 1</p>
<p class="format">setConfig( [ config ] )</p>
<p class="comment">config = (array) ( key => value *[, key => value] )
key = (string) config key
value = (mixed) config value</p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar();
$vcalendar->setConfig( $config );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vevent = new vevent();
$vevent->setConfig( $config );
.. .
</p>
<p class="label">Format 2</p>
<p class="format">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">$vcalendar = new vcalendar();
$vcalendar->setConfig( "directory", "depot" );
.. .
</p>
<p class="label">Example 2</p>
<p class="example">$vevent = new vevent();
$vevent->setConfig( "unique_id", "kigkonsult.se" );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="allowEmpty"></a><h4>3.1.5.5 Allow empty components</h4>
<p>
Allow or reject empty <strong>calendar</strong> properties, default allow (TRUE). Used in <a href="#createCalendar">createCalendar</a>, <a href="#returnCalender">returnCalender</a> or
create<Property> methods, creating rfc2445 formats.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="Compsinfo"></a><h4>3.1.5.6 Component information</h4>
<p>Only to use with function getConfig.</p>
<p>
Get information about <strong>calendar</strong> components. Returns array with basic information
about all components (in array format) within <strong>calendar</strong>.
</p>
<p class="comment">Output = array ( *compinfo )
compinfo = array ( "ordno" => int ordno,
// <span class="ref">order number (1st=1, 2nd=2..)</span>
, "type" => string type
// <span class="ref">component type (vevent, vtodo.. .</span>
, "uid" => string uid
// <span class="ref">component <a href="#UID">UID</a> (not for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a>)</span>
, "props" =>
array( *[ propertyName => Property count ])
// <span class="ref">for every set property</span>
, "sub" => array( *compinfo ))
// <span class="ref">if subcomponents exists, an array for each subcomponent</span></p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$compsinfo = $vcalendar->getConfig( "compsinfo" );
foreach( $compsinfo as compinfo) {
echo " order number : ".$compinfo["ordno"]."<br />";
echo " type : ".$compinfo["type"]."<br />";
echo " UID : ".$compinfo["uid"]."<br />";
foreach( $compinfo["props"] as $propertyName => $propertyCount )
echo " $propertyName = $propertyCount";
if( is_array( $compinfo["sub"] )) {
foreach( $compinfo["sub"] as $subcompinfo ) {
echo " order number : ".$subcompinfo["ordno"]."<br />";
/* .. dito if subcomponents exists .. . */
}
}
}
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[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="#Calendar_configuration_functions">[up]</a>
<a name="Directory"></a><h4>3.1.5.8 Directory</h4>
<p>Local directory to store/read iCal files, default "<b>.</b>".</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 any previously set <a href="#configURL">URL</a> is removed.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="Fileinfo"></a><h4>3.1.5.9 Fileinfo</h4>
<p>
Only available in function 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">$fileinfo = $vcalendar->getConfig( "fileinfo" );</p>
<p class="comment">output = array( <directory>, <filename>, <filesize> )</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="Filename"></a><h4>3.1.5.10 Filename</h4>
<p>iCal local file name, default created like (if not set):</p>
<p class="format">$filename = date( "YmdHis" ).".ics";</p>
<p class="format">$filename = date( "YmdHis" ).".xml"; <span class="comment"> // if <a href="#Format">format</a> set to "xcal"</span></p>
<p>
If not set, filename is created when requested, ex. in functions <a href="#saveCalendar">saveCalendar</a> or getConfig("filename").
</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>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="Filesize"></a><h4>3.1.5.11 Filesize</h4>
<p>
Only when getting configuration (using function getConfig).<br>
Returns the size of the file in bytes, to be called<br>
- after "saveCalendar()"<br>
or<br>
- after a "setConfig( "directory" / "filename" )" and before/after "parse()".<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="#Calendar_configuration_functions">[up]</a>
<a name="Format"></a><h4>3.1.5.12 Format</h4>
<p>Format for <strong>calendar</strong> output, "iCal"/"xCal", any case.</p>
<p>
"iCal" is default (rfc2445), "xCal" force xml formatted output, according to<br>
"draft-ietf-calsch-many-xcal-01.txt" (now obsolete).
</p>
<p>
For converting to and from XML, according to rfc6321, "xCal: The XML Format for <strong>iCalendar</strong>", use functions<br>
- <a href="#iCal2XML">iCal2XML</a> converts an iCalcreator instance to XML<br>
- <a href="#XML2iCal">XML2iCal</a> converts XML (string/file) to an icalcreator instance.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="Language"></a><h4>3.1.5.13 Language</h4>
<p>Language for <strong>calendar</strong> and component TEXT value properties as defined in [RFC 1766].</p>
<p>
If NOT set in TEXT property parameters, language from "setConfig( "language", .." at component level will be used, if set,
otherwise language from "setConfig( "language", .." at <strong>calendar</strong> level will be used, if set.
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="NewlineChar"></a><h4>3.1.5.14 NewlineChar</h4>
<p>Character(s) used for carriage return + line feed (CR+LF), default "\r\n".</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="dTZID"></a><h4>3.1.5.15 TZID</h4>
<p>
Default (local?) 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> (auto completion).
Note, some <strong>calendar</strong> software also require <a href="#Additional_Descriptors">X-WR-TIMEZONE</a> on calendar level and <a href="#Additional_Descriptors">X-LIC-LOCATION</a> in vtimezone component
(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="#Calendar_configuration_functions">[up]</a>
<a name="Unique_id"></a><h4>3.1.5.16 Unique_id</h4>
<p>
"Unique_id" is used in property PRODID at <strong>calendar</strong> level and <a href="#UID">UID</a> at component level, both created automatically, if not set 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["SERVER_NAME"] )
when running in a web server environment or "localhost" when using command line interface.
Used when setting other (domain) name than server name.
</p>
<p>
The property PRODID (at <strong>calendar</strong> level) is always recreated when setting unique_id.
</p>
<p>
If missing, the property <a href="#UID">UID</a> at component level is created at first use of functions <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 when creating a new vcalendar or component object,
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="#Calendar_configuration_functions">[up]</a>
<a name="configURL"></a><h4>3.1.5.17 URL</h4>
<p>
When reading remote files with URL (using the <a href="#parse">parse()</a> method),
only protocol "http" ("webcal") is supported,
i.e. URL <b>must</b> be prefixed by "http://" ("webcal://") and suffixed by a valid filename.
</p>
<p>
When setting URL, any previously set Directory is removed.<br>
The URL filename part can be retrieved by - getConfig( "filename" ).
</p>
<p>
When storing a remote iCal file locally, only directory need to be set,
filename remains unchanged (i.e. 1. set URL, 2. parse, 3. set directory, 4. saveCalendar).
</p>
<p class="label">Example</p>
<p>Parse of rempte file, then local save in "depot" folder, using original filename</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"url", "http://www.iCal.net/depot/calendar.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$vcalendar->sort();
.. .
.. .
$vcalendar->setConfig( "directory", "depot" );
$vcalendar->saveCalendar();</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_configuration_functions">[up]</a>
<a name="Calendar_component_object_property_function_list"></a><h2>3.2 Calendar component object property function list</h2>
<p>
All <strong>calendar</strong> component property functions 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 "January 1 1970 00:00:00 GMT" may force a <em>PHP</em> date function to generate an error or set date to "January 1 1970".
</p>
<a name="deleteProperty_PROP"></a><h3>3.2.1 deleteProperty</h3>
Generic <strong>calendar</strong> delete property function,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">deleteProperty( [ PropName [, order ] )</p>
<p class="comment">propName = (string) case independent, rfc2445 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.</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$e = $vcalendar->getComponent( "vevent" );
while( $e->deleteProperty( "comment" ))
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>
<p>Generic get property function, 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="label">Format</p>
<p class="format">getProperty( PropName [, order [, complete ]] )</p>
<p class="comment">propName = (string) case independent, rfc2445 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("value" => <value>
,"params"=> <parameter array>)</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"directory" => "import",
"filename" => "file.ics" );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $vevent = $vcalendar->getComponent( "vevent" )) {
$dtstart = $vevent->getProperty( "dtstart" ); // <span class="ref">one occurrence</span>
$description = $vevent->getProperty( "description" ); // <span class="ref">one occurrence</span>
while( $comment = $vevent->getProperty( "comment" )) {
// <span class="ref">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 strict rfc2445 component property text and/or ALARMs.</p>
<p>A rfc2445 strict formatted property text, in string or array format and starting with property name.</p>
<p>
Complete <a href="#VALARM">ALARM</a>s, all properties included, in array format and
first array row as "BEGIN:VALARM", last as "END:VALARM"
as well as <a href="#VTIMEZONE">TIMEZONE</a> and standard/daylight subcomponents.
</p>
<p>FALSE is returned if (read-file) problems occur.</p>
<p class="label">Format</p>
<p class="format">parse( propertyText )</p>
<p class="comment">propertyText = (string) rcf2445 formatted property,
(array) rcf2445 formatted properties,
property name <b>must</b> start string / rows(-s)</p>
<p class="label">example</p>
<p class="example">.. .
$vevent = & $vcalendar->newComponent( "vevent" );
$e->parse( "DTSTAMP:19970324T1200Z" );
$e->parse( "SEQUENCE:0" );
$e->parse( "ORGANIZER:MAILTO:hide@address.com" );
$e->parse( array(
"ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com",
"ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com",
"ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com",
"ATTENDEE;RSVP=TRUE:MAILTO:hide@address.com" ));
$e->parse( "DTSTART:19970324T123000Z" );
$e->parse( "DTEND:19970324T210000Z" );
$e->parse( "CATEGORIES:MEETING,PROJECT" );
$e->parse( "CLASS:PUBLIC" );
$e->parse( "SUMMARY:Calendaring Interoperability Planning Meeting" );
$e->parse( "STATUS:DRAFT" );
$e->parse( array(
"DESCRIPTION:Project xyz Review Meeting Minutes"
,"Agenda"
,"1. Review of project version 1.0 requirements."
,"2. Definition of project processes."
,"3. Review of project schedule."
,"Participants: John Smith, Jane Doe, Jim Dandy"
,"- It was decided that the requirements need to be signed off by ".
"product marketing."
,"- Project processes were accepted."
,"- Project schedule needs to account for scheduled holidays and employee".
" vacation time. Check with HR for specific dates."
,"- New schedule will be distributed by Friday."
,"- Next weeks meeting is cancelled. No meeting until 3/23." ));
$e->parse( "LOCATION:LDB Lobby" );
$e->parse(
"ATTACH;FMTTYPE=application/postscript:ftp://xyz.com/pub/conf/bkgrnd.ps" );
$e->parse( array(
"BEGIN:VALARM",
"ACTION:AUDIO",
"TRIGGER;VALUE=DATE-TIME:19970224T070000Z",
"ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud",
"REPEAT:4",
"DURATION:PT1H",
"X-alarm:non-standard ALARM property",
"END:VALARM" ));
$e->parse(
"X-xomment:non-standard property will be displayed, comma escaped");
.. .
</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 set property function, simplifying insert of component 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">setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
<p class="comment">propName = (string) case independent, rfc2445 component property names,
unknown propName will be regarded as <a href="#X-PROPERTY_PROP">X-property</a>.
Proparg_n = (mixed) property content</p>
<p class="label">Example</p>
<p class="example">$vevent = & $vcalendar->newComponent( "vevent" );
$vevent->setProperty( "dtstart"
, array("year"=>2007,"month"=>4,"day"=>1,"hour"=>19));
$vevent->setProperty( "duration", 0, 0, 3 ));
$vevent->setProperty( "LOCATION", "Central Plaza" );
$vevent->setProperty( "summary", "PHP summit" );
.. .
</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> "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE". This property is REQUIRED and MUST NOT occur more than once.
</p>
<h5>Create ACTION</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createAction()</p>
<p class="label">Example</p>
<p class="example">$component->createAction();</p>
<h5>Delete ACTION</h5>
<p>Remove ACTION from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "Action" )</p>
<p class="label">Example</p>
<p class="example">$valarm->deleteProperty( "Action" );</p>
<h5>Get ACTION</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "Action" )</p>
<p class="comment">output = actionValue <span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "Action", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => actionValue<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$action = $valarm->getProperty( "action" );</p>
<h5>Set ACTION</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "Action", actionValue [, xparams ] )</p>
<p class="comment">actionValue<span class="ref">1</span> = (string) one of "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE"
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$valarm->setProperty( "action", "DISPLAY" );</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 "ALARM" ("ACTION" "procedure"),
OPTIONAL and MUST NOT occur more than once in an "ALARM" ("ACTION" "audio") 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> ("ACTION" "email") 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 <span class="ref">2</span>).
</p>
<p>
If using other parameters than the recommended "FMTTYPE" and the mandatory "ENCODING" (="BASE64")and "VALUE" (="BINARY")
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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createAttach()</p>
<p class="label">Example</p>
<p class="example">$component->createAttach();</p>
<h5>Delete ATTACH</h5>
<p>Remove ATTACH from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "ATTACH" )</p>
<p class="label">Example 1</p>
<p class="example">$valarm->deleteProperty( "ATTACH" );</p>
<p class="label">Example 2</p>
Delete ATTACH property no 2.
<p class="format">$valarm->deleteProperty( "ATTACH", 2 );</p>
<p class="label">Example 3</p>
Deleting all ATTACH properties.
<p class="example">while( $valarm->deleteProperty( "ATTACH" ))
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">getProperty( "Attach" )</p>
<p class="comment">output = attachValue<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "ATTACH", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value,
<p class="comment">output = array( "value" => attachValue<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "Attach", 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">$attach = $valarm->getProperty( "attach" );</p>
<h5>Set ATTACH</h5>
<p>Insert property value. Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "attach", attachValue<span class="ref">1</span> [, params [, propOrderNo ]] )</p>
<p class="comment">attachValue<span class="ref">1</span> = (string) URI / inline binary encoded content
params<span class="ref">2</span> = (array ) ( [ "ENCODING" => "BASE64", "VALUE" => "BINARY" ]
[, "FMTTYPE" => contentType ]
[, xparams ] )
contentType = (string) The parameter value MUST be the TEXT for either an IANA
registered content type or a non-standard content type.
xparams = (array) (*[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "attach"
, "ftp://domain.com/pub/docs/agenda.doc"
, array( "FMTTYPE" => "application/binary" ));</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 ("ACTION" "email"), 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>
<h5>Create ATTENDEE</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createAttendee()</p>
<p class="label">Example</p>
<p class="example">$component->createAttendee();</p>
<h5>Delete ATTENDEE</h5>
<p>Remove ATTENDEE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "ATTENDEE" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) ATTENDEE property</p>
<p class="example">$valarm->deleteProperty( "ATTENDEE" );</p>
<p class="label">Example 2</p>
<p>Delete ATTENDEE property no 2.</p>
<p class="example">$valarm->deleteProperty( "ATTENDEE", 2 );</p>
<p class="label">Example 3</p>
Deleting all ATTENDEE properties.
<p class="example">while( $valarm->deleteProperty( "ATTENDEE" ))
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">getProperty( "Attendee" )</p>
<p class="comment">output = attendeeValue <span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "ATTENDEE", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => attendeeValue<span class="ref">1</span>
, "params" => array( params<span class="ref">2</span> ))</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "ATTENDEE", propOrderNo )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = attendeeValue<span class="ref">1</span></p>
<p class="label">Example</p>
<p class="example">$attendee = $valarm->getProperty( "attendee" );</p>
<h5>Set ATTENDEE</h5>
<p>
Insert property value. If exist, default parameter values are removed after input (params<span class="ref">2</span>).
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738 ), if missing, "mailto:" is set (ex. 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 "mailto:", prefixed if missing (ex. indicating an internet mail address).
</p>
<p>Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "attendee", attendeeValue [, params [, propOrderNo ]] )</p>
<p class="comment">attendeeValue<span class="ref">1</span> = (string) a <strong>calendar</strong> user address, a URI as defined by
[RFC 1738] or any other IANA registered form
for a URI.
params<span class="ref">2</span> = (array) ( [CUTYPE] [,MEMBER] [,ROLE] [,PARTSTAT]
[,RVSP] [,DELEGATED-TO] [,DELEGATED-FROM]
[,SENT-BY] [,CN] [,DIR] [,LANGUAGE]
[,xparams] )
CUTYPE = "CUTYPE" => "INDIVIDUAL"
(An individual, <b>Default</b>)
/ "GROUP"
(A group of individuals)
/ "RESOURCE"
(A physical resource)
/ "ROOM"
(A room resource)
/ "UNKNOWN"
(Otherwise not known)
/ (string) x-name
(Experimental type)
/ iana-token
(string) (Other IANA registered type)
MEMBER = "MEMBER" => array( *[ (string) "single member
of the group or list membership"])
ROLE = "ROLE" => "CHAIR"
(Indicates chair of the <strong>calendar</strong>
entity)
/ "REQ-PARTICIPANT"
(required participation, <b>Default</b>)
/ "OPT-PARTICIPANT"
(optional participation)
/ "NON-PARTICIPANT"
(information purposes only)
/ (string) x-name
(Experimental role)
/ (string) iana-token
(Other IANA role)
PARTSTAT = "PARTSTAT" => "NEEDS-ACTION"
(Event needs action, <b>Default</b>)
/ "ACCEPTED"
(Event accepted)
/ "DECLINED"
(Event declined)
/ "TENTATIVE"
(Event tentatively accepted)
/ "DELEGATED"
(Event delegated)
/ "NEEDS-ACTION"
(To-do needs action, <b>Default</b>)
/ "ACCEPTED"
(To-do accepted)
/ "DECLINED"
(To-do declined)
/ "TENTATIVE"
(To-do tentatively accepted)
/ "DELEGATED"
(To-do delegated)
/ "COMPLETED"
(To-do completed.
<a href="#COMPLETED">COMPLETED</a> property
has date/time completed)
/ "IN-PROCESS"
(To-do in process of being completed)
/ "NEEDS-ACTION"
(Journal needs action, <b>Default</b>)
/ "ACCEPTED"
(Journal accepted)
/ "DECLINED"
(Journal declined)
/ (string) x-name
(Experimental status)
/ (string) iana-token
(Other IANA registered status)
RSVP = "RSVP" => (string) "TRUE"
/ "FALSE", <b>Default</b> (reply expectation)
DELEGATED-TO = "DELEGATED-TO" => array(*[(string) "single <strong>calendar</strong> user
to specified by the property
has delegated participation"])
DELEGATED-FROM = "DELEGATED-FROM" => array( *[ (string) "single <strong>calendar</strong> user that
have delegated their
participation to the
<strong>calendar</strong> user specified
by the property" ] )
SENT-BY = "SENT-BY" => (string) single <strong>calendar</strong> user that is
acting on behalf
of the <strong>calendar</strong> user
specified by the property"
LANGUAGE = "LANGUAGE" => (string) "language for text values in CN parameter"
CN = "CN" => (string) "common name to be associated with the <strong>calendar</strong>
user specified by the property"
DIR = "DIR" => (string) "reference to a directory entry associated with
the <strong>calendar</strong> user specified by the property"
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</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">$vevent->setProperty( "attendee"
, "hide@address.com"
$vevent->setProperty( "attendee"
, "hide@address.com"
, array( "cutype" => "INDIVIDUAL"
, "member" => array( "hide@address.com"
, "hide@address.com"
, "hide@address.com" )
, "role" => "CHAIR"
, "PARTSTAT" => "ACCEPTED"
, "RSVP" => "TRUE"
, "DELEgated-to" => array( "hide@address.com"
, "hide@address.com"
, "hide@address.com" )
, "delegateD-FROM" =>array( "hide@address.com"
, "hide@address.com")
, "SENT-BY" => "hide@address.com"
, "LANGUAGE" => "us-EN"
, "CN" => "John Doe"
, "DIR" => "http://www.ical.net/info.doc"
, "x-agenda" => "status reports" <span class="comment">// xparam</span>
, "x-length" => "15 min" )); <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.<br><br>
The value type for CATEGORIES is TEXT.
</p>
<h5>Create CATEGORIES</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createCategories()</p>
<p class="label">Example</p>
<p class="example">$component->createCategories();</p>
<h5>Delete CATEGORIES</h5>
<p>Remove CATEGORIES from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "CATEGORIES" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) CATEGORIES property</p>
<p class="example">$vevent->deleteProperty( "CATEGORIES" );</p>
<p class="label">Example 2</p>
<p>Delete CATEGORIES property no 2.</p>
<p class="example">$vevent->deleteProperty( "CATEGORIES", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all CATEGORIES properties.</p>
<p class="example">while( $vevent->deleteProperty( "CATEGORIES" ))
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">getProperty( "CATEGORIES" )</p>
<p class="comment">output = categoryValue<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "CATEGORIES", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => categories<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "CATEGORIES", 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">$categories = $valarm->getProperty( "categories" );</p>
<h5>Set CATEGORIES</h5>
<p>Insert property value. Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "categories", categories [, params [, propOrderNo ]] )</p>
<p class="comment">categories<span class="ref">1</span> = (string) categoryValue / (array) ( *categoryValue )
categoryValue<span class="ref"> </span>= (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<span class="ref">2</span> = (array) ( ["LANGUAGE" => (string) "<lang>"][, xparams] )
xparams<span class="ref"> </span> = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo<span class="ref"> </span> = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "categories", "project_x" );</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createClass()</p>
<p class="label">Example</p>
<p class="example">$component->createClass();</p>
<h5>Delete CLASS</h5>
<p>Remove CLASS from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "CLASS" )</p>
<p class="label">Example</p>
<p class="example">$vjournal->deleteProperty( "CLASS" );</p>
<h5>Get CLASS</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "CLASS" )</p>
<p class="comment">output = classValue<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "CLASS", FALSE , TRUE )</p>
<p class="comment">output = array "value" => classValue<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$class = $valarm->getProperty( "class" );</p>
<h5>Set CLASS</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "class", classvalue [, xparams ] )</p>
<p class="comment">classvalue<span class="ref">1</span> = "PUBLIC"
/ "PRIVATE"
/ "CONFIDENTIAL"
/ (string) iana-token
/ (string) x-name
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "class", "CONFIDENTIAL" );</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createComment()</p>
<p class="label">Example</p>
<p class="example">$component->createComment();</p>
<h5>Delete COMMENT</h5>
<p>Remove COMMENT from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "COMMENT" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) COMMENT property</p>
<p class="example">$vevent->deleteProperty( "COMMENT" );</p>
<p class="label">Example 2</p>
<p>Delete COMMENT property no 2.</p>
<p class="example">$vevent->deleteProperty( "COMMENT", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all COMMENT properties.</p>
<p class="example">while( $vevent->deleteProperty( "COMMENT" ))
continue;</p>
<h5>Get COMMENT</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "COMMENT" )</p>
<p class="comment">output = commentValue<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "COMMENT", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => commentValue<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "COMMENT", 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">$comment = $vevent->getProperty( "comment" );</p>
<h5>Set COMMENT</h5>
<p>Insert property value. Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "comment", commentValue [, params [, propOrderNo ]] )</p>
<p class="comment">commentValue<span class="ref">1</span> = (string) Value type Text
params<span class="ref">2</span> = (array) (
[ "ALTREP" => (string) "<an alternate text representation, URI>"]
[, "LANGUAGE" => (string) "<lang>"]
[, xparams ] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "comment", "this is a comment" );</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>
<h5>Create COMPLETED</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createCompleted()</p>
<p class="label">Example</p>
<p class="example">$component->createCompleted();</p>
<h5>Delete COMPLETED</h5>
<p>Remove COMPLETED from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "COMPLETED" )</p>
<p class="label">Example</p>
<p class="example">$vtodo->deleteProperty( "COMPLETED" );</p>
<h5>Get COMPLETED</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "COMPLETED" )</p>
<p class="comment">output = completedDate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "COMPLETED", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => completedDate<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$completed = $vtodo->getProperty( "completed" );</p>
<h5>Set COMPLETED</h5>
<p>
Insert property value. Input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or,
if "offset" 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 class="label">Format</p>
<p class="format">setProperty( "completed", completedDate [, xparams ] )</p>
<p class="comment">completedDate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
, "tz" => offset ]] )
completedDate = (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec ]
completedDate = (array) ( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, offset ]] )
completedDate = (array) ( "timestamp" => (int) timestamp [, "tz" => offset])
completedDate = (string) date/datetime string<span class="ref">*</span>
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se");
$vcalendar = new vcalendar( $config );
$vtodo = & $vcalendar->newComponent( "vtodo" );
.. .
$vtodo->setProperty( "completed", 2006, 8, 10, 10, 0, 0 );
// <span class="ref">10 august 2006 10.00 UTC</span></p>
<p class="label">Example 2</p>
<p class="example">$date = array("year" => 2006, "month" => 10, "day" => 10,
"hour" => 10, "min" => 0, "sec" => 0, "tz" => "+0200");
// <span class="ref">local date + UTC offset => <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a>DATE-TIME</span>
$vtodo->setProperty( "completed", $date );</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>
<h5>Create CONTACT</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createContact()</p>
<p class="label">Example</p>
<p class="example">$component->createContact();</p>
<h5>Delete CONTACT</h5>
<p>Remove CONTACT from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "CONTACT" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) CONTACT property<p>
<p class="example">$vevent->deleteProperty( "CONTACT" );</p>
<p class="label">Example 2</p>
<p>Delete CONTACT property no 2.</p>
<p class="example">$vevent->deleteProperty( "CONTACT", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all CONTACT properties.</p>
<p class="example">while( $vevent->deleteProperty( "CONTACT" ))
continue;</p>
<h5>Get CONTACT</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "CONTACT" )</p>
<p class="comment">output = contactValue<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "CONTACT", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => contactValue<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "CONTACT", 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">$contact = $vevent->getProperty( "contact" );</p>
<h5>Set CONTACT</h5>
<p>Insert property value. Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "contact", contactValue [, params [, propOrderNo ]] )</p>
<p class="comment">contactValue<span class="ref">1</span> = (string) Value type TEXT
params<span class="ref">2</span> = (array) (
[ "ALTREP" => (string) "<an alternate text representation, URI>"]
[, "LANGUAGE" => (string) "<lang>"]
[, xparams] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$c->setProperty( "contact", "tel 012-34 56 789" )</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createCreated()</p>
<p class="label">Example</p>
<p class="example">$component->createCreated();</p>
<h5>Delete CREATED</h5>
<p>Remove CREATED from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "CREATED" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "CREATED" );</p>
<h5>Get CREATED</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "CREATED" )</p>
<p class="comment">output = createdDate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "CREATED", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => createdDate<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$created = $vevent->getProperty( "CREATED" );</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 "offset" 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 class="label">Format</p>
<p class="format">setProperty( "created", [ createdDate [, xparams ]] )</p>
<p class="comment">createdDate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
, "tz" => 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) ( "timestamp" => (int) timestamp [, "tz" => offset ])
createdDate = (string) date/datetime string<span class="ref">*</span>
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
xparams<span class="ref">2</span> = array( *[ (string) xparamkey => (string) xparamvalue ] )
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtodo = & $vcalendar->newComponent( "vtodo" );
.. .
$vtodo->setProperty( "created", 2006, 8, 11, 14, 30, 35 );
// <span class="ref">11 august 2006 14.30.35 UTC</span> </p>
<p class="label">Example 2</p>
<p class="example">$date = array("year" => 2006, "month" => 10, "day" => 10,
"hour" => 10, "min" => 0, "sec" => 0, "tz" => "+0200");
// <span class="ref">local date + UTC offset => <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
$vtodo->setProperty( "created", $date );
.. .</p>
<p class="label">Example 3</p>
<p class="example">$vevent->setProperty( "created" );
// <span class="ref">current UTC date-time is set if called 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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createDescription()</p>
<p class="label">Example</p>
<p class="example">$component->createDescription();</p>
<h5>Delete DESCRIPTION</h5>
<p>Remove DESCRIPTION from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "DESCRIPTION" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) DESCRIPTION property.</p>
<p class="example">$vevent->deleteProperty( "DESCRIPTION" );</p>
<p class="label">Example 2</p>
<p>Delete DESCRIPTION property no 2.</p>
<p class="example">$vjournal->deleteProperty( "DESCRIPTION", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all DESCRIPTION properties.</p>
<p class="example">while( $vjournal->deleteProperty( "DESCRIPTION" ))
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">getProperty( "DESCRIPTION" )</p>
<p class="comment">output = descriptionValue<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "DESCRIPTION", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => descriptionValue<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$description = $vevent->getProperty( "description" );</p>
<h5>Set DESCRIPTION</h5>
<p>Insert property value.</p>
<br>
Parameters, if any, will be ordered as prescribed in rcf2445.
<p class="label">Format</p>
<p class="format">setProperty( "description", descriptionValue [, params [, propOrderNo ]] )</p>
<p class="comment">descriptionValue<span class="ref">1</span> = (string) Value type TEXT
params<span class="ref">2</span> = (array) (
[ "ALTREP" => (string) "<an alternate text representation, URI>"]
[, "LANGUAGE" => (string) "<lang>"]
[, xparams] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "description", "This is a description" );</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>
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 "all-day event" 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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createDtend()</p>
<p class="label">Example</p>
<p class="example">$component->createDtend();</p>
<h5>Delete DTEND</h5>
<p>Remove DTEND from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "DTEND" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "DTEND" );</p>
<h5>Get DTEND</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "DTEND" )</p>
<p class="comment">output = dtendDate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "DTEND", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => dtendDate<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$dtend = $vevent->getProperty( "dtend" );</p>
<h5>Set DTEND</h5>
<p>
Insert property value. If DATE value type is expected, "VALUE" = "DATE" <b>must</b> be set
(in params<span class="ref">2</span>) 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, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "dtend", dtendDate [, params<span class="ref">2</span> ] )
<p class="comment">dtendDate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
[, "tz" => 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) ( "timestamp" => (int) timestamp [,"tz" => tz])
dtendDate = (string) date/datetime string<span class="ref">*</span>
dtendDate : Within the "VFREEBUSY" <strong>calendar</strong> component,
the time MUST be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> time format.
tz = (string) <timezone identifier> / offset
(timezone will be used as tzidparam (below), if tzidparam not set)
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span> = (array) ([ tzidparam/datetimeparam/dateparam ] *[,xparams])
tzidparam = "TZID" => (string) <timezone identifier>
// <span class="ref">output as local date-time with timezone identifier</span>
// <span class="ref">if tzidparam="GMT"/"UTC" then</span>
// <span class="ref">output date-time are suffixed by 'Z'</span>
datetimeparam = "VALUE" => "DATE-TIME" // <span class="ref">default, output as date-time</span>
dateparam = "VALUE" => "DATE" // <span class="ref">output as DATE, ex. all-day event</span>
xparams = (string) xparamkey => (string) xparamvalue
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$vevent->setProperty( "dtend"
, 2006, 8, 11, 16, 30, 0 );
<span class="ref">// 11 august 2006 16.30.00 local date</span></p>
<p class="label">Example 2</p>
<p class="example">$vfreebusy->setProperty( "dtend"
, 2006, 8, 11, 16, 30, 0, "-040000" );
<span class="ref">// 11 august 2006 16.30.00 -040000 :
local date + UTC offset => <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span></p>
<p class="label">Example 3</p>
<p class="example">$vevent->setProperty( "dtend"
, array( "year" =>, 2006, "month" => 8, "day"=> 11 )
, array( "VALUE" => "DATE" ));
<span class="ref">// end of one or more all-day events</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 that 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>AUTOMATICALLY</b> GENERATED in iCalcreator.
</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 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>
<h5>Create DTSTAMP</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createDtstamp()</p>
<p class="label">Example</p>
<p class="example">$component->createDtstamp();</p>
<h5>Delete DTSTAMP</h5>
<p>
If DTSTAMP if removed from a component, DTSTAMP will automatically be recreated when output functions like createDtstamp (above),
<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">deleteProperty( "DTSTAMP" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "DTSTAMP" );</p>
<h5>Get DTSTAMP</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "DTSTAMP" )</p>
<p class="comment">output = dtstampDate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "DTSTAMP", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => dtstampDate<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$dtstamp = $vevent->getProperty( "dtstamp" );</p>
<h5>Set DTSTAMP</h5>
<p>
Insert property value. Input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or,
if "offset" 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 time zone.
</p>
<p class="label">Format</p>
<p class="format">setProperty( "dtstamp", dtstampDate [, xparams ] )</p>
<p class="comment">dtstampDate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
, "tz" => offset ]] )
dtstampDate = (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec ]
dtstampDate = (array) ( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, offset ]] )
dtstampDate = (array) ( "timestamp" => (int) timestamp [, "tz" => offset ])
dtstampDate = (string) (string) date/datetime string<span class="ref">*</span>
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
xparams<span class="ref">2</span> = array( *[ (string) xparamkey => (string) xparamvalue ] )
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtodo = & $vcalendar->newComponent( "vtodo" );
.. .
$vtodo->setProperty( "dstamp"
, 2006, 8, 11, 7, 30, 1 );
<span class="ref">// 11 august 2006 07.30.01 UTC</span></p>
<p class="label">Example 2</p>
<p class="example">$date = array("year" => 2006, "month" => 10, "day" => 10,
"hour" => 10, "min" => 0, "sec" => 0, "tz" => "+0200");
// <span class="ref">local date + UTC offset => <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
$vtodo->setProperty( "dtstamp", $date );
.. .</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 "all-day event" and using timeless dates, example (2007-12-01)<br>
DTSTART;VALUE=DATE:20071201<br>
DTEND;VALUE=DATE:20071202. // <span class="ref">opt., in effect midnight of the day <u>before</u> the date!!</span>
</p>
<h5>Create DTSTART</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createDtstart()</p>
<p class="label">Example</p>
<p class="example">$component->createDtstart();</p>
<h5>Delete DTSTART</h5>
<p>Remove DTSTART from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "DTSTART" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "DTSTART" );</p>
<h5>Get DTSTART</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "DTSTART" )</p>
<p class="comment">output = dtstartDate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "DTSTART", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => dtstartDate<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$dtstart = $vevent->getProperty( "dtstart" );</p>
<h5>Set DTSTART</h5>
<p>
Insert property value. If DATE value type is expected, "VALUE" = "DATE"
<b>must</b> be set (in params<span class="ref">2</span>) 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, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "dtstart", dtstartDate [, params ] )</p>
<p class="comment">dtstartDate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
[, "tz" => tz ]] )
dtstartDate = (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]]
dtstartDate = (array) ( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]] )
dtstartDate = (array) ("timestamp" => (int) timestamp [, "tz" => tz])
dtstartDate = (string) date/datetime string<span class="ref">*</span>
dtstartDate : Within the "VFREEBUSY" <strong>calendar</strong> component,
the dtstartDate MUST be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> time format.
tz = (string) <timezone identifier> / offset
(timezone will be used as tzidparam (below), if tzidparam not set)
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span> = (array) ([ tzidparam/datetimeparam/dateparam ] *[, xparams])
tzidparam = "TZID" => (string) <timezone identifier>
// <span class="ref">output as local date-time with timezone identifier</span>
// <span class="ref">if tzidparam="GMT"/"UTC" then</span>
// <span class="ref">output date-time are suffixed by 'Z'</span>
datetimeparam = "VALUE" => "DATE-TIME" // <span class="ref">default, output as date-time</span>
dateparam = "VALUE" => "DATE" // <span class="ref">output as DATE, ex. all-day event</span>
xparams = (string) xparamkey => (string) xparamvalue
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$vevent->setProperty( "dstart"
, 2006, 8, 11, 7, 30, 1 );
<span class="comment">// 11 august 2006 07.30.01 local date</span></p>
<p class="label">Example 2</p>
<p class="example">$vevent->setProperty( "dstart"
, 2006, 8, 11, 16, 30, 0, "-040000" );
<span class="comment">// 11 august 2006 16.30.00 -040000,
// local date + UTC offset => <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span></p>
<p class="label">Example 3</p>
<p class="example">$vevent->setProperty( "dtstart"
, array( "year" =>, 2006, "month" => 8, "day"=> 11 )
, array( "VALUE" => "DATE" ));
<span class="comment">// start of an all-day event, or a period of (entire) days</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="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>
<h5>Create DUE</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createDue()</p>
<p class="label">Example</p>
<p class="example">$component->createDue();</p>
<h5>Delete DUE</h5>
<p>Remove DUE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "DUE" )</p>
<p class="label">Example</p>
<p class="example">$vtodo->deleteProperty( "DUE" );</p>
<h5>Get DUE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "DUE" )</p>
<p class="comment">output = dueDate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "DUE", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => dueDate<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$due = $vtodo->getProperty( "due" );</p>
<h5>Set DUE</h5>
<p>
Insert property value. If DATE value type is expected, "VALUE" = "DATE" <b>must</b> be set
(in params<span class="ref">2</span>) 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, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "due", dueDate [, params ] )</p>
<p class="comment">dueDate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
[, "tz" => tz ]] )
dueDate = (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]]
dueDate = (array) ( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]] )
dueDate = (array) ( "timestamp" => (int) timestamp [, "tz" => tz])
dueDate = (string) date/datetime string<span class="ref">*</span>
tz = (string) <timezone identifier> / offset
(timezone will be used as tzidparam (below), if tzidparam not set)
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span> = (array) ([ tzidparam/datetimeparam/dateparam ] *[, xparams])
tzidparam = "TZID" => (string) <timezone identifier>
// <span class="ref">output as local date-time with timezone identifier</span>
// <span class="ref">if tzidparam="GMT"/"UTC" then</span>
// <span class="ref">output date-time are suffixed by 'Z'</span>
datetimeparam = "VALUE" => "DATE-TIME" // <span class="ref">default, output as date-time</span>
dateparam = "VALUE" => "DATE" // <span class="ref">output as DATE, "during the day"</span>
xparams = (string) xparamkey => (string) xparamvalue
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$vtodo->setProperty( "due"
, 2006, 8, 11, 18, 0, 0 );
<span class="comment">// 11 august 2005 18.00.00 local date</span></p>
<p class="label">Example 2</p>
<p class="example">$vtodo->setProperty( "due"
, 2006, 8, 11, 16, 30, 0, "-040000" );
<span class="comment">// 11 august 2006 16.30.00 -040000
// local date + UTC offset sets <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a>DATE-TIME</span></p>
<p class="label">Example 3</p>
<p class="example">$vtodo->setProperty( "due"
, array( "year" =>, 2006, "month" => 8, "day"=> 11 )
, array( "VALUE" => "DATE" ));
<span class="comment">// due "during the day"</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="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.<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>
<h5>Create DURATION</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createDuration()</p>
<p class="label">Example</p>
<p class="example">$component->createDuration();</p>
<h5>Delete DURATION</h5>
<p>Remove DURATION from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "DURATION" )</p>
<p class="label">Example</p>
<p class="example">$valarm->deleteProperty( "DURATION" );</p>
<h5>Get DURATION</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "DURATION" )</p>
<p class="comment">output = duration<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "DURATION", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => duration<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$duration = $vtodo->getProperty( "duration" );</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.
</p>
<h5>Set DURATION</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "duration", duration [, xparams ] )</p>
<p class="comment">
duration<span class="ref">1</span> = (array) ( "week" => (int) week )
duration<span class="ref">1</span> = array ( "day" => (int) day )
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec ])
duration = (array) ( "sec" => (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 = ["+"] "P" (dur-date/dur-time/dur-week)
dur-date = dur-day [dur-time]
dur-time = "T" (dur-hour / dur-minute / dur-second)
dur-week = 1*DIGIT "W"
dur-hour = 1*DIGIT "H" [dur-minute]
dur-minute = 1*DIGIT "M" [dur-second]
dur-second = 1*DIGIT "S"
dur-day = 1*DIGIT "D"
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example 1</p>
<p>One day duration.</p>
<p class="example">$vtodo->setProperty "duration"
, array( "day" => 1 )); </p>
<p class="label">Example 2</p>
<p>Four hours duration.</p>
<p class="example">$vtodo->setProperty( "duration"
, "PT4H" );</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createExdate()</p>
<p class="label">Example</p>
<p class="example">$component->createExdate();</p>
<h5>Delete EXDATE</h5>
<p>Remove EXDATE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "EXDATE" )</p>
<p class="label">Example 1</p>
<p class="example">$vtodo->deleteProperty( "EXDATE" );</p>
<p class="label">Example 2</p>
<P>Delete EXDATE property no 2.</p>
<p class="example">$vjournal->deleteProperty( "EXDATE", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all EXDATE properties.</p>
<p class="example">while( $vjournal->deleteProperty( "EXDATE" ))
continue;</p>
<h5>Get EXDATE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "EXDATE" )<p>
<p class="comment">output = exdates<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "exdate", propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => exdates<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "EXDATE", 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">$exdate = $vtodo->getProperty( "exdate" );</p>
<h5>Set EXDATE</h5>
<p>Insert property value.</p>
<p>
If "TZID" is set in params, ex. "TZID" = "CET",
all timezone or offset in dates are ignored and DATE-TIME value type is set.<br>
If DATE value type is set in params ("VALUE" = "DATE"), all timezone or offset in dates are ignored.<br>
If no "VALUE" parameter in params, DATE-TIME (default) value type is set.<br>
If empty params and offset in 1st date, all remaining dates are set to UTC.<br>
If no "TZID" is set in params and timezone in 1st date, all remaining dates are within this timezone and param "TZID" is set.<br>
If none of the above rules are applicable, DATE-TIME and local date is set default.<br>
Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a datetime from one time zone to another.
</p>
<p>Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "exdate", exdates [, xparams [, propOrderNo ]] )</p>
<p class="comment">exdates<span class="ref">1</span> = (array) ( date *[, date ] )
date = array( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]] )
date<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
[, "tz" => tz ]] )
date = (array) ( "timestamp" => (int) timestamp [, "tz" => tz])
date = (string) date/datetime string<span class="ref">*</span>
tz = (string) <timezone identifier> / offset
(timezone will be used as tzidparam (below), if tzidparam not set)
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span> = (array) ([(datetimeparam/dateparam) / tzidparam] [,xparams])
datetimeparam = "VALUE" => "DATE-TIME" // <span class="ref">default, output as date-time</span>
dateparam = "VALUE" => "DATE" // <span class="ref">output as DATE</span>
tzidparam = "TZID" => (string) <timezone identifier>
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$vevent->setProperty( "exdate"
, array( array( 2006, 8, 14, 16, 0, 0 ));
<span class="ref">// >exclude 2006-08-14 16.00.00 (local date) from recurrence pattern</span></p>
<p class="label">Example 2</p>
<p class="example">$vevent->setProperty( "exdate"
, array( array("year" =>,2006,"month" => 8,"day"=> 11))
, array( "VALUE" => "DATE" ));
<span class="ref">// 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">createExrule()</p>
<p class="label">Example</p>
<p class="example">$component->createExrule();</p>
<h5>Delete EXRULE</h5>
<p>Remove EXRULE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "EXRULE" )</p>
<p class="label">Example 1</p>
<p class="example">$vtodo->deleteProperty( "EXRULE" );</p>
<p class="label">Example 2</p>
<p>Delete EXRULE property no 2.</p>
<p class="example">$vjournal->deleteProperty( "EXRULE", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all EXRULE properties.</p>
<p class="example">while( $vjournal->deleteProperty( "EXRULE" ))
continue;</p>
<h5>Get EXRULE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "EXRULE" )</p>
<p class="comment">output = recur<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "exrule", propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => recur<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "EXRULE", 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">$exrule = $vtodo->getProperty( "exrule" );</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 rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "exrule", 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<span class="ref">1</span> = (array) ( "FREQ" => freq
// <span class="ref">either UNTIL or COUNT may appear in a "recur",
but UNTIL and COUNT MUST NOT occur in the same "recur"</span>
[, "UNTIL" "=>" >enddate ]
[, "COUNT" "=>" 1*DIGIT ]
// <span class="ref">the rest of these keywords are optional,
but MUST NOT occur more than once</span>
[, "INTERVAL" "=>" 1*DIGIT ]
[, "BYSECOND" "=>" byseclist ]
[, "BYMINUTE" "=>" byminlist ]
[, "BYHOUR" "=>" byhrlist ]
[, "BYDAY" "=>" bywdaylist ]
[, "BYMONTHDAY" "=>" bymodaylist ]
[, "BYYEARDAY" "=>" byyrdaylist ]
[, "BYWEEKNO" "=>" bywknolist ]
[, "BYMONTH" "=>" bymolist ]
[, "BYSETPOS" "=>" bysplist ]
[, "WKST" "=>" weekday ]
[, x-name "=>" (string) text ] )
freq = "SECONDLY" /
"MINUTELY" /
"HOURLY" /
"DAILY" /
"WEEKLY" /
"MONTHLY" /
"YEARLY"
enddate = date (a DATE value or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value)
date = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec ])
date = (array) ( "timestamp" => (int) timestamp )
date = (string) date/datetime string<span class="ref">*</span>
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)], "DAY" => weekday )
plus = "+"
minus = "-"
ordwk = 1DIGIT / 2DIGIT ;1 to 53
weekday = "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA"
; Corresponding to
; SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
; FRIDAY, SATURDAY and SUNDAY 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<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "Exrule"
, array( "FREQ" => "MONTHLY"
, "UNTIL" => "20060831"
// <span class="ref">DATE / DATE-TIME in <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> format; string/array, see <a href="#CREATED">CREATED</a> format</span>
, "INTERVAL" => 2
, "WKST" => "SU"
, "BYSECOND" => 2
, "BYMINUTE" => array( 2, -4, 6 ) // (*)
, "BYHOUR" => array( 2, 4, -6 ) // (*)
, "BYMONTHDAY" => -2 // (*)
, "BYYEARDAY" => 2 // (*)
, "BYWEEKNO" => array( 2, -4, 6 ) // (*)
, "BYMONTH" => 2 // (*)
, "BYSETPOS" => array( 2, -4, 6 ) // (*)
, "BYday" => array( array(-2, "DAY" => "WE" )
, array( 3, "DAY" => "TH")
, array( 5, "DAY" => "FR")
, array( "DAY" => "MO"))
// (**)
, "X-NAME" => "x-value" )
, array( "xparamkey" => "xparamValue" ));
$vtodo->setProperty( >"exrule"
, array( "FREQ" => "WEEKLY"
, "COUNT" => 2
, "INTERVAL" => 2
, "WKST" => "SU"
, "BYSECOND" => array( -2, 4, 6 ) // (*)
, "BYMINUTE" => -2 // (*)
, "BYHOUR" => 2 // (*)
, "BYMONTHDAY" => array( 2, -4, 6 ) // (*)
, "BYYEARDAY" => array( -2, 4, 6 ) // (*)
, "BYWEEKNO" => -2 // (*)
, "BYMONTH" => array( 2, 4, -6 ) // (*)
, "BYSETPOS" => -2 // (*)
, "BYday" => array( 5, "DAY" => "WE" )
// (**)
, "X-NAME" => "x-value" )
, array( "xparamkey" => "xparamValue" ));
//<span class="ref">(*) single value/array of values</span>
//<span class="ref">(**) 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 DATE-TIME/DATE-TIME or a DATE-TIME/duration.</p>
<h5>Create FREEBUSY</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createFreebusy()</p>
<p class="label">Example</p>
<p class="example">$component->createfreebusy();</p>
<h5>Delete FREEBUSY</h5>
<p>Remove FREEBUSY from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "FREEBUSY" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) FREEBUSY property</p>
<p class="example">$vfreebusy->deleteProperty( "FREEBUSY" );</p>
<p class="label">Example 2</p>
<p>Delete FREEBUSY property no 2.</p>
<p class="example">$vfreebusy->deleteProperty( "FREEBUSY", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all FREEBUSY properties.</p>
<p class="example">while( $vfreebusy->deleteProperty( "FREEBUSY" ))
continue;</p>
<h5>Get FREEBUSY</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "FREEBUSY" )</p>
<p class="comment">output = array( "fbtyp" => freebusytype<span class="ref">1</span> , periods<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "FREEBUSY", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => array("fbtype" => freebusytype<span class="ref">1</span> ,periods<span class="ref">2</span>)
, "params" => xparams<span class="ref"> 3</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "FREEBUSY", 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">$freebusy = $vfreebusy->getProperty( "FREEBUSY" );</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">setProperty( "freebusy",freebusytype,fbperiods [,xparams [,propOrderNo ]] )</p>
<p class="comment">freebusytype<span class="ref">1</span> = one of "FREE"
/ "BUSY" <b>Default</b>
/ "BUSY-UNAVAILABLE"
/ "BUSY-TENTATIVE"
/ x-name
fbperiods = (array) ( periods<span class="ref">2</span> )
periods<span class="ref">2</span> = (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) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec ) // <span class="ref">output format</span>
startdate/enddate = (array) ( "timestamp" => (int) timestamp )
startdate/enddate = (string) datetime string<span class="ref">*</span>
startdate/enddate : MUST be an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
duration = (array) ( (int) week / FALSE
[, (int) day / FALSE
, (int) hour
, (int) min
, (int) sec] )
duration = (array) ( "week" => (int) week / FALSE
[, "day" => (int) day / FALSE
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec ]] ); // <span class="ref">output format</span>
duration = (array) ( "sec" => (int) sec )
duration = (string) dur-value
= (["+"]/"-") "P" (dur-date/dur-time/dur-week)
dur-date = dur-day [dur-time]
dur-time = "T" (dur-hour / dur-minute / dur-second)
dur-week = 1*DIGIT "W"
dur-hour = 1*DIGIT "H" [dur-minute]
dur-minute = 1*DIGIT "M" [dur-second]
dur-second = 1*DIGIT "S"
dur-day = 1*DIGIT "D"
xparams<span class="ref">3</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(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">$fdate1 = array ( 2001, 1, 1, 1, 1, 1 );
alt.
$fdate1 = array ( "year" => 2001
, "month" => 1
, "day" => 1
, "hour" => 1
, "min" => 1
, "sec" => 1 );
$fdate2 = array ( 2002, 2, 2, 2, 2, 2 );
$fdate3 = array ( 2003, 3, 3, 3, 3, 3 );
$fdate4 = "4 April 2005 4:4:4";
$fdate7 = array ( "year" => 2007
, "month" => 7
, "day" => 7 );
$fdur6 = array ( "week" => 0
, "day" => 5
, "hour" => 5
, "min" => 5
, "sec" => 5 );
$fdur7 = array ( 0, 0, 6 ); // <span class="ref">duration for 6 hours</span>
$fdur8 = "P2D"; // <span class="ref">duration two days</span>
$freebusy->setProperty "freebusy"
, "FREE"
, array( array( $fdate1, $fdate2 )
, array( $fdate3, $fdur6 )
, array( $fdate4, $fdate5 )));
$freebusy->setProperty("freebusy"
, "Busy"
, 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. "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) value is presented with six decimals.</p>
<h5>Create GEO</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createGeo()</p>
<p class="label">Example</p>
<p class="example">$component->createGeo();</p>
<h5>Delete GEO</h5>
<p>Remove GEO from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "GEO" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "GEO" );</p>
<h5>Get GEO</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "GEO" )</p>
<p class="comment">output = array( "latitude" => <latitude>
, "longitude" => <longitude>))</p>
<p class="label">Format 2</p>
<p class="format">getProperty( "GEO", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => array ( "latitude" => <latitude>
, "longitude" => <longitude>))
, "params" => xparams <span class="ref">1</span> )</p>
<p class="label">Example</p>
<p class="example">$geo = $vevent->getProperty( "GEO" );</p>
<h5>Set GEO</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "geo", latitude, longitude [, xparams ] )</p>
<p class="comment">latitude = (float) latitude
longitude = (float) longitude
xparams <span class="ref">1</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "geo", 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>
<h5>Create LAST-MODIFIED</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createLastModified()</p>
<p class="label">Example</p>
<p class="example">$component->createLastModified();</p>
<h5>Delete LAST-MODIFIED</h5>
<p>Remove LAST-MODIFIED from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "LAST-MODIFIED" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "LAST-MODIFIED" );</p>
<h5>Get LAST-MODIFIED</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "LAST-MODIFIED" )</p>
<p class="comment">output = moddate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "LAST-MODIFIED", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => moddate<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$lastMod = $vevent->getProperty( "LAST-MODIFIED" );</p>
<h5>Set LAST-MODIFIED</h5>
<p>
Insert property value. Input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or,
if "offset" 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 a UTC datetime.
</p>
<p class="label">Format</p>
<p class="format">setProperty( "Last-Modified" [, moddate [, xparams ]] )</p>
<p class="comment">
moddate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
, "tz" => offset ]] )
moddate = (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec ]
moddate = (array) ( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, offset ]] )
moddate = (array) ( "timestamp" => (int) timestamp [, "tz" => offset])
moddate = (string) date/datetime string<span class="ref">*</span>
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtodo = & $vcalendar->newComponent( "vtodo" );
.. .
$vtodo->setProperty("last-modified"
, 2006, 8, 14, 12, 1, 2 );
<span class="ref">// 14 august 2006 12.01.02 UTC</span></p>
<p class="label">Example 2</p>
<p class="example">$date = array("year" => 2006, "month" => 10, "day" => 10,
"hour" => 10, "min" => 0, "sec" => 0, "tz" => "+0200");
<span class="ref">// local date + UTC offset => <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
$vtodo->setProperty( "last-modified", $date );
.. .</p>
<p class="label">Example 3</p>
<p class="example">$vevent->setProperty( "last-modified" );
<span class="ref">// current UTC DATE-TIME is set if called 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="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>
<h5>Create LOCATION</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createLocation()</p>
<p class="label">Example</p>
<p class="example">$component->createLocation();</p>
<h5>Delete LOCATION</h5>
<p>Remove LOCATION from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "LOCATION" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "LOCATION" );</p>
<h5>Get LOCATION</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "LOCATION" )</p>
<p class="comment">output = location<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "LOCATION", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => location<span class="ref">1</span>
, "params" => param<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$location = $vevent->getProperty( "LOCATION" );</p>
<h5>Set LOCATION</h5>
<p>Insert property value.</p>
<p>Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "location", location [, param] )</p>
<p class="comment">location<span class="ref">1</span> = (string) Value type TEXT
params<span class="ref">2</span> = (array) ( ["ALTREP" => (string) "<an alternate text representation, URI>"]
[, "LANGUAGE" => (string) "<lang>"]
[, xparams ]
xparams = *[ (string) xparamkey => (string) xparamvalue ]</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "location", "Buckingham Palace" );</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>
<h5>Create ORGANIZER</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createOrganizer()</p>
<p class="label">Example</p>
<p class="example">$component->createOrganizer();</p>
<h5>Delete ORGANIZER</h5>
<p>Remove ORGANIZER from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "ORGANIZER" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "ORGANIZER" );</p>
<h5>Get ORGANIZER</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "ORGANIZER" )</p>
<p class="comment">output = organizer<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "ORGANIZER", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => organizer<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$organizer = $vevent->getProperty( "ORGANIZER" );</p>
<h5>Set ORGANIZER</h5>
<p>Insert property value.
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738 ).
Also DIR parameter must be prefixed by protocol.
SENT-BY parameter must use protocol "mailto:", prefixed if missing.
</p>
<p>Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "organizer", organizer [, params] )</p>
<p class="comment">organizer<span class="ref">1</span> = (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<span class="ref">2</span> = (array) ( ["LANGUAGE" => (string) "<lang>"
(applies to the CN parameter value) ]
[, "CN" => (string) "common name to be associated
with the <strong>calendar</strong> user
specified by the property"]
[, "DIR" => (string) "reference to a directory
entry associated with the <strong>calendar</strong> user
specified by the property" ]
[, "SENT-BY" => (string) (cal-address, above)
"single <strong>calendar</strong> user
that is acting on behalf
of the <strong>calendar</strong> user
specified by the property" ]
[, xparams ]
xparams = *[ (string) xparamkey => (string) xparamvalue ]</p>
<p class="label">Example</p>
<p class="example">
$dir = "ldap://domain.com:6666/o=3DDC%20Comp,c=3DUS??(cn=3DJohn%20Doe)";
$vevent->setProperty( "organizer"
, "hide@address.com"
, array( "CN" => "John Doe"
, "DIR" => $dir
, "SENT-BY" => "hide@address.com"
, "X-Key1" => "X-Value1"
, "X-Key2" => "X-Value2" ));</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createPercentComplete()</p>
<p class="label">Example</p>
<p class="example">$component->createPercentComplete();</p>
<h5>Delete PERCENT-COMPLETE</h5>
<p>Remove PERCENT-COMPLETE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "PERCENT-COMPLETE" )</p>
<p class="label">Example</p>
<p class="example">$vtodo->deleteProperty( "PERCENT-COMPLETE" );</p>
<h5>Get PERCENT-COMPLETE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "PERCENT-COMPLETE" )</p>
<p class="comment">output = percent<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "PRIORITY", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => percent<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$percent = $vtodo->getProperty( "PERCENT-COMPLETE" );</p>
<h5>Set PERCENT-COMPLETE</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "Percent-Complete", percent [, xparams ] )</p>
<p class="comment">percent<span class="ref">1</span> = (int) Value type INTEGER
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$vtodo->setProperty( "percent-complete", 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>
<h5>Create PRIORITY</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createPriority()</p>
<p class="label">Example</p>
<p class="example">$component->createPriority();</p>
<h5>Delete PRIORITY</h5>
<p>Remove PRIORITY from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "PRIORITY" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "PRIORITY" );</p>
<h5>Get PRIORITY</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "PRIORITY" )</p>
<p class="comment">output = priority<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "PRIORITY", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => priority<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$priority = $vevent->getProperty( "priority" );</p>
<h5>Set PRIORITY</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "priority", priority [, xparams ] )</p>
<p class="comment">priority<span class="ref">1</span> = (int) Value type INTEGER
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "priority", 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<span class="ref">2</span>).
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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createRdate()</p>
<p class="label">Example</p>
<p class="example">$component->createRdate();</p>
<h5>Delete RDATE</h5>
<p>Remove RDATE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "RDATE" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) RDATE property.</p>
<p class="example">$vtodo->deleteProperty( "RDATE" );</p>
<p class="label">Example 2</p>
<p>Delete RDATE property no 2.</p>
<p class="example">$vjournal->deleteProperty( "RDATE", 2 );</p>
<p class="label">Example 3</p>
<p>Delete all RDATE properties.</p>
<p class="example">while( $vjournal->deleteProperty( "RDATE" ))
continue;</p>
<h5>Get RDATE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "RDATE" )</p>
<p class="comment">output = dates<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "RDATE", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => dates<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "RDATE", 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">$rdates = $vevent->getProperty( "RDATE" );</p>
<h5>Set RDATE</h5>
<p>Insert property value.</p>
<p>
If "TZID" is set in params, ex. "TZID" = "CET", all timezone or offset in dates are ignored and DATE-TIME value type is set.<br>
If DATE value type is set in params ("VALUE" = "DATE"), all timezone or offset in dates are ignored.<br>
If "PERIOD" is set in params ("VALUE" = "PERIOD"), DATE-TIME value type is set.<br>
If no "VALUE" parameter in params, DATE-TIME (default) value type is set.<br>
If empty params and offset in 1st date, all remaining dates are set to UTC.<br>
If no "TZID" is set in params and timezone in 1st date, all remaining dates are within this timezone and param "TZID" is set.<br>
If none of the above rules are applicable, DATE-TIME and local date is set default.
</p>
<p>Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "rdate", dates [, params [, propOrderNo ]] )</p>
<p class="comment">dates<span class="ref">1</span> = (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) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
[, "tz" => tz ]] )
// <span class="ref">output format</span>
date = (array) ( "timestamp" => (int) timestamp [, "tz" => tz ] )
date = (string) date/datetime string<span class="ref">*</span>
tz = <timezone identifier> / offset
(timezone will be used as tzidparam, if tzidparam not exists)
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
duration = (array) ( (int) week/false
[, (int) day/false
, (int) hour
, (int) min
, (int) sec] )
duration = (array) ([ "week" => (int) week / FALSE ,] /
[ "day" => (int) day / FALSE
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec ]] );
// <span class="ref">output format, only used keys</span>
duration = (array) ( "sec" => (int) sec );
duration = (string) duration like "P15DT5H0M20S"
params<span class="ref">2</span> = ([tzidparam ( / datetimeparam / dateparam / periodparam )]
*[, xparams ] )
tzidparam = "TZID" => (string) <timezone identifier>
// <span class="ref">output as local DATE-TIME with timezone identifier</span>
// <span class="ref">if tzidparam="GMT"/"UTC" then</span>
// <span class="ref">output date-time are suffixed by 'Z'</span>
datetimeparam = "VALUE" => "DATE-TIME" // <span class="ref">default, output as DATE-TIME</span>
dateparam = "VALUE" => "DATE" // <span class="ref">output as DATE</span>
periodparam = "VALUE" => "PERIOD" // <span class="ref">output as PERIOD (datetime)</span>
xparams = (string) xparamkey => (string) xparamvalue
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(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">// $rdate1 = array ( 2001, 1, 1, 1, 1, 1 );
// alt.
$rdate1 = array( "year" => 2001
, "month" => 1
, "day" => 1
, "hour" => 1
, "min" => 1
, "sec" => 1
, "tz" => "GMT" );
$rdate2 = array( 2002, 2, 2, 2, 2, 2, "GMT" );
$rdate3 = "3 March 2003 03.03.03";
$rdate4 = array( 2004, 4, 4, 4, 4, 4, "GMT" );
$rdate5 = array( 2005, 10, 5, 5, 5, 5 );
$rdate8 = array( "year" => 2007, "month" => 7, "day" => 7 );
$rdur6 = array( "week" => 0
, "day" => 0
, "hour" => 5
, "min" => 5
, "sec" => 5 );
$rdur7 = array( 0, 0, 6 );
<span class="comment">// duration for 6 hours</span>
$rdur8 = array( "week" => 8 );
<span class="comment">// duration for 8 weeks</span>
$vevent = & $vcalendar->newComponent( "vevent" );
$vevent->setProperty( "rdate", array( $rdate1 ));
<span class="comment">// one recurrence date, date in 7-params format (DATE-TIME)</span>
$vevent->setProperty( "rdate", array( $rdate1, $rdate2 ));
<span class="comment">// two dates, date 7-params format (DATE-TIME)</span>
$vevent->setProperty( "rdate", array( array( $rdate1, $rdate2 )
, array( $rdate3, $rdate4 ))
, array( "VALUE" => "PERIOD" ));
<span class="comment">// Both fromdate and enddate must have 7 params (DATE-TIME) !!!</span>
$vevent->setProperty( "rdate", array( array( $rdate2, $rdur6 ))
, array( "VALUE" => "PERIOD" ));
<span class="comment">// one duration (fromdate-duration)</span>
$vevent->setProperty( "rdate", array( array( $rdate1, $date2 )
, array( $rdate3, $rdur7 ))
, array( "VALUE" => "PERIOD" ));
<span class="comment">// period, pairs of fromdate+enddate and fromdate-duration</span>
$vevent->setProperty( "rdate", array( $rdate5, $date8 ))
, array( "VALUE" => "DATE" ));
<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 <span class="ref">2</span>).
</p>
<h5>Create RECURRENCE-ID</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createRecurrenceid()</p>
<p class="label">Example</p>
<p class="example">$component->createRecurrenceid();</p>
<h5>Delete RECURRENCE-ID</h5>
<p>Remove RECURRENCE-ID from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "RECURRENCE-ID" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "RECURRENCE-ID" );</p>
<h5>Get RECURRENCE-ID</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "RECURRENCE-ID" )</p>
<p class="comment">output = recurrIdDate<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "RECURRENCE-ID", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => recurrIdDate<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$recurrDate = $vtodo->getProperty( "RECURRENCE-ID" );</p>
<h5>Set RECURRENCE-ID</h5>
<p>
Insert property value. If DATE value type is expected, "VALUE" = "DATE"
<b>must</b> be set (in params<span class="ref">2</span>) otherwise DATE-TIME (default) value type is set.
</p>
<p>
If no timezone parameter (tz or tzidparam below) is set (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 (or UTC).
</p>
<p class="label">Format</p>
<p class="format">setProperty( "recurrence-id", recurrIdDate [, params ] )</p>
<p class="comment">recurrIdDate<span class="ref">1</span> = (array) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
[, "tz" => tz ]] )
recurrIdDate = (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]]
recurrIdDate = (array) ( (int) year
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec
[, tz ]] )
recurrIdDate = (array) ( "timestamp" => (int) timestamp
[, "tz" => tz ] )
recurrIdDate = (string) date/datetime string<span class="ref">*</span>
tz = (string) <timezone identifier> / offset
(timezone will be used as tzidparam, if tzidparam not exists)
offset = (int) (+/-)HHmm[ss], local date + UTC offset => <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME
params<span class="ref">2</span> = (array) ([ datetimeparam/dateparam/tzidparam ]
[, rangeparam ]
[, xparams ] )
datetimeparam = "VALUE" => "DATE-TIME" // <span class="ref">default, output as DATE-TIME</span>
dateparam = "VALUE" => "DATE" // <span class="ref">output as DATE</span>
tzidparam = "TZID" => (string) <timezone identifier>
// <span class="ref">output as local date-time with timezone identifier</span>
// <span class="ref">if tzidparam="GMT"/"UTC" then</span>
// <span class="ref">output date-time are suffixed by 'Z'</span>
rangeparam = "RANGE" => ( "THISANDPRIOR" / "THISANDFUTURE" )
// <span class="ref">range parameter</span>
xparams = *[ string) xparamkey => (string) xparamvalue ]
<br>date/datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
trailing characters (digits), if exists, will be interpreted as offset/timezone
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example</p>
<p class="example">$vtodo->setProperty( "recurrence-id", "3 March 2003 03.03.03" );
<span class="comment">// 3 march 2003 03.03.03 local time</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="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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createRelatedTo()</p>
<p class="label">Example</p>
<p class="example">$component->createRelatedTo();</p>
<h5>Delete RELATED-TO</h5>
<p>Remove RELATED-TO from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "RELATED-TO" )</p>
<p class="label">Example 1</p>
<p>Delete /single/first) RELATED-TO property</p>
<p class="example">$vtodo->deleteProperty( "RELATED-TO" );</p>
<p class="label">Example 2</p>
<p>Delete RELATED-TO property no 2.</p>
<p class="example">$vjournal->deleteProperty( "RELATED-TO", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all RELATED-TO properties.</p>
<p class="example">while( $vjournal->deleteProperty( "RELATED-TO" ))
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">getProperty( "RELATED-TO" )</p>
<p class="comment">output = relid<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "RELATED-TO", propOrderNo/FALSE , TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => relid<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "RELATED-TO", 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">$relatedId = $vtodo->getProperty( "RELATED-TO" );</p>
<h5>Set RELATED-TO</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "Related-To", relid [, params [, propOrderNo ]] )</p>
<p class="comment">relid<span class="ref">1</span> = (string) Value type TEXT.
params<span class="ref">2</span> = (array) ( [ reltype ] [, xparams] )
reltype = "RELTYPE" => ("PARENT" (Default)
/ "CHILD"
/ "SIBLING"
/ (string) iana-token
/ (string) x-name )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$vtodo->setProperty( "related-to", "19960401-080045-hide@address.com");</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createRepeat()</p>
<p class="label">Example</p>
<p class="example">$component->createRepeat();</p>
<h5>Delete REPEAT</h5>
<p>Remove REPEAT from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "REPEAT" )</p>
<p class="label">Example</p>
<p class="example">$valarm->deleteProperty( "REPEAT" );</p>
<h5>Get REPEAT</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "REPEAT" )</p>
<p class="comment">output = repeatTimes<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "REPEAT", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => repeatTimes<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$repeat = $vtodo->getProperty( "REPEAT" );</p>
<h5>Set REPEAT</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "repeat", repeatTimes [, xparams ] )</p>
<p class="comment">repeatTimes<span class="ref">1</span> = (int) Value type INTEGER
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$valarm->setProperty( "repeat", 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>
<p>In output, the components are separated by (BACKSLASHed) SEMICOLON.</p>
<h5>Create REQUEST-STATUS</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createRequestStatus()</p>
<p class="label">Example</p>
<p class="example">$component->createRequestStatus();</p>
<h5>Delete REQUEST-STATUS</h5>
<p>Remove REQUEST-STATUS from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "REQUEST-STATUS" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) REQUEST-STATUS property.</p>
<p class="example">$vtodo->deleteProperty( "REQUEST-STATUS" );</p>
<p class="label">Example 2</p>
<p>Delete REQUEST-STATUS property no 2.</p>
<p class="example">$vjournal->deleteProperty( "REQUEST-STATUS", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all REQUEST-STATUS properties.</p>
<p class="example">while( $vjournal->deleteProperty( "REQUEST-STATUS" ))
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">getProperty( "REQUEST-STATUS" )</p>
<p class="comment">output = array( "statcode" => statcode<span class="ref">1</span>
, "text" => errtext<span class="ref">2</span>
[ , "extdata" => extraData<span class="ref"> 3</span> ] )</p>
<p class="label">Format 2</p>
<p class="format">getProperty( "REQUEST-STATUS", propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => array( "statcode" => statcode<span class="ref">1</span>
, "text" => errtext<span class="ref">2</span>
[ , "extdata" => extraData<span class="ref">3</span> ] )
, "params" => params<span class="ref">4</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "REQUEST-STATUS", 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">$requestStatus = $vtodo->getProperty( "REQUEST-STATUS" );</p>
<h5>Set REQUEST-STATUS</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "Request-Status"
, statcode, errtext [,extraData/FALSE [,params [,propOrderNo]]])</p>
<p class="comment">statcode<span class="ref">1</span> = (int) Hierarchical, numeric return status code
(1*DIGIT "." 1*DIGIT 1*DIGIT)
errtext<span class="ref">2</span> = (string) Textual status description
extraData<span class="ref">3</span> = (string) Textual exception data.
For example, the offending property name and value
or complete property line.
params<span class="ref">4</span> = (array) ( ["LANGUAGE" => (string) "<lang>"] [, xparams ] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$vfreebusy->setProperty("request-status"
, 2.00
, "Invalid property value"
, "DTSTART:96-Apr-31");</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>
<h5>Create RESOURCES</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createResources()</p>
<p class="label">Example</p>
<p class="example">$component->createResources();</p>
<h5>Delete RESOURCES</h5>
<p>Remove RESOURCES from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "RESOURCES" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) RESOURCES property.</p>
<p class="example">$vevent->deleteProperty( "RESOURCES" );</p>
<p class="label">Example 2</p>
<p>Delete RESOURCES property no 2.</p>
<p class="example">$vevent->deleteProperty( "RESOURCES", 2 );</p>
<p class="label">Example 3</p>
<p>Delete all RESOURCES properties.<p>
<p class="example">while( $vevent->deleteProperty( "RESOURCES" ))
continue;</p>
<h5>Get RESOURCES</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "RESOURCES" )</p>
<p class="comment">output = resources<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "RESOURCES", propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => resources<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "RESOURCES", 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">$resources = $vtodo->getProperty( "RESOURCES" );</p>
<h5>Set RESOURCES</h5>
<p>Insert property value.</p>
<p>Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "resources", resources [, params [, propOrderNo ]] )</p>
<p class="comment">resources<span class="ref">1</span> = (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<span class="ref">2</span> = (array) (
[ "ALTREP" => (string) "<an alternate text representation, URI>"]
[, "LANGUAGE" => (string) "<lang>"]
[, xparams] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "resources", "COMPUTER PROJECTOR" );</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.
</p>
<h5>Create RRULE</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createRrule()</p>
<p class="label">Example</p>
<p class="example">$component->createRrule();</p>
<h5>Delete RRULE</h5>
<p>Remove RRULE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "RRULE" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) RRULE property.</p>
<p class="example">$vevent->deleteProperty( "RRULE" );</p>
<p class="label">Example 2</p>
<p>Delete RRULE property no 2.</p>
<p class="example">$vevent->deleteProperty( "RRULE", 2 );</p>
<p class="label">Example 3</p>
<p>Delete all RRULE properties.</p>
<p class="example">while( $vevent->deleteProperty( "RRULE" ))
continue;</p>
<h5>Get RRULE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "RRULE" )</p>
<p class="comment">output = recur<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "RRULE", propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => recur<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "RRULE", 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">$rrules = $vtodo->getProperty( "RRULE" );</p>
<h5>Set RRULE</h5>
<p>Insert property value.</p>
<p>Parameters will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "rrule", 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<span class="ref">1</span> = see <a href="#EXRULE">Exrule</a>
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</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.
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>
<h5>Create SEQUENCE</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createSequence()</p>
<p class="label">Example</p>
<p class="example">$component->createSequence();</p>
<h5>Delete SEQUENCE</h5>
<p>Remove SEQUENCE from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "SEQUENCE" )</p>
<p class="label">Example</p>
<p class="example">$vtodo->deleteProperty( "SEQUENCE" );</p>
<h5>Get SEQUENCE</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "SEQUENCE" )</p>
<p class="comment">output = sequence<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "SEQUENCE", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => sequence<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$sequence = $vtodo->getProperty( "SEQUENCE" );</p>
<h5>Set SEQUENCE</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "sequence" [, sequence [, xparams ]] )</p>
<p class="comment">sequence<span class="ref">1</span> = (int) Value type INTEGER
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example 1</p>
<p class="example">$vevent->setProperty( "sequence", 2 );
<span class="comment">// set sequence number to 2</span></p>
<p class="label">Example 2</p>
<p class="example">$vevent->setProperty( "sequence" );
<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>
<h5>Create STATUS</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createStatus()</p>
<p class="label">Example</p>
<p class="example">$component->createStatus();</p>
<h5>Delete STATUS</h5>
<p>Remove STATUS from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "STATUS" )</p>
<p class="label">Example</p>
<p class="example">$vtodo->deleteProperty( "STATUS" );</p>
<h5>Get STATUS</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "STATUS" )</p>
<p class="comment">output = status<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "STATUS", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => status<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$status = $vtodo->getProperty( "STATUS" );</p>
<h5>Set STATUS</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "status", status [, xparams ] )</p>
<p class="comment"> // <span class="ref">Status values for a <a href="#vevent">VEVENT</a></span>
status<span class="ref">1</span> = "TENTATIVE" // <span class="ref">Indicates event is tentative</span>
/ "CONFIRMED" // <span class="ref">Indicates event is definite</span>
/ "CANCELLED" // <span class="ref">Indicates event was cancelled</span>
// <span class="ref">Status values for <a href="#VTODO">VTODO</a></span>
status<span class="ref">1</span> = "NEEDS-ACTION" // <span class="ref">Indicates to-do needs action</span>
/ "COMPLETED" // <span class="ref">Indicates to-do completed</span>
/ "IN-PROCESS" // <span class="ref">Indicates to-do in process of</span>
/ "CANCELLED" // <span class="ref">Indicates to-do was cancelled</span>
// <span class="ref">Status values for <a href="#VJOURNAL">VJOURNAL</a></span>
status<span class="ref">1</span> = "DRAFT" // <span class="ref">Indicates journal is draft</span>
/ "FINAL" // <span class="ref">Indicates journal is final</span>
/ "CANCELLED" // <span class="ref">Indicates journal is removed</span>
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "Status", "COMPLETED" );</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 ("one line") summary or subject for the <strong>calendar</strong> component.
(In "rfc2445, Recommended Practices", 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>
<h5>Create SUMMARY</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createSummary()</p>
<p class="label">Example</p>
<p class="example">$component->createSummary();</p>
<h5>Delete SUMMARY</h5>
<p>Remove SUMMARY from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "SUMMARY" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "SUMMARY" );</p>
<h5>Get SUMMARY</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "SUMMARY" )</p>
<p class="comment">output = summary<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "SUMMARY", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => summary<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$summary = $vtodo->getProperty( "SUMMARY" );</p>
<h5>Set SUMMARY</h5>
<p>Insert property value.</p>
<p>Parameters, if any, will be ordered as prescribed in rcf2445.</p>
<p class="label">Format</p>
<p class="format">setProperty( "summary", summary [, params ] )</p>
<p CLASS="comment">summary<span class="ref">1</span> = (string) Value type TEXT,
a short, one line summary about the activity or journal entry.
params<span class="ref">2</span> = array( ["ALTREP" => (string) "<an alternate text representation, URI>"]
[, "LANGUAGE" => (string) "<lang>"]
[, xparams ] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "summary", "This is a summary" );</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createTransp()</p>
<p class="label">Example</p>
<p class="example">$component->createTransp();</p>
<h5>Delete TRANSP</h5>
<p>Remove TRANSP from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "TRANSP" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "TRANSP" );</p>
<h5>Get TRANSP</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "TRANSP" )</p>
<p class="comment">output = transp<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "TRANSP", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => transp<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$transp = $vtodo->getProperty( "TRANSP" );</p>
<h5>Set TRANSP</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "transp", transp [, xparams ] )</p>
<p class="comment">transp<span class="ref">1</span> = "OPAQUE" / "TRANSPARENT"
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty( "transp", "TRANSPARENT" );</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> formatted DATE-TIME value.
</p>
<h5>Create TRIGGER</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createTrigger()</p>
<p class="label">Example</p>
<p class="example">$component->createTrigger();</p>
<h5>Delete TRIGGER</h5>
<p>Remove TRIGGER from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "TRIGGER" )</p>
<p class="label">Example</p>
<p class="example">$valarm->deleteProperty( "TRIGGER" );</p>
<h5>Get TRIGGER</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "TRIGGER" )</p>
<p class="comment">output = duration/date</p>
<p class="label">Format 2</p>
<p class="format">getProperty( "TRIGGER", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => duration<span class="ref">1</span>/date<span class="ref">3</span> )
, "params" => params<span class="ref">4</span> )
<p class="label">Example</p>
<p class="example">$trigger = $vtodo->getProperty( "TRIGGER" );</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">setProperty( "trigger", duration<span class="ref">1</span> [, params<span class="ref">4</span> ] )</p>
<p class="label">Format 2</p>
<p class="format">setProperty( "trigger", duration<span class="ref">2</span> [, params<span class="ref">4</span> ] )</p>
<p class="label">Format 3</p>
<p class="format">setProperty( "trigger", date<span class="ref">3</span> [, params<span class="ref">4</span> ] )</p>
<p class="label">Format</p>
<p class="format">setProperty( "trigger", (int) year / FALSE
, (int) month / FALSE
, (int) day / FALSE
[, (int) week / FALSE
[, (int) hour / FALSE
, (int) min / FALSE
, (int) sec / FALSE
[, relatedStart
[, before
[, params<span class="ref">4</span> ]]]]] )</p>
<p class="comment">duration<span class="ref">1</span> = (array) ( "week" => (int) week
, "relatedStart" => relatedStart
, "before" => before )
duration<span class="ref">1</span> = (array) ( "day" => (int) day
, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec
, "relatedStart" => relatedStart
, "before" => before )
relatedStart = (bool) TRUE : related start (default),
FALSE : related end
before = (booL) TRUE : before relatedStart (default),
FALSE : after relatedStart
duration<span class="ref">2</span> = (string) dur-value = (["+"]/"-")"P"(dur-date/dur-time/dur-week)
dur-date = dur-day [dur-time]
dur-time = "T" (dur-hour / dur-minute / dur-second)
dur-week = 1*DIGIT "W"
dur-day = 1*DIGIT "D"
dur-hour = 1*DIGIT "H" [dur-minute]
dur-minute = 1*DIGIT "M" [dur-second]
dur-second = 1*DIGIT "S"
date<span class="ref">3</span> = (array) ( "year" => (int) year // <span class="ref"><a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec ])
date<span class="ref">3</span> = (array) ( "timestamp" => (int) timestamp ) // <span class="ref"><a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a>DATE-TIME</span>
date<span class="ref">3</span> = (string) datetime string<span class="ref">*</span>
params<span class="ref">4</span> = (array) ( [[ reltype [, trigRelparam ]] / datetimeparam ]
[, xparams ] )
reltyp = "RELATED" => "START" (default) / "END"
trigRelparam = "VALUE" => "DURATION"
datetimeparam= "VALUE" => "DATE-TIME"
xparams = *[ (string) xparamkey => (string) xparamvalue ]
<br>datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(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">$valarm->setProperty( "trigger"
, 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">$valarm->setProperty( "trigger"
, array ("hour"=>1,"min"=>2,"sec"=>3 );
</p>
<p class="label">Example 3</p>
<p>A duration, 1 hour 2 min 3 sec, before start</p>
<p class="example">$valarm->setProperty( "trigger"
, "PT1H2M3S" );</p>
<p class="label">Example 4</p>
<p>A duration, 1 week after end.</p>
<p class="example">$valarm->setProperty( "trigger"
, 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">$valarm->setProperty( "trigger"
, array ( "week" => 1
, "relatedStart" => FALSE
, "before" => FALSE ));</p>
<p class="label">Example 6</p>
<p>A duration, 1 week after end.</p>
<p class="example">$valarm->setProperty( "trigger"
, "P1W"
, array( "related" => "END" ));</p>
<p class="label">Example 7</p>
<p class="example">$valarm->setProperty( "trigger"
, array( "year" => 2007
, "month" => 6
, "day" => 5,
, "hour" => 2
, "min" => 2
, "sec" => 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="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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createTzid()</p>
<p class="label">Example</p>
<p class="example">$component->createTzid();</p>
<h5>Delete TZID</h5>
<p>Remove TZID from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "TZID" )</p>
<p class="label">Example</p>
<p class="example">$vtimezone->deleteProperty( "TZID" );</p>
<h5>Get TZID</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "TZID" )</p>
<p class="comment">output = tzid<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "TZID", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => tzid<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$tzid = $vtimezone->getProperty( "TZID" );</p>
<h5>Set TZID</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "tzid", tzid [, xparams ] )</p>
<p class="comment">tzid<span class="ref">1</span> = (string) Value type TEXT
xparams<span class="ref">2</span> = (array)( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty( "tzid", "US-Eastern" );
.. .</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createTzname()</p>
<p class="label">Example</p>
<p class="example">$component->createTzname();</p>
<h5>Delete TZNAME</h5>
<p>Remove TZNAME from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "TZNAME" )</p>
<p class="label">Example 1</p>
<p>Delete (single/first) TZNAME property.</p>
<p class="example">$vtimezonestd->deleteProperty( "TZNAME" );</p>
<p class="label">Example 2</p>
<p>Delete TZNAME property no 2.</p>
<p class="example">$vtimezonestd->deleteProperty( "TZNAME", 2 );</p>
<p class="label">Example 3</p>
<p>Deleting all TZNAME properties.</p>
<p class="example">while( $vtimezonestd->deleteProperty( "TZNAME" ))
continue;</p>
<h5>Get TZNAME</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "TZNAME" )</p>
<p class="comment">output = tzname<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "TZNAME", propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( "value" => tzname<span class="ref">1</span>
, "params" => params<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( "TZNAME", 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">$tzname = $timezonestandard->getProperty( "TZNAME" );</p>
<h5>Set TZNAME</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "tzname", tzname [, params [, propOrderNo ]] )</p>
<p class="comment">tzname<span class="ref">1</span> = (string) Value type TEXT
params<span class="ref">2</span> = (array) ( [ "LANGUAGE" => (string) "<lang>" ] [, xparams ] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]
propOrderNo = (int) ordernumber, 1=1st, 2=2nd etc</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty( "Tzid", "US-Eastern" );
$vtimezone->setProperty( "Last-Modified", "19870101" );
$standard = & $vtimezone->newComponent( "standard" );
$standard->setProperty( "tzname", "EST" );
.. .</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, "+" / "-" time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
<h5>Create TZOFFSETFROM</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createTzoffsetfrom()</p>
<p class="label">Example</p>
<p class="example">$component->createTzoffsetfrom();</p>
<h5>Delete TZOFFSETFROM</h5>
<p>Remove TZOFFSETFROM from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "TZOFFSETFROM" )</p>
<p class="label">Example</p>
<p class="example">$vtimezonestd->deleteProperty( "TZOFFSETFROM" );</p>
<h5>Get TZOFFSETFROM</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "TZOFFSETFROM" )</p>
<p class="comment">output = tzoffsetfrom<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "TZOFFSETFROM", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => tzoffsetfrom<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$tzoffsetfrom = $timezonestandard->getProperty( "TZOFFSETFROM" );</p>
<h5>Set TZOFFSETFROM</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "tzoffsetfrom", tzoffsetfrom [, xparams ] )</p>
<p class="comment">tzoffsetfrom<span class="ref">1</span> = (int) (+/-)HHmm[ss], UTC offset
xparams<span class="ref">2</span> = (array) ( *[ /string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty( "Tzid", "US-Eastern" );
$vtimezone->setProperty( "Last-Modified", "19870101" );
$standard = & $vtimezone->newComponent( "standard" );
$standard->setProperty( "tzname", "EST" );
$standard->setProperty( "tzoffsetfrom", "-0500" );
.. .</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, "+" / "-" time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
<h5>Create TZOFFSETTO</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createTzoffsetto()</p>
<p class="label">Example</p>
<p class="example">$component->createTzoffsetto();</p>
<h5>Delete TZOFFSETTO</h5>
<p>Remove TZOFFSETTO from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "TZOFFSETTO" )</p>
<p class="label">Example</p>
<p class="example">$daylight->deleteProperty( "TZOFFSETTO" );</p>
<h5>Get TZOFFSETTO</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "TZOFFSETTO" )</p>
<p class="comment">output = tzoffsetto<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "TZOFFSETTO", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => tzoffsetto<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$tzoffsetto = $timezonestandard->getProperty( "TZOFFSETTO" );</p>
<h5>Set TZOFFSETTO</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "tzoffsetto", tzoffsetto [, xparams ] )</p>
<p class="comment">tzoffsetto<span class="ref">1</span> = (int) (+/-)HHmm[ss], UTC offset
xparams<span class="ref">2</span> = array( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty( "Tzid", "US-Eastern" );
$vtimezone->setProperty( "Last-Modified", "19870101" );
$standard = & $vtimezone->newComponent( "standard" );
.. .
$daylight = & $vtimezone->newComponent( "daylight" );
$daylight->setProperty( "tzoffsetto", "1345" );
.. .</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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createTzurl()</p>
<p class="label">Example</p>
<p class="example">$component->createTzurl();</p>
<h5>Delete TZURL</h5>
<p>Remove TZURL from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "TZURL" )</p>
<p class="label">Example</p>
<p class="example">$vtimezone->deleteProperty( "TZURL" );</p>
<h5>Get TZURL</h5>
<p>If set, returns property value, otherwise FALSE.</p>.
<p class="label">Format 1</p>
<p class="format">getProperty( "TZURL" )</p>
<p class="comment">output = tzurl<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "TZURL", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => tzurl<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$tzurl = $timezonestandard->getProperty( "TZURL" );</p>
<h5>Set TZURL</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "tzurl", tzurl [, xparams ] )</p>
<p class="comment">tzurl<span class="ref">1</span> = (string) Value type URI
xparams<span class="ref">2</span> = array( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$tz = "http://zones.stds_r_us.net/tz/US-Eastern" );
$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty( "Tzid", "US-Eastern" );
$vtimezone->setProperty( "Last-Modified", "19870101T000000" );
$vtimezone->setProperty( "tzurl", $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("Ymd\THisT")."-".[microSec][random]."@".<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">"20070803T194810CEST-hide@address.com"</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>
<h5>Create UID</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createUid()</p>
<p class="label">Example</p>
<p class="example">$component->createUid();</p>
<h5>Delete UID</h5>
<p>
If UID is remove from a component, UID will automatically be recreated when <strong>calendar</strong> output functions
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">deleteProperty( "UID" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "UID" );</p>
<h5>Get UID</h5>
<p>If set, returns property, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "UID" )</p>
<p class="comment">output = uid<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "UID", FALSE , TRUE )</p>
<p class="comment">output = array( "value" => uid<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$uid = $vevent->getProperty( "UID" );</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. "vevent"),
this may cause malfunction in <a href="#setComponent">setComponent</a> with index or UID argument.
</p>
<p class="label">Format</p>
<p class="format">setProperty( "uid", uid [, xparams ] )</p>
<p class="comment">uid<span class="ref">1</span> = (string) Value type TEXT
xparams<span class="ref">2</span> = array( *[ (string) xparamkey => (string) xparamvalue ] )</p>
<p class="label">Example</p>
<p class="example">$vevent->setProperty("uid","20070803T194810CEST-hide@address.com");</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>
<h5>Create URL</h5>
<p>If set, returns rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createUrl()</p>
<p class="label">Example</p>
<p class="example">$component->createUrl();</p>
<h5>Delete URL</h5>
<p>Remove URL from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "URL" )</p>
<p class="label">Example</p>
<p class="example">$vevent->deleteProperty( "URL" );</p>
<h5>Get URL</h5>
<p>If set, returns property value, otherwise FALSE.</p>
<p class="label">Format 1</p>
<p class="format">getProperty( "URL" )</p>
<p class="comment">output = url<span class="ref">1</span></p>
<p class="label">Format 2</p>
<p class="format">getProperty( "URL", FALSE , TRUE )</p>
<p class="comment">output = array "value" => url<span class="ref">1</span>
, "params" => xparams<span class="ref">2</span> )</p>
<p class="label">Example</p>
<p class="example">$url = $vevent->getProperty( "URL" );</p>
<h5>Set URL</h5>
<p>Insert property value.</p>
<p class="label">Format</p>
<p class="format">setProperty( "url", url [, xparams ] )</p>
<p class="comment">url<span class="ref">1</span> = (string) Value type URI
xparams<span class="ref">2</span> = (array) ( *[ (string) xparamkey => (string) xparamvalue ] (</p>
<p class="label">Example</p>
<p class="example">$vtodo->setProperty( "url", "http://www.icaldomain.net" );</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 "X-" 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 rfc2445 formatted string, otherwise FALSE.</p>
<p class="label">Format</p>
<p class="format">createXprop()</p>
<p class="label">Example</p>
<p class="example">$component->createxProp();</p>
<h5>Delete X-PROPERTY</h5>
<p>Remove X-PROPERTY from component.</p>
<p class="label">Format</p>
<p class="format">deleteProperty( "<X-PROPERTY>" )</p>
<p class="label">Example 1</p>
<p>Deleting x-property named "X-PROPERTY".</p>
<p class="example">$vevent->deleteProperty( "X-PROPERTY" );</p>
<p class="label">Example 2</p>
<p>Deleting all x-properties.</p>
<p class="example">while( $vevent->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">getProperty( "<X-PROPERTY>" )</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>
, propertyData<span class="ref">2</span> )</p>
<p class="label">Format 2</p>
<p class="format">getProperty()</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>
, propertyData<span class="ref">2</span> )</p>
<p class="label">Format 3</p>
<p class="format">getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
<p class="comment">propOrderNo = (int) specific property value</p>
<p class="comment">output = array( propertyName<span class="ref">1</span>
, array ( "value" => propertyData<span class="ref">2</span> )
, "params" => params<span class="ref"> 3</span>))</p>
<p class="label">Format 4</p>
<p class="format">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">$config = array( "unique_id" => "kigkonsult.se",
"filename", "file.ics" ); );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
if( FALSE !== ( $d = $vcalendar->getProperty( "X-WR-TIMEZONE" )))
echo $d[1];
.. .</p>
<p class="comment"> // $xprop = array( propertyName<span class="ref">1</span>, propertyData<span class="ref">2</span> )</p>
<p class="label">Example 2</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"filename", "file.ics" ); );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $xprop = $vcalendar->getProperty( )) {
.. .</p>
<p class="comment"> // $xprop = array( propertyName<span class="ref">1</span>, propertyData<span class="ref">2</span> )</p>
<p class="label">Example 3</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"filename", "file.ics" ); );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $xprop = $vcalendar->getProperty( "X-ABC-MMSUBJ" )) {
.. .</p>
<p class="comment"> // $xprop = array( "X-ABC-MMSUBJ", propertyData<span class="ref">2</span> )</p>
<p class="label">Example 4</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"filename", "file.ics" ); );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
while( $xprop = $vcalendar->getProperty( FALSE, FALSE, TRUE )) {
.. .</p>
<p class="comment"> // $xprop = array( propertyName<span class="ref">1</span>
// , array( "value" => propertyData<span class="ref">2</span> )
// , "params" => params<span class="ref"> 3</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">setProperty( propertyName, propertyData [, params ] )</p>
<p class="comment">propertyName<span class="ref">1</span> = (string) Any property name with a "X-" prefix
propertyData<span class="ref">2</span> = (string) Value type TEXT
params<span class="ref">3</span> = (array) ( ["LANGUAGE" => (string) "<lang>"] [, xparams] )
xparams = *[ (string) xparamkey => (string) xparamvalue ]</p>
<p class="label">Example</p>
<p class="example">$component->setProperty("X-ABC-MMSUBJ","http://load.noise.org/mysubj.wav");</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
<a NAME="Calendar_component_configuration_functions"></a><h2>3.3 Calendar Component configuration functions</h2>
<a name="Language_PROP"></a><h3>3.3.1 Language</h3>
Language for specific <strong>calendar</strong> component as defined in [RFC 1766].<br>
Language set at component level can be overridden by specific component property parameter.<br>
A successful "setConfig" 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">getConfig( "language" )</p>
<p class="label">Example</p>
<p class="example">$lang = $vevent->getConfig( "language" );</p>
<h5>Set LANGUAGE</h5>
<p class="label">Format</p>
<p class="format">setConfig( "language", lang )</p>
<p class="comment">lang = (string) language</p>
<p class="label">Example</p>
<p class="example">$vevent->setConfig( "language", "en" );</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_configuration_functions">[up]</a>
<a name="Calendar_component_object_misc_functions"></a><h2>3.4 Calendar component object misc. functions</h2>
Calendar component subcomponent functions
<a name="deleteComponent_PROP"></a><h4>3.4.1 deleteComponent</h4>
Remove subcomponent from component.
<p class="label">Format</p>
<p class="format">deleteComponent( 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">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. "vevent")
and order 1 alt. suborder number.</p>
<p class="format">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">$config = array( "unique_id" => "kigkonsult.se",
"filename", "file.ics" ); );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$comp1 = $vcalendar->getComponent();
$comp1->deleteComponent( 1 );
.. .</p>
<p class="label">Example 2</p>
<p>Delete all subcomponents.</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se",
"filename", "file.ics" ); );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$comp1 = $vcalendar->getComponent();
while( $comp1->deleteComponent( "valarm" )
continue;
.. .</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_configuration_functions">[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">getComponent()</p>
<p class="comment">Get next component until end-of-components.</p>
<p class="label">Format 2</p>
<p class="format">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">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">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">$config = array( "unique_id" => "kigkonsult.se",
"filename", "file.ics" ); );
$vcalendar = new vcalendar( $config );
$vcalendar->parse();
$comp1 = $vcalendar->getComponent());
while( $subComp = $comp1->getComponent()) {
.. .</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_configuration_functions">[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">newComponent( componentType )</p>
<p class="comment">componentType = (string) component type</p>
<p class="label">Example 1</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vevent = & $vcalendar->newComponent( "vevent" );
$vevent->setProperty( "dtstart" // <span class="ref">add some <a href="#VEVENT">EVENT</a> properties</span>
, 2006, 12, 24, 19, 30, 00 );
$vevent->setProperty(.. .
...
$valarm = & $vevent->newComponent( "valarm" );
$valarm->setProperty( "trigger", .. .
...
</p>
<p class="label">Example 2</p>
<p class="example">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config );
...
$vtimezone = & $vcalendar->newComponent( "vtimezone" );
$vtimezone->setProperty(.. .
...
$standard = & $vtimezone->newComponent( "standard" );
$standard->setProperty(.. .
...
$daylight = & $vtimezone->newComponent( "daylight" );
$daylight->setProperty(.. .
...
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_configuration_functions">[up]</a>
<a name="setComponent_PROP"></a><h4>3.4.4 setComponent</h4>
Add <strong>calendar</strong> component to <strong>calendar</strong> or replace/update component in <strong>calendar</strong>.
<p class="label">Format 1</p>
<p class="format">setComponent( component )
addSubComponent( component ) // <span class="ref">alias</span></p>
<p class="comment">Insert last in component chain.</p>
<p class="label">Format 2</p>
<p class="format">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">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">$config = array( "unique_id" => "kigkonsult.se" );
$vcalendar = new vcalendar( $config ); // <span class="ref">initiate new CALENDAR</span>
.. .
$vevent = new vevent();
$vevent->setProperty( "dtstart" // <span class="ref">add some <a href="#VEVENT">EVENT</a> properties</span>
, 2006, 12, 24, 19, 30, 00 );
$vevent->setProperty(.. .
.. .
$valarm = new valarm();
$valarm->setProperty( "trigger", .. .
.. .
$vevent->setComponent( $valarm );
$vcalendar->setComponent( $vevent );
.. .
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_configuration_functions">[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. Please examine the class to explore other functions.
</p>
<p>
<a name="createTimezone"></a><h4>4.1 createTimezone</h4>
<p>
The function, applied on a iCalcrator 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 to fit.
</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">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 => value ] ), timezone non-standard properties
from = (int) timestamp, period start date
to = (int) timestamp, period end date
if the "from" and "to" arguments are missing,
the calendar <a href="#getProperty2">getProperty</a> method (with DTSTART as argument)
is used to get lowest and highest event dates
(modified - one month / + one year)
if still missing,
two timezone transitions are created, using current date
(modified - one month / + one year)
</p>
<p class="label">Example</p>
<p class="example">$tz = "Europe/Stockholm";
$config = array( "unique_id" => "kigkonsult.se" );
$c = new vcalendar( $config );
$c->setProperty( "X-WR-TIMEZONE", $tz );
.. .
$xprops = array( "X-LIC-LOCATION" => $tz );
iCalUtilityFunctions::createTimezone( $c, $tz, $xprops );
.. .
</p>
<p>
Output (when using createCalendar or returnCalendar functions):<br>
<span class="ref">BEGIN:VTIMEZONE
TZID:Europe/Stockholm<br>
X-LIC-LOCATION:Europe/Stockholm<br>
BEGIN:STANDARD<br>
DTSTART:20111030T003000<br>
TZOFFSETFROM:+0200<br>
TZOFFSETTO:+0100<br>
TZNAME:CET<br>
END:STANDARD<br>
BEGIN:DAYLIGHT<br>
DTSTART:20110327T002000<br>
TZOFFSETFROM:+0100<br>
TZOFFSETTO:+0200<br>
TZNAME:CEST<br>
END:DAYLIGHT<br>
END:VTIMEZONE
</span>
</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
<a name="ms2phpTZ"></a><h4>4.2 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">ms2phpTZ( timezone )</p>
<p class="comment">timezone = (string) MS timezone (input), PHP5 timezone (output)</p>
<p class="label">Example</p>
<p class="example">$search = '"(UTC-06:00) Central Time (US & Canada)"';
echo "MS tz:'$search'<br>\n";
if( FALSE !== iCalUtilityFunctions::ms2phpTZ( $search ))
echo "PHP tz:'$search'<br>\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.3 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 "strtotime" 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 class="label">Format</p>
<p class="format">transformDateTime( dateTime, timezoneFrom [, timezoneTo [, format ]] )</p>
<p class="comment">
dateTime = (array) ( "year" => (int) year // <span class="ref">input</span>
, "month" => (int) month
, "day" => (int) day
[, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec ] )
dateTime = (array) ( (int) year // <span class="ref">input</span>
, (int) month
, (int) day
[, (int) hour
, (int) min
, (int) sec ] )
dateTime = (array) ( "timestamp" => (int) timestamp ) // <span class="ref">input</span>
dateTime = (string) datetime string<span class="ref">*</span> // <span class="ref">input</span>
dateTime = (string) datetime string // <span class="ref">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 "UTC"
format = (string) output format (any date formatting, default "Ymd\THis")
<br>datetime string<span class="ref">*</span> recommended formats
"20110625", "2011-06-25", "2011/06/26"
"20110625051015", "20110625 051015"
"20110625T051015", "20110625t051015"
"2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
"2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
other string formats, acceptable by strtotime function, may (would) work
<span class="ref">(notice <a href="#date_restriction">date restriction</a>)</span></p>
<p class="label">Example</p>
<p>Convert from time zone "Europe/Stockholm" to "UTC"</p>
<p class="example">
.. .
$d = date( "Y-m-d H:i:s" );
$tzFr = "Europe/Stockholm";
if( FALSE !== iCalUtilityFunctions::transformDateTime( $d, $tzFr ))
$event->setProperty( "dtstart", $d."Z" );
else
$event->setProperty( "dtstart", $d, array( "TZID" => $tzFr ));
.. .<br>
</p>
<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="iCal2XML"></a><h4>5.1 iCal2XML</h4>
<p>
The iCal2XML function converts an iCalcreator instance to XML format according to rfc6321,
"xCal: The XML Format for <strong>iCalendar</strong>".
</p>
<p>
Requires <em>PHP</em> 5 and "libxml" <em>PHP</em> extension (--enable-libxml) and utilizes the SimpleXML extension.
Before <em>PHP</em> 5.1.2, "--enable-simplexml" (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.2 XML2iCal</h4>
<p>
The XML2iCal function, with the two entry functions: XMLstr2iCal and XMLfile2iCal,
converts XML, according to rfc6321, "xCal: The XML Format for <strong>iCalendar</strong>" via an <em>PHP</em> SimpleXMLElement element to an iCalcreator instance.
</p>
<p>
Requires <em>PHP</em> 5 and "libxml" <em>PHP</em> extension (--enable-libxml) and utilizes the SimpleXML extension.
Before <em>PHP</em> 5.1.2, "--enable-simplexml" (at compile time) is required to enable this extension, after <em>PHP</em> 5.1.2 enabled by default.
</p>
<p>
On success, an iCalcreator instance is returned.
</p>
<p>
On XML parse error, FALSE is returned and error information (if any) are redirected to <em>PHP</em> error log.
</p>
<h5>XMLstr2iCal</h5>
The function accepts a well-formed (rfc6321) XML string as argument.
<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>
The function accepts a local or remote (rfc6321) XML file name, or a remote URI, as argument.
<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 class="label">Format</p>
<p class="format">XML2iCal( xmlobj [, config] )</p>
<p class="comment">xmlobj = (object) SimpleXML element instance
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="TZhelpers"></a><h4>5.3 time zone helper functions</h4>
<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><h5>5.3.1 getTzOffsetForDate</h5>
<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>"offsetHis" (+/-Hi[s])
<li>"offsetSec"( UTC offset in seconds)
<li>"tzname" (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) ( "year" => (int) year
, "month" => (int) month
, "day" => (int) day
, "hour" => (int) hour
, "min" => (int) min
, "sec" => (int) sec )</p>
<br>
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
<a name="getTimezonesAsDateArrays"></a><h5>5.3.2 getTimezonesAsDateArrays</h5>
<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.12<br>
copyright (c) 2007-2012 Kjell-Inge Gustafsson, kigkonsult<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>
<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>