Projet

Général

Profil

Paste
Télécharger (346 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / libraries / iCalcreator-version / using.html @ 5a7e6170

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
2
<html>
3
<head>
4
<title>iCalcreator 2.18 manual</title>
5
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
6
<meta name="author"      content="Kjell-Inge Gustafsson, kigkonsult, All rights reserved">
7
<meta name="copyright"   content="2007-2013 Kjell-Inge Gustafsson, kigkonsult">
8
<meta name="keywords"    content="ical, calendar, calender, xcal, xml, icalender, rfc2445, rfc5545, vcalender, php, create">
9
<meta name="description" content="using iCalcreator v2.18">
10
<style type="text/css">
11
* {
12
  FONT-FAMILY     : "Bitstream Vera Sans", Helvetica, "Lucida Grande","Lucida Sans Unicode", Lucida, Arial, Geneva, sans-serif;
13
  BACKGROUND-COLOR: white;
14
  COLOR           : black;
15
  FONT-SIZE       : small;
16
}
17
body {
18
  MARGIN-LEFT     : 10px;
19
  WIDTH           : 750px;
20
}
21
a.ref {
22
  BACKGROUND-COLOR: inherit;
23
  FONT-SIZE       : 8pt;
24
  LETTER-SPACING  : 0.1em;
25
}
26
h1 {
27
  BACKGROUND-COLOR: silver;
28
  BORDER          : thin solid black;
29
  FONT-SIZE       : x-large;
30
  FONT-WEIGHT     : bold;
31
  DISPLAY         : block;
32
}
33
h2 {
34
  FONT-SIZE       : large;
35
}
36
h3 {
37
  FONT-SIZE       : medium;
38
}
39
h4 {
40
  FONT-SIZE       : small;
41
  FONT-WEIGHT     : bold;
42
}
43
h5 {
44
  FONT-SIZE       : small;
45
  FONT-WEIGHT     : normal;
46
  TEXT-DECORATION : underline;
47
}
48
table {
49
  border-collapse : collapse;
50
  width           : 100%;
51
}
52
.bb {
53
  BORDER-BOTTOM   : gray dotted thin;
54
}
55
.blb {
56
  BORDER-LEFT     : gray dotted thin;
57
  BORDER-BOTTOM   : gray dotted thin;
58
  TEXT-ALIGN      : center;
59
}
60
.bl {
61
  BORDER-LEFT     : gray dotted thin;
62
}
63
.center {
64
  TEXT-ALIGN      : center;
65
}
66
p.comment {
67
  FONT-FAMILY     : monospace;
68
  FONT-SIZE       : 9pt;
69
  FONT-WEIGHT     : 500;
70
  WHITE-SPACE     : pre-wrap;      /* css-3 */
71
  WHITE-SPACE     : -moz-pre-wrap; /* Mozilla, since 1999 */
72
  WHITE-SPACE     : -pre-wrap;     /* Opera 4-6 */
73
  WHITE-SPACE     : -o-pre-wrap;   /* Opera 7 */
74
  WORD-WRAP       : break-word;    /* Internet Explorer 5.5+ */
75
}
76
span.comment {
77
  BACKGROUND-COLOR: transparent;
78
  FONT-FAMILY     : Areal;
79
  FONT-SIZE       : 8pt;
80
  LETTER-SPACING  : 0.2em;
81
}
82
p.example {
83
  BACKGROUND-COLOR: #DCDCDC;
84
  font-family     : monospace;
85
  FONT-SIZE       : 9pt;
86
  LETTER-SPACING  : 0.1em;
87
  LINE-HEIGHT     : 1.5em;
88
  WHITE-SPACE     : pre-wrap;      /* css-3 */
89
  WHITE-SPACE     : -moz-pre-wrap; /* Mozilla, since 1999 */
90
  WHITE-SPACE     : -pre-wrap;     /* Opera 4-6 */
91
  WHITE-SPACE     : -o-pre-wrap;   /* Opera 7 */
92
  WORD-WRAP       : break-word;    /* Internet Explorer 5.5+ */
93
}
94
p.format {
95
  BORDER          : gray dotted thin;
96
  FONT-FAMILY     : Helvetica;
97
  FONT-SIZE       : 9pt;
98
  LETTER-SPACING  : 0.2em;
99
  LINE-HEIGHT     : 2em;
100
  WHITE-SPACE     : pre-wrap;      /* css-3 */
101
  WHITE-SPACE     : -moz-pre-wrap; /* Mozilla, since 1999 */
102
  WHITE-SPACE     : -pre-wrap;     /* Opera 4-6 */
103
  WHITE-SPACE     : -o-pre-wrap;   /* Opera 7 */
104
  WORD-WRAP       : break-word;    /* Internet Explorer 5.5+ */
105
}
106
.header {
107
  BACKGROUND-COLOR: silver;
108
  BORDER          : thin solid black;
109
  FONT-SIZE       : xx-large;
110
}
111
p.label {
112
  FONT-FAMILY     : Arial;
113
  FONT-WEIGHT     : bold;
114
  LETTER-SPACING  : 0.1em;
115
}
116
p.quotes {
117
  BACKGROUND-COLOR: #F5F5F5;
118
  FONT-FAMILY     : Arial;
119
  FONT-STYLE      : italic;
120
  LETTER-SPACING  : 0.1em;
121
}
122
sup {
123
  BACKGROUND-COLOR: transparent;
124
  FONT-SIZE       : x-small;
125
  FONT-WEIGHT     : bold;
126
  VERTICAL-ALIGN  : super;
127
}
128
.ref {
129
  BACKGROUND-COLOR: transparent;
130
  FONT-SIZE       : 8pt;
131
  LETTER-SPACING  : 0.1em;
132
}
133
.top {
134
  VERTICAL-ALIGN  : top;
135
}
136
</style>
137
</head>
138
<body>
139
<a name="top"></a>
140
<p class="header">iCalcreator v2.18</p>
141
<p>
142
iCalcreator v2.18<br>
143
Copyright (c) 2007-2013 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
144
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
145
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
146
</p>
147

    
148
<h2>Preface</h2>
149
<p>
150
This document describes usage of iCalcreator, a <em>PHP</em> software implementation of standards <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a> to manage iCal formatted files.
151
</p>
152
<p>
153
This document is provided by kigkonsult for informational purposes
154
and is provided on an &quot;as is&quot; basis without any warranties expressed or implied.
155
</p>
156
<p>
157
Information in this document is subject to change without notice and does
158
not represent a commitment on the part of kigkonsult.
159
The software described in this document is provided under a <a href="#Copyright_and_Licence">license agreement</a>.
160
The software may be used only in accordance with the terms of that <a href="#Copyright_and_Licence">license agreement</a>.
161
It is against the law to copy or use the software except as specifically allowed in the <a href="#Copyright_and_Licence">license agreement</a>.
162
</p>
163
<p>
164
It is the users responsibility to ensure the suitability of the software before using it.
165
In no circumstances will kigkonsult be responsible for
166
the use of the software's outcomes or results or any loss
167
or damage of data or programs as a result of using the software.
168
The use of the software implies acceptance of these terms.
169
</p>
170
<p>
171
This document makes previous versions obsolete.
172
</p>
173
<a href="#INDEX">[index]</a></a>
174

    
175
<a name="INTRO"></a><h1>1 INTRO</h1>
176
<p>
177
iCalcreator is a <em>PHP</em> class package managing iCal files, supporting (non-)<strong>calendar</strong>
178
systems and applications to process and communicate <strong>calendar</strong> information like
179
events, agendas, tasks, reports, totos and journaling information.
180
</p>
181
<p>
182
The iCal standards are <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a>.</p>
183
<p>
184
iCalcreator features create, parse, edit and select <strong>calendar</strong> and <strong>calendar</strong> components.
185
</p>
186
<p>
187
The iCalcreator package, built of a <strong>calendar</strong> class with support of a function class and helper functions,
188
are <strong>calendar</strong> component property oriented. For iCalcreator 2.18 version (and later),
189
<em>PHP</em> version &gt;= 5.2.0 is required, due to the use of <em>PHP</em> DateTime class (and related functions) .
190
</p>
191
<p>
192
The iCalcreator main class, utility class and helper functions are all included in the &quot;iCalcreator.class.php&quot; file.
193
</p>
194
<p>
195
More iCalcreator supplementary, &quot;howto&quot; and coding support information will be found at
196
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>.
197
A strong recommendation is to have this document open in parallell when exploiting the link.
198
</p>
199
<p>
200
iCalcreator will support hiphop if the HDF AllDynamic option is enabled (the helper <a href="#iCal2XML">iCal2XML</a> function is excluded).
201
</p>
202
<br>
203
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
204

    
205
<a name="Standards"></a><h2>1.1 Standards</h2>
206

    
207
<h4>iCal</h4>
208
The <strong>iCalendar</strong> format, <strong>iCal</strong>, as described in
209
<dl>
210
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a>
211
<dd>&quot;Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)&quot;
212
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
213
<dd>&quot;iCalendar Transport-Independent Interoperability Protocol (iTIP)&quot;<br>Scheduling Events, BusyTime, To-dos and Journal Entries
214
</dl>
215
<p class="quotes">. ..allows for the capture and exchange of information normally stored
216
within a calendaring and scheduling application.</p>
217
and
218
<p class="quotes">. ..is an exchange format between applications or systems.</p>
219
<p><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a> and
220
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
221
obsoletes, respectively,
222
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="Download RFC2445 in text format" target="_blank">rfc2445</a> and
223
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2446" title="Download RFC2446 in text format" target="_blank">rfc2446</a>.
224
</p>
225
<p>
226
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!
227
Knowledge of <strong>calendar</strong> protocol rfc5545/rfc5546 is to recommend.
228
</p>
229
<p>
230
Any references to rfc2445, below, corresponds to rfc5545.
231
</p>
232

    
233
<h4>xCal</h4>
234
<p>iCalcreator also supports xCal (iCal xml) rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;, to be downloaded from</p>
235
<dl>
236
<dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc6321" title="Download RFC6321 in text format" target="_blank">rfc6321</a>
237
<dd>&quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;
238
</dl>
239
<p>
240
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>.
241
</p>
242

    
243
<br>
244
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
245

    
246

    
247
<a name="This_manual"></a><h2>1.2 This manual</h2>
248
<p>This style is used for text.</p>
249
<p class="format">This style is used for formats.</p>
250
<p class="example">&lt;?php
251
.. .
252
This style is used for <em>PHP</em> coding examples.
253
<span class="comment"> // this style is used for coding comments.</span>
254
.. .
255
</p>
256
<p class="comment">This style is used for content details.</p>
257
<p class="quotes">This style is used for RFC2445/5545 quotes.</p>
258

    
259
<br>
260
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
261

    
262

    
263
<a name="Versioning"></a><h2>1.3 Versioning</h2>
264

    
265
<p>The release numbering convention used is major.minor(.micro&nbsp;/&nbsp;suffix).</p>
266
<dl>
267
<dt>Major
268
<dd>Indicates a very large change in the core package. Rewrites or major milestones.
269
<dt>Minor
270
<dd>Significant amount of feature addition/modification.<br>odd number - development/experimental release<br> even number - production release
271
<dt>Micro
272
<dd>Primarily bug fix and maintenance number.
273
<dt>Suffix
274
<dd>rc1 for first release candidate etc.
275
</dl>
276

    
277
<p>The release plan is based on yearly releases with exception of emergency releases.</p>
278

    
279
<br>
280
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
281

    
282
<a name="Support"></a><h2>1.4 Support</h2>
283
<p>
284
The main support channel is using iCalcreator
285
<a title="Sourceforge" href="http://sourceforge.net/projects/icalcreator/forums/" target="_blank">Sourceforge</a> forum.
286
</p>
287
<p>
288
Support and development is now focused on iCalcreator (Pro) 3.x versions, which, in turn, will affect future releases
289
of iCalcreator 2.x.
290
</p>
291
<p>
292
Use the contact <a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se/contact" target="_blank">page</a>
293
for queries, improvement/development issues or professional support and development.
294
Please note that paid support or consulting service has the highest priority.
295
</p>
296
<p>
297
kigkonsult offer services for software support, design and development of customizations and adaptations
298
of <em>PHP</em>/<em>MySQL</em> solutions
299
with a special focus on software long term utility and reliability,
300
supported through our agile acquire/design/transition process model.
301
</p>
302

    
303
<br>
304
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
305

    
306

    
307
<a name="Donate"></a><h2>1.5 Donate</h2>
308
<p>
309
You can show your appreciation for our free software,
310
and can support future development by making a donation to the kigkonsult project iCalcreator.
311
</p>
312
<p>
313
Make a donation of any size by clicking <a href="http://kigkonsult.se/contact/index.php#Donate" title="Donate" target="_blank">here</a>.
314
Thanks in advance!
315
</p>
316

    
317
<br>
318
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
319

    
320
<a name="INSTALL"></a><h2>1.6 Install</h2>
321

    
322
<a name="Basic"></a><h3>1.6.1 Basic</h3>
323
<p>
324
Unpack to any folder<br>
325
- add this folder to your include-path<br>
326
- or unpack to your application-(include)-folder
327
</p>
328
<p>Add</p>
329
<p class="format">require_once &quot;[folder/]iCalcreator.class.php&quot;;</p>
330
<p>to your <em>PHP</em>-script.</p>
331
<p>
332
If using <em>PHP</em> version 5.1 or higher, the default timezone may need to be set.
333
</p>
334
<p>
335
Creating a new iCalcreator object instance/component instance, review <a href="#iCalcreator_configuration_methods">config</a> settings.
336
</p>
337

    
338
<br>
339
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
340

    
341

    
342
<a name="Boost"></a><h3>1.6.2 Boost performance</h3>
343
<p>
344
To really boost performance, kigkonsult can now offer <em>PHP</em> (4 and 5) packages (iCalcreator etc) in byte coded files,
345
using <a href="http://www.ioncube.com" target="_blank"><u>ionCube</u></a> encoder.
346
</p>
347
<p>
348
Encoded files use a platform independent file format, and can be run on any platform for which ionCube supply a (free) Loader.
349
Currently supported platforms are Windows (e.g. NT, XP, W2K), Intel Linux, FreeBSD, NetBSD, OpenBSD, OS X, and Sparc Solaris.
350
</p>
351
<p>
352
Visit kigkonsult.se contact <a href="http://kigkonsult.se/contact/index.php" target="_blank"><u>page</u></a> for information and purchase.
353
</p>
354
<p>
355
Use basic install (above), install ionCube Loader (requires an update of &quot;php.ini&quot;
356
or additional file in &quot;/etc/php.d&quot; folder AND the execute rights to use the <em>PHP</em> &quot;dl&quot; function)
357
and simply replace the <em>PHP</em> class files with the encoded files.
358
</p>
359

    
360
<br>
361
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
362

    
363

    
364
<a name="Additional_Descriptors"></a><h2>1.7 Additional Descriptors</h2>
365
<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>)
366
may be required when importing iCal files into some calendaring software (MS etc.):</p>
367
<dl>
368
<dt>on <strong>calendar</strong> level
369
<dd><a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
370
<dd><a href="#X-PROPERTY">X-WR-CALNAME</a> x-property
371
<dd><a href="#X-PROPERTY">X-WR-CALDESC</a> x-property
372
<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>
373
<dd><a href="#X-PROPERTY">X-WR-TIMEZONE</a> x-property
374
<dt>on component level
375
<dd><a href="#DTSTAMP">DTSTAMP</a> property (in iCalcreator created automatically, if not set)
376
<dd><a href="#UID">UID</a> property (in iCalcreator created automatically, if not set)
377
<dt>on component level in a <a href="#VTIMEZONE">vtimezone</a> component
378
<dd><a href="#X-PROPERTY">X-LIC-LOCATION</a> x-property
379
</dl>
380
<p class="label">Example</p>
381
<p>
382
A strong recommendation is also to set config <a href="#Unique_id">unique_id</a>, creating a new vcalendar/component instance,
383
to ensure accurate setting of all components <a href="#UID">UID</a> property, especially before <a href="#parse_merge">parse</a>.
384
Also setting of config timezone (&quot;TZID&quot; and &quot;X-WR-TIMEZONE&quot; below) is to recommend.
385
</p>
386
<p class="example">&lt;?php
387
.. .
388
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
389
$vcalendar = new vcalendar( $config );
390
$vcalendar-&gt;setProperty( &quot;method&quot;,        &quot;PUBLISH&quot; )
391
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;,  &quot;Calendar Sample&quot; );
392
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;,  &quot;Calendar Description&quot; );
393
$uuid      = &quot;3E26604A-50F4-4449-8B3E-E4F4932D05B5&quot;;
394
$vcalendar-&gt;setProperty( &quot;X-WR-RELCALID&quot;, $uuid );
395
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
396
.. .
397
</p>
398

    
399
<br>
400
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
401

    
402

    
403
<a name="Addendum"></a><h2>1.8 Addendum</h2>
404
<p>
405
For iCalcreator usage, coding samples and tests, visit the public kigkonsult.se
406
<a title="iCalcreator coding and test pages" href="http://kigkonsult.se/test/index.php" target="_blank">test</a> resource.
407
</p>
408
<dl>
409
<dt>Examples how to employ iCalcreator in software development
410
<dd><a title="dbiCal" href="http://kigkonsult.se/dbiCal/index.php" target="_blank">dbiCal</a>, an iCal file <i>PHP</i> database backend solution.
411
<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>
412
<dd><a title="tinycal" href="http://kigkonsult.se/tinycal/index.php" target="_blank">tinycal</a>, <strong>calendar</strong>-in-a-box.
413
</dl>
414
<p>
415
There are free iCal/xCal icons (use as buttons on a web page?) to download
416
<a href="http://kigkonsult.se/downloads/i.php?i=all" title="iCal images" target="_blank">here</a>.
417
</p>
418
<p>
419
The <em>PHP</em> coding in this document or &quot;coding samples&quot; (above) are only for display of usage, recommendation is to use a
420
coding standard, the following, incomplete, list is a good start;
421
</p>
422
<dl>
423
<dd><a href="http://www.dagbladet.no/development/phpcodingstandard/" target="_blank">http://www.dagbladet.no/development/phpcodingstandard/</a>
424
<!-- <a href="http://ez.no/ezpublish/documentation/development/standards/php" target="_blank">http://ez.no/ezpublish/documentation/development/standards/php</a> -->
425
<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>
426
<!-- <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> -->
427
<dd><a href="http://pear.php.net/manual/en/standards.php" target="_blank">http://pear.php.net/manual/en/standards.php</a>
428
</dl>
429

    
430
<br>
431
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
432

    
433

    
434
<a name="INDEX"></a><h2>1.9 INDEX</h2>
435

    
436
<a href="#INTRO">1 INTRO</a><br>
437
<br>
438
<a href="#Standards">1.1 Standards</a><br>
439
<a href="#This_manual">1.2 This manual</a><br>
440
<a href="#Versioning">1.3 Versioning</a><br>
441
<a href="#Support">1.4 Support</a><br>
442
<a href="#Donate">1.5 Donate</a><br>
443
<a href="#INSTALL">1.6 Install</a><br>
444
<a href="#Basic">1.6.1 Basic</a><br>
445
<a href="#Boost">1.6.2 Boost performance</a><br>
446
<a href="#Additional_Descriptors">1.7 Additional_Descriptors</a><br>
447
<a href="#Addendum">1.8 Addendum</a><br>
448
<a href="#INDEX">1.9 INDEX</a><br>
449
<br>
450
<a href="#Calendar_Component_list">2 Calendar Component list</a><br>
451
<br>
452
<a href="#VCALENDAR">2.1  VCALENDAR</a><br>
453
<a href="#VEVENT">2.2  VEVENT</a><br>
454
<a href="#VTODO">2.3  VTODO</a><br>
455
<a href="#VJOURNAL">2.4  VJOURNAL</a><br>
456
<a href="#VFREEBUSY">2.5  VFREEBUSY</a><br>
457
<a href="#VALARM">2.6  VALARM</a><br>
458
<a href="#VTIMEZONE">2.7  VTIMEZONE</a><br>
459
<a href="#CalProps">2.8  Component Properties</a><br>
460
<br>
461
<a href="#Function_list">3 Function list</a><br>
462
<br>
463
<a href="#iCalcreator_object_methods">3.1 iCalcreator object methods</a><br>
464
<br>
465
<a href="#Calendar_object_constructors">3.1.1 Constructors</a><br>
466
<a href="#vcalendar_constr">3.1.1.1 vcalendar</a><br>
467
<a href="#vevent_constr">3.1.1.2 vevent</a><br>
468
<a href="#vtodo_constr">3.1.1.3 vtodo</a><br>
469
<a href="#vjournal_constr">3.1.1.4 vjournal</a><br>
470
<a href="#vfreebusy_constr">3.1.1.5 vfreebusy</a><br>
471
<a href="#valarm_constr">3.1.1.6 valarm</a><br>
472
<a href="#vtimezone_constr">3.1.1.7 vtimezone</a><br>
473
<a href="#standard_constr">3.1.1.8 standard</a><br>
474
<a href="#daylight_constr">3.1.1.9 daylight</a><br>
475
<br>
476
<a href="#iCalcreator_object_property_methods">3.1.2 iCalcreator object property methods</a><br>
477
<a href="#deleteProperty">3.1.2.1 deleteProperty</a><br>
478
<a href="#getProperty">3.1.2.2 getProperty</a><br>
479
<a href="#setProperty">3.1.2.3 setProperty</a><br>
480
<a href="#CALSCALE">3.1.2.4 CALSCALE</a><br>
481
<a href="#METHOD">3.1.2.5 METHOD</a><br>
482
<a href="#VERSION">3.1.2.6 VERSION</a><br>
483
<a href="#X-PROPERTY">3.1.2.7 X-PROPERTY</a><br>
484
<br>
485
<a href="#iCalcreator_component_object_methods">3.1.3 iCalcreator component object methods</a><br>
486
<a href="#deleteComponent">3.1.3.1 deleteComponent</a><br>
487
<a href="#getComponent">3.1.3.2 getComponent</a><br>
488
<a href="#newComponent">3.1.3.3 newComponent</a><br>
489
<a href="#selectComponents">3.1.3.4 selectComponents</a><br>
490
<a href="#setComponent">3.1.3.5 setComponent</a><br>
491
<br>
492
<a href="#iCalcreator_inputoutput_methods">3.1.4 iCalcreator input/output methods</a><br>
493
<a href="#parse_merge">3.1.4.1 parse and merge</a><br>
494
<a href="#createCalendar">3.1.4.2 createCalendar</a><br>
495
<a href="#returnCalendar">3.1.4.3 returnCalendar</a><br>
496
<a href="#saveCalendar">3.1.4.4 saveCalendar</a><br>
497
<a href="#sort">3.1.4.5 sort</a><br>
498
<a href="#useCachedCalendar">3.1.4.6 useCachedCalendar</a><br>
499
<br>
500
<a href="#iCalcreator_configuration_methods">3.1.5 iCalcreator configuration methods</a><br>
501
<a href="#configKeys">3.1.5.1 configuration keys</a><br>
502
<a href="#getConfig">3.1.5.2 getConfig</a><br>
503
<a href="#initConfig">3.1.5.3 calendar/component initialization</a><br>
504
<a href="#setConfig">3.1.5.4 setConfig</a><br>
505
<a href="#allowEmpty">3.1.5.5 Allow empty components</a><br>
506
<a href="#Compsinfo">3.1.5.6 Component information</a><br>
507
<a href="#Delimiter">3.1.5.7 Delimiter</a><br>
508
<a href="#Directory">3.1.5.8 Directory</a><br>
509
<a href="#Fileinfo">3.1.5.9 Fileinfo</a><br>
510
<a href="#Filename">3.1.5.10 Filename</a><br>
511
<a href="#Filesize">3.1.5.11 Filesize</a><br>
512
<a href="#Format">3.1.5.12 Format</a><br>
513
<a href="#Language">3.1.5.13 Language</a><br>
514
<a href="#NewlineChar">3.1.5.14 NewlineChar</a><br>
515
<a href="#setPropertyNames">3.1.5.15 setPropertyNames</a><br>
516
<a href="#dTZID">3.1.5.16 TZID</a><br>
517
<a href="#Unique_id">3.1.5.17 Unique_id</a><br>
518
<a href="#configURL">3.1.5.18 URL</a><br>
519
<br>
520
<a href="#Calendar_component_object_property_function_list">3.2 Calendar component property method list</a><br>
521
<br>
522
<a href="#deleteProperty_PROP">3.2.1 deleteProperty</a><br>
523
<a href="#getProperty_PROP">3.2.2 getProperty</a><br>
524
<a href="#parse">3.2.3 parse</a><br>
525
<a href="#setProperty_PROP">3.2.4 setProperty</a><br>
526
<dl>
527
<dt>Ascending property order
528
<dd><a href="#ACTION">3.2.5 ACTION</a>
529
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
530
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
531
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
532
<dd><a href="#CLASS">3.2.9 CLASS</a>
533
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
534
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
535
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
536
<dd><a href="#CREATED">3.2.13 CREATED</a>
537
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
538
<dd><a href="#DTEND">3.2.15 DTEND</a>
539
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
540
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
541
<dd><a href="#DUE">3.2.18 DUE</a>
542
<dd><a href="#DURATION">3.2.19 DURATION</a>
543
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
544
<dd><a href="#EXRULE">3.2.21 EXRULE</a>
545
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
546
<dd><a href="#GEO">3.2.23 GEO</a>
547
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
548
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
549
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
550
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
551
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
552
<dd><a href="#RDATE">3.2.29 RDATE</a>
553
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
554
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
555
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
556
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
557
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
558
<dd><a href="#RRULE">3.2.35 RRULE</a>
559
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
560
<dd><a href="#STATUS">3.2.37 STATUS</a>
561
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
562
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
563
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
564
<dd><a href="#TZID">3.2.41 TZID</a>
565
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
566
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
567
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
568
<dd><a href="#TZURL">3.2.45 TZURL</a>
569
<dd><a href="#UID">3.2.46 UID</a>
570
<dd><a href="#URL">3.2.47 URL</a>
571
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
572
<dt>Descriptive Component Properties
573
<dd><a href="#ATTACH">3.2.6 ATTACH</a>
574
<dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
575
<dd><a href="#COMMENT">3.2.10 COMMENT</a>
576
<dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
577
<dd><a href="#GEO">3.2.23 GEO</a>
578
<dd><a href="#LOCATION">3.2.25 LOCATION</a>
579
<dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
580
<dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
581
<dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
582
<dd><a href="#STATUS">3.2.37 STATUS</a>
583
<dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
584
<dt>Date and Time Component Properties
585
<dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
586
<dd><a href="#DTEND">3.2.15 DTEND</a>
587
<dd><a href="#DUE">3.2.18 DUE</a>
588
<dd><a href="#DTSTART">3.2.17 DTSTART</a>
589
<dd><a href="#DURATION">3.2.19 DURATION</a>
590
<dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
591
<dd><a href="#TRANSP">3.2.39 TRANSP</a>
592
<dt>Time Zone Component Properties
593
<dd><a href="#TZID">3.2.41 TZID</a>
594
<dd><a href="#TZNAME">3.2.42 TZNAME</a>
595
<dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
596
<dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
597
<dd><a href="#TZURL">3.2.45 TZURL</a>
598
<dt>Relationship Component Properties
599
<dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
600
<dd><a href="#CONTACT">3.2.12 CONTACT</a>
601
<dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
602
<dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
603
<dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
604
<dd><a href="#URL">3.2.47 URL</a>
605
<dd><a href="#UID">3.2.46 UID</a>
606
<dt>Recurrence Component Properties
607
<dd><a href="#EXDATE">3.2.20 EXDATE</a>
608
<dd><a href="#RDATE">3.2.29 RDATE</a>
609
<dd><a href="#RRULE">3.2.35 RRULE</a>
610
<dt>Alarm Component Properties
611
<dd><a href="#ACTION">3.2.5 ACTION</a>
612
<dd><a href="#REPEAT">3.2.32 REPEAT</a>
613
<dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
614
<dt>Change Management Component Properties
615
<dd><a href="#CREATED">3.2.13 CREATED</a>
616
<dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
617
<dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
618
<dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
619
<dt>Miscellaneous Component Properties
620
<dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
621
<dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
622
</dl>
623
<a href="#iCalcreator_component_configuration_methods">3.3 iCalcreator Component configuration methods</a><br>
624
<br>
625
<a href="#Language_PROP">3.3.1 Language</a><br>
626
<br>
627
<a href="#iCalcreator_component_object_misc_methods">3.4 iCalcreator component object misc. methods</a><br>
628
<br>
629
<a href="#deleteComponent_PROP">3.4.1 deleteComponent</a><br>
630
<a href="#getComponent_PROP">3.4.2 getComponent</a><br>
631
<a href="#newComponent_PROP">3.4.3 newComponent</a><br>
632
<a href="#setComponent_PROP">3.4.4 setComponent</a><br>
633
<br>
634
<a href="#iCalUtilityFunctions">4 iCalUtilityFunctions</a><br>
635
<br>
636
<a href="#convEolChar">4.1 convEolChar</a><br>
637
<a href="#createTimezone">4.2 createTimezone</a><br>
638
<a href="#ms2phpTZ">4.3 ms2phpTZ</a><br>
639
<a href="#transformDateTime">4.4 transformDateTime</a><br>
640
<a href="#mddtuf">4.5 Misc. date/duration/timestamp util. functions</a><br>
641
<br>
642
<a href="#helperFunctions">5 Helper functions</a><br>
643
<br>
644
<a href="#XMLhelpers">5.1 iCal and XML helper functions</a><br>
645
<br>
646
<a href="#iCal2XML">5.1.1 iCal2XML</a><br>
647
<a href="#XML2iCal">5.1.2 XML2iCal</a><br>
648
<br>
649
<a href="#vCardhelpers">5.2 iCal and vCard helper functions</a><br>
650
<br>
651
<a href="#iCal2vCard">5.2.1 iCal2vCard</a><br>
652
<a href="#iCal2vCards">5.2.2 iCal2vCards</a><br>
653
<br>
654
<br>
655
<a href="#TZhelpers">5.3 Time zone helper functions</a><br>
656
<br>
657
<a href="#getTzOffsetForDate">5.3.1 getTzOffsetForDate</a><br>
658
<a href="#getTimezonesAsDateArrays">5.3.2 getTimezonesAsDateArrays</a><br>
659
<br>
660
<a href="#Copyright_and_Licence">6 COPYRIGHT AND LICENSE</a><br>
661
<br>
662
<a href="#Copyright">6.1 Copyright</a><br>
663
<a href="#Licence">6.2 License</a><br>
664
<br>
665
<a href="#INDEX">[index]</a> <a href="#top">[top]</a>
666

    
667
<a name="Calendar_Component_list"></a><h1>2 Calendar Component list</h1>
668
<p>
669
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>)!
670
(Described in iCal output format, content corresponds to xCal format.)
671
</p>
672
<a name="VCALENDAR"></a><h2>2.1  VCALENDAR</h2>
673
<p class="center">icalobject = 1*(&quot;BEGIN&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF</p>
674
<p class="center">icalbody</p>
675
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VCALENDAR&quot; CRLF)</p>
676
<p>icalbody = calprops component</p>
677
<p>calprops = 2*(</p>
678
<p class="center">&quot;prodid&quot; and &quot;version&quot; are both REQUIRED, but MUST NOT occur more than once
679
<p class="center">prodid / <a href="#VERSION">version</a> /</p>
680
<p class="center">&quot;calscale&quot;and &quot;method&quot;are optional, but MUST NOT occur more than once</p>
681
<p class="center"><a href="#CALSCALE">calscale</a> / <a href="#METHOD">method</a> /</p>
682
<p class="center"><a href="#X-PROPERTY">x-prop</a></p>
683
<p>)</p>
684
<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>
685
<p class="center">iana-comp  = &quot;BEGIN&quot; &quot;:&quot; iana-token CRLF</p>
686
<p class="center">1*contentline</p>
687
<p class="center">&quot;END&quot; &quot;:&quot; iana-token CRLF</p>
688
<p class="center">x-comp     = &quot;BEGIN&quot; &quot;:&quot; x-name CRLF</p>
689
<p class="center">1*contentline</p>
690
<p class="center">&quot;END&quot; &quot;:&quot; x-name CRLF</p>
691
<p>*) <span class="comment">not supported by iCalcreator</span></p>
692

    
693
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
694

    
695
<a name="VEVENT"></a><h2>2.2  VEVENT</h2>
696
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
697
<p class="center">eventprop *alarmc</p>
698
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VEVENT&quot; CRLF</p>
699
<p>eventprop = *(</p>
700
<p class="center">the following are optional,but MUST NOT occur more than once</p>
701
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> /</p>
702
<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>
703
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> / </p>
704
<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>
705
<p class="center">either &quot;<a href="#DTEND">dtend</a>&quot; or &quot;<a href="#DURATION">duration</a>&quot; may appear in a &quot;eventprop&quot;, </p>
706
<p class="center">but &quot;<a href="#DTEND">dtend</a>&quot; and &quot;<a href="#DURATION">duration</a>&quot; MUST NOT occur in the same &quot;eventprop&quot;</p>
707
<p class="center"><a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> /</p>
708
<p class="center">the following are optional, and MAY occur more than once</p>
709
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
710
<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>
711
<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>
712
<p>)</p>
713

    
714
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
715

    
716
<a name="VTODO"></a><h2>2.3  VTODO</h2>
717
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
718
<p class="center">todoprop *alarmc</p>
719
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTODO&quot; CRLF</p>
720
<p>todoprop   = *(</p>
721
<p class="center">the following are optional, but MUST NOT occur more than once</p>
722
<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>
723
<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>
724
<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>
725
<p class="center">either &quot;<a href="#DUE">due</a>&quot; or &quot;<a href="#DURATION">duration</a>&quot; may appear in a &quot;todoprop&quot;,</p>
726
<p class="center"> but &quot;<a href="#DUE">due</a>&quot; and &quot;<a href="#DURATION">duration</a>&quot; MUST NOT occur in the same &quot;todoprop&quot;</p>
727
<p class="center"><a href="#DUE">due</a> / <a href="#DURATION">duration</a> /</p>
728
<p class="center">the following are optional,and MAY occur more than once</p>
729
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
730
<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>
731
<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>
732
<p>)</p>
733

    
734
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
735

    
736
<a name="VJOURNAL"></a><h2>2.4  VJOURNAL</h2>
737
<p class="center">journalc   = &quot;BEGIN&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
738
<p class="center">jourprop</p>
739
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VJOURNAL&quot; CRLF</p>
740
<p>jourprop   = *(</p>
741
<p class="center">the following are optional, but MUST NOT occur more than once</p>
742
<p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> / </p>
743
<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>
744
<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>
745
<p class="center">the following are optional,and MAY occur more than once</p>
746
<p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> /</p>
747
<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>
748
<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>
749
<p>)</p>
750

    
751
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
752

    
753
<a name="VFREEBUSY"></a><h2>2.5  VFREEBUSY</h2>
754
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
755
<p class="center">fbprop</p>
756
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VFREEBUSY&quot; CRLF</p>
757
<p>fbprop     = *(</p>
758
<p class="center">the following are optional, but MUST NOT occur more than once</p>
759
<p class="center"><a href="#CONTACT">contact</a> / <a href="#DTSTART">dtstart</a> / <a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> / </p>
760
<p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#ORGANIZER">organizer</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / </p>
761
<p class="center">the following are optional,and MAY occur more than once</p>
762
<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>
763
<p>)</p>
764

    
765
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
766

    
767
<a name="VALARM"></a><h2>2.6  VALARM</h2>
768
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p>
769
<p class="center">(audioprop / dispprop / emailprop / procprop)</p>
770
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VALARM&quot; CRLF</p>
771
<p>audioprop  = 2*(</p>
772
<p class="center">&quot;<a href="#ACTION">action</a>&quot; and &quot;<a href="#TRIGGER">trigger</a>&quot; are both REQUIRED, but MUST NOT occur more than once</p>
773
<p class="center"><a href="#ACTION">action</a> / <a href="#TRIGGER">trigger</a> /</p>
774
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional,and MUST NOT occur more than once each,</p>
775
<p class="center">but if one occurs, so MUST the other</p>
776
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
777
<p class="center">the following is optional, but MUST NOT occur more than once</p>
778
<p class="center"><a href="#ATTACH">attach</a> / </p>
779
<p class="center">the following is optional, and MAY occur more than once</p>
780
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
781
<p>)</p>
782

    
783
<p>dispprop   = 3*(</p>
784
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
785
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> /</p>
786
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional,and MUST NOT occur more than once each,</p>
787
<p class="center">but if one occurs, so MUST the other</p>
788
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
789
<p class="center">the following is optional, and MAY occur more than once</p>
790
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
791
<p>)</p>
792

    
793
<p>emailprop  = 5*(</p>
794
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
795
<p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> / <a href="#SUMMARY">summary</a></p>
796
<p class="center">the following is REQUIRED, and MAY occur more than once</p>
797
<p class="center"><a href="#ATTENDEE">attendee</a> / </p>
798
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional, and MUST NOT occur more than once each,</p>
799
<p class="center">but if one occurs, so MUST the other</p>
800
<p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
801
<p class="center">the following are optional, and MAY occur more than once</p>
802
<p class="center"><a href="#ATTACH">attach</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
803
<p>)</p>
804

    
805
<p>procprop   = 3*(</p>
806
<p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
807
<p class="center"><a href="#ACTION">action</a> / <a href="#ATTACH">attach</a> / <a href="#TRIGGER">trigger</a> /</p>
808
<p class="center">&quot;<a href="#DURATION">duration</a>&quot; and &quot;<a href="#REPEAT">repeat</a>&quot; are both optional, and MUST NOT occur more than once each,</p>
809
<p class="center">but if one occurs, so MUST the other</p>
810
<p class="center"><a href="#DURATION">duration</a> /
811
<a href="#REPEAT">repeat</a> /</p>
812
<p class="center">&quot;<a href="#DESCRIPTION">description</a>&quot; is optional, and MUST NOT occur more than once</p>
813
<p class="center"><a href="#DESCRIPTION">description</a> / </p>
814
<p class="center">the following is optional, and MAY occur more than once</p>
815
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
816
<p>)</p>
817

    
818
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
819

    
820
<a name="VTIMEZONE"></a><h2>2.7  VTIMEZONE</h2>
821
<p class="center">&quot;BEGIN&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
822
<p>2*(</p>
823
<p class="center">&quot;<a href="#TZID">tzid</a>&quot; is required, but MUST NOT occur more than once</p>
824
<p class="center"><a href="#TZID">tzid</a> / </p>
825
<p class="center">&quot;<a href="#LAST-MODIFIED">last-mod</a>&quot; and &quot;<a href="#TZURL">tzurl</a>&quot; are optional, but MUST NOT occur more than once</p>
826
<p class="center"><a href="#LAST-MODIFIED">last-mod</a> / <a href="#TZURL">tzurl</a> /</p>
827
<p class="center">one of &quot;standardc&quot; or &quot;daylightc&quot; MUST occur and each MAY occur more than once.</p>
828
<p class="center">standardc / daylightc /</p>
829
<p class="center">the following is optional, and MAY occur more than once</p>
830
<p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
831
<p>)</p>
832
<p class="center">&quot;END&quot; &quot;:&quot; &quot;VTIMEZONE&quot; CRLF</p>
833
<p class="center">standardc  = &quot;BEGIN&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
834
<p class="center">tzprop</p>
835
<p class="center">&quot;END&quot; &quot;:&quot; &quot;STANDARD&quot; CRLF</p>
836
<p class="center">daylightc  = &quot;BEGIN&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>
837
<p class="center">tzprop</p>
838
<p class="center">&quot;END&quot; &quot;:&quot; &quot;DAYLIGHT&quot; CRLF</p>
839

    
840
<p>tzprop     = 3*(</p>
841
<p class="center">the following are each REQUIRED, but MUST NOT occur more than once</p>
842
<p class="center"><a href="#DTSTART">dtstart</a> / <a href="#TZOFFSETTO">tzoffsetto</a> / <a href="#TZOFFSETFROM">tzoffsetfrom</a> /</p>
843
<p class="center">the following are optional, and MAY occur more than once</p>
844
<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>
845
<p>)</p>
846

    
847
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
848

    
849
<a name="CalProps"></a><h2>2.8  Component Properties</h2>
850
<p>
851
A comprehensive table showing relation between <strong>calendar</strong> components and properties.
852
<a href="#VTIMEZONE">vtimezone</a> properties are not included.
853
</p>
854
<table>
855
<tr>
856
<td>0-1</td>
857
<td colspan="8">OPTIONAL property, MUST NOT occur more than once.</td>
858
</tr>
859
<tr>
860
<td>0-m</td>
861
<td colspan="8">OPTIONAL property, MAY occur more than once.</td>
862
</tr>
863
<tr>
864
<td>0&nbsp;/&nbsp;1=1</td>
865
<td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST the other</td>
866
</tr>
867
<tr>
868
<td>0*1</td>
869
<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>
870
</tr>
871
<tr>
872
<td>1-m</td>
873
<td colspan="8">REQUIRED property, MAY occur more than once.</td>
874
</tr>
875
<tr>
876
<td>1</td>
877
<td colspan="8">REQUIRED property, MUST NOT occur more than once.</td>
878
</tr>
879
<tr>
880
<td colspan="9">&nbsp;</td>
881
</tr>
882
<tr>
883
<td>&nbsp;</td>
884
<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>
885
<td class="bl bb center top" rowspan="2"><a class="ref" href="#VTODO">v<br>t<br>o<br>d<br>o</a></td>
886
<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>
887
<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>
888
<td class="bl top center" colspan="4"><a class="ref" href="#VALARM">v&nbsp;a&nbsp;l&nbsp;a&nbsp;r&nbsp;m</a></td>
889
</tr>
890
<tr>
891
<td class="bb">&nbsp;</td>
892
<td class="bl bb center ref"><br><br><br><br>a<br>u<br>d<br>i<br>o</td>
893
<td class="bl bb center ref"><br><br>d<br>i<br>s<br>p<br>l<br>a<br>y</td>
894
<td class="bl bb center ref"><br><br><br><br>e<br>m<br>a<br>i<br>l</td>
895
<td class="bl bb center ref">p<br>r<br>o<br>c<br>e<br>d<br>u<br>r<br>e</td>
896
</tr>
897
<tr>
898
<td class="bb"><a class="ref" href="#ACTION">action</a></td>
899
<td class="blb">&nbsp;</td>
900
<td class="blb">&nbsp;</td>
901
<td class="blb">&nbsp;</td>
902
<td class="blb">&nbsp;</td>
903
<td class="blb">1</td>
904
<td class="blb">1</td>
905
<td class="blb">1</td>
906
<td class="blb">1</td>
907
</tr>
908
<tr>
909
<td class="bb"><a class="ref" href="#ATTACH">attach</a></td>
910
<td class="blb">0-m</td>
911
<td class="blb">0-m</td>
912
<td class="blb">0-m</td>
913
<td class="blb">&nbsp;</td>
914
<td class="blb">0-1</td>
915
<td class="blb">&nbsp;</td>
916
<td class="blb">0-m</td>
917
<td class="blb">1</td>
918
</tr>
919
<tr>
920
<td class="bb"><a class="ref" href="#ATTENDEE">attendee</a></td>
921
<td class="blb">0-m</td>
922
<td class="blb">0-m</td>
923
<td class="blb">0-m</td>
924
<td class="blb">0-m</td>
925
<td class="blb">&nbsp;</td>
926
<td class="blb">&nbsp;</td>
927
<td class="blb">1-m</td>
928
<td class="blb">&nbsp;</td>
929
</tr>
930
<tr>
931
<td class="bb"><a class="ref" href="#CATEGORIES">categories</a></td>
932
<td class="blb">0-m</td>
933
<td class="blb">0-m</td>
934
<td class="blb">0-m</td>
935
<td class="blb">&nbsp;</td>
936
<td class="blb">&nbsp;</td>
937
<td class="blb">&nbsp;</td>
938
<td class="blb">&nbsp;</td>
939
<td class="blb">&nbsp;</td>
940
</tr>
941
<tr>
942
<td class="bb"><a class="ref" href="#CLASS">class</a></td>
943
<td class="blb">0-1</td>
944
<td class="blb">0-1</td>
945
<td class="blb">0-1</td>
946
<td class="blb">&nbsp;</td>
947
<td class="blb">&nbsp;</td>
948
<td class="blb">&nbsp;</td>
949
<td class="blb">&nbsp;</td>
950
<td class="blb">&nbsp;</td>
951
</tr>
952
<tr>
953
<td class="bb"><a class="ref" href="#COMMENT">comment</a></td>
954
<td class="blb">0-m</td>
955
<td class="blb">0-m</td>
956
<td class="blb">0-m</td>
957
<td class="blb">0-m</td>
958
<td class="blb">&nbsp;</td>
959
<td class="blb">&nbsp;</td>
960
<td class="blb">&nbsp;</td>
961
<td class="blb">&nbsp;</td>
962
</tr>
963
<tr>
964
<td class="bb"><a class="ref" href="#COMPLETED">completed</a></td>
965
<td class="blb">&nbsp;</td>
966
<td class="blb">0-1</td>
967
<td class="blb">&nbsp;</td>
968
<td class="blb">&nbsp;</td>
969
<td class="blb">&nbsp;</td>
970
<td class="blb">&nbsp;</td>
971
<td class="blb">&nbsp;</td>
972
<td class="blb">&nbsp;</td>
973
</tr>
974
<tr>
975
<td class="bb"><a class="ref" href="#CONTACT">contact</a></td>
976
<td class="blb">0-m</td>
977
<td class="blb">0-m</td>
978
<td class="blb">0-m</td>
979
<td class="blb">0-1</td>
980
<td class="blb">&nbsp;</td>
981
<td class="blb">&nbsp;</td>
982
<td class="blb">&nbsp;</td>
983
<td class="blb">&nbsp;</td>
984
</tr>
985
<tr>
986
<td class="bb"><a class="ref" href="#CREATED">created</a></td>
987
<td class="blb">0-1</td>
988
<td class="blb">0-1</td>
989
<td class="blb">0-1</td>
990
<td class="blb">&nbsp;</td>
991
<td class="blb">&nbsp;</td>
992
<td class="blb">&nbsp;</td>
993
<td class="blb">&nbsp;</td>
994
<td class="blb">&nbsp;</td>
995
</tr>
996
<tr>
997
<td class="bb"><a class="ref" href="#DESCRIPTION">description</a></td>
998
<td class="blb">0-1</td>
999
<td class="blb">0-1</td>
1000
<td class="blb">0-m</td>
1001
<td class="blb">&nbsp;</td>
1002
<td class="blb">&nbsp;</td>
1003
<td class="blb">1</td>
1004
<td class="blb">1</td>
1005
<td class="blb">0-1</td>
1006
</tr>
1007
<tr>
1008
<td class="bb"><a class="ref" href="#DTEND">dtend</a></td>
1009
<td class="blb">0*1</td>
1010
<td class="blb">&nbsp;</td>
1011
<td class="blb">&nbsp;</td>
1012
<td class="blb">0-1</td>
1013
<td class="blb">&nbsp;</td>
1014
<td class="blb">&nbsp;</td>
1015
<td class="blb">&nbsp;</td>
1016
<td class="blb">&nbsp;</td>
1017
</tr>
1018
<tr>
1019
<td class="bb"><a class="ref" href="#DTSTAMP">dtstamp</a></td>
1020
<td class="blb">0-1</td>
1021
<td class="blb">0-1</td>
1022
<td class="blb">0-1</td>
1023
<td class="blb">0-1</td>
1024
<td class="blb">&nbsp;</td>
1025
<td class="blb">&nbsp;</td>
1026
<td class="blb">&nbsp;</td>
1027
<td class="blb">&nbsp;</td>
1028
</tr>
1029
<tr>
1030
<td class="bb"><a class="ref" href="#DTSTART">dtstart</a></td>
1031
<td class="blb">0-1</td>
1032
<td class="blb">0-1</td>
1033
<td class="blb">0-1</td>
1034
<td class="blb">0-1</td>
1035
<td class="blb">&nbsp;</td>
1036
<td class="blb">&nbsp;</td>
1037
<td class="blb">&nbsp;</td>
1038
<td class="blb">&nbsp;</td>
1039
</tr>
1040
<tr>
1041
<td class="bb"><a class="ref" href="#DUE">due</a></td>
1042
<td class="blb">&nbsp;</td>
1043
<td class="blb">0*1</td>
1044
<td class="blb">&nbsp;</td>
1045
<td class="blb">&nbsp;</td>
1046
<td class="blb">&nbsp;</td>
1047
<td class="blb">&nbsp;</td>
1048
<td class="blb">&nbsp;</td>
1049
<td class="blb">&nbsp;</td>
1050
</tr>
1051
<tr>
1052
<td class="bb"><a class="ref" href="#DURATION">duration</a></td>
1053
<td class="blb">0*1</td>
1054
<td class="blb">0*1</td>
1055
<td class="blb">&nbsp;</td>
1056
<td class="blb">0-1</td>
1057
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1058
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1059
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1060
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1061
</tr>
1062
<tr>
1063
<td class="bb"><a class="ref" href="#EXDATE">exdate</a></td>
1064
<td class="blb">0-m</td>
1065
<td class="blb">0-m</td>
1066
<td class="blb">0-m</td>
1067
<td class="blb">&nbsp;</td>
1068
<td class="blb">&nbsp;</td>
1069
<td class="blb">&nbsp;</td>
1070
<td class="blb">&nbsp;</td>
1071
<td class="blb">&nbsp;</td>
1072
</tr>
1073
<tr>
1074
<td class="bb"><a class="ref" href="#EXRULE">exrule</a></td>
1075
<td class="blb">0-m</td>
1076
<td class="blb">0-m</td>
1077
<td class="blb">0-m</td>
1078
<td class="blb">&nbsp;</td>
1079
<td class="blb">&nbsp;</td>
1080
<td class="blb">&nbsp;</td>
1081
<td class="blb">&nbsp;</td>
1082
<td class="blb">&nbsp;</td>
1083
</tr>
1084
<tr>
1085
<td class="bb"><a class="ref" href="#FREEBUSY_PROP">freebusy</a></td>
1086
<td class="blb">&nbsp;</td>
1087
<td class="blb">&nbsp;</td>
1088
<td class="blb">&nbsp;</td>
1089
<td class="blb">0-m</td>
1090
<td class="blb">&nbsp;</td>
1091
<td class="blb">&nbsp;</td>
1092
<td class="blb">&nbsp;</td>
1093
<td class="blb">&nbsp;</td>
1094
</tr>
1095
<tr>
1096
<td class="bb"><a class="ref" href="#GEO">geo</a></td>
1097
<td class="blb">0-1</td>
1098
<td class="blb">0-1</td>
1099
<td class="blb">&nbsp;</td>
1100
<td class="blb">&nbsp;</td>
1101
<td class="blb">&nbsp;</td>
1102
<td class="blb">&nbsp;</td>
1103
<td class="blb">&nbsp;</td>
1104
<td class="blb">&nbsp;</td>
1105
</tr>
1106
<tr>
1107
<td class="bb"><a class="ref" href="#LAST-MODIFIED">last-mod</a></td>
1108
<td class="blb">0-1</td>
1109
<td class="blb">0-1</td>
1110
<td class="blb">0-1</td>
1111
<td class="blb"></td>
1112
<td class="blb">&nbsp;</td>
1113
<td class="blb">&nbsp;</td>
1114
<td class="blb">&nbsp;</td>
1115
<td class="blb">&nbsp;</td>
1116
</tr>
1117
<tr>
1118
<td class="bb"><a class="ref" href="#LOCATION">location</a></td>
1119
<td class="blb">0-1</td>
1120
<td class="blb">0-1</td>
1121
<td class="blb">&nbsp;</td>
1122
<td class="blb">&nbsp;</td>
1123
<td class="blb">&nbsp;</td>
1124
<td class="blb">&nbsp;</td>
1125
<td class="blb">&nbsp;</td>
1126
<td class="blb">&nbsp;</td>
1127
</tr>
1128
<tr>
1129
<td class="bb"><a class="ref" href="#ORGANIZER">organizer</a></td>
1130
<td class="blb">0-1</td>
1131
<td class="blb">0-1</td>
1132
<td class="blb">0-1</td>
1133
<td class="blb">0-1</td>
1134
<td class="blb">&nbsp;</td>
1135
<td class="blb">&nbsp;</td>
1136
<td class="blb">&nbsp;</td>
1137
<td class="blb">&nbsp;</td>
1138
</tr>
1139
<tr>
1140
<td class="bb"><a class="ref" href="#PERCENT-COMPLETE">percent</a></td>
1141
<td class="blb">&nbsp;</td>
1142
<td class="blb">0-1</td>
1143
<td class="blb">&nbsp;</td>
1144
<td class="blb">&nbsp;</td>
1145
<td class="blb">&nbsp;</td>
1146
<td class="blb">&nbsp;</td>
1147
<td class="blb">&nbsp;</td>
1148
<td class="blb">&nbsp;</td>
1149
</tr>
1150
<tr>
1151
<td class="bb"><a class="ref" href="#PRIORITY">priority</a></td>
1152
<td class="blb">0-1</td>
1153
<td class="blb">0-1</td>
1154
<td class="blb">&nbsp;</td>
1155
<td class="blb">&nbsp;</td>
1156
<td class="blb">&nbsp;</td>
1157
<td class="blb">&nbsp;</td>
1158
<td class="blb">&nbsp;</td>
1159
<td class="blb">&nbsp;</td>
1160
</tr>
1161
<tr>
1162
<td class="bb"><a class="ref" href="#RDATE">rdate</a></td>
1163
<td class="blb">0-m</td>
1164
<td class="blb">0-m</td>
1165
<td class="blb">0-m</td>
1166
<td class="blb">&nbsp;</td>
1167
<td class="blb">&nbsp;</td>
1168
<td class="blb">&nbsp;</td>
1169
<td class="blb">&nbsp;</td>
1170
<td class="blb">&nbsp;</td>
1171
</tr>
1172
<tr>
1173
<td class="bb"><a class="ref" href="#RECURRENCE-ID">recurid</a></td>
1174
<td class="blb">0-1</td>
1175
<td class="blb">0-1</td>
1176
<td class="blb">0-1</td>
1177
<td class="blb">&nbsp;</td>
1178
<td class="blb">&nbsp;</td>
1179
<td class="blb">&nbsp;</td>
1180
<td class="blb">&nbsp;</td>
1181
<td class="blb">&nbsp;</td>
1182
</tr>
1183
<tr>
1184
<td class="bb"><a class="ref" href="#RELATED-TO">related</a></td>
1185
<td class="blb">0-m</td>
1186
<td class="blb">0-m</td>
1187
<td class="blb">0-m</td>
1188
<td class="blb">&nbsp;</td>
1189
<td class="blb">&nbsp;</td>
1190
<td class="blb">&nbsp;</td>
1191
<td class="blb">&nbsp;</td>
1192
<td class="blb">&nbsp;</td>
1193
</tr>
1194
<tr>
1195
<td class="bb"><a class="ref" href="#REPEAT">repeat</a></td>
1196
<td class="blb">&nbsp;</td>
1197
<td class="blb">&nbsp;</td>
1198
<td class="blb">&nbsp;</td>
1199
<td class="blb">&nbsp;</td>
1200
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1201
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1202
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1203
<td class="blb">0&nbsp;/&nbsp;1=1</td>
1204
</tr>
1205
<tr>
1206
<td class="bb"><a class="ref" href="#RESOURCES">resources</a></td>
1207
<td class="blb">0-m</td>
1208
<td class="blb">0-m</td>
1209
<td class="blb">&nbsp;</td>
1210
<td class="blb">&nbsp;</td>
1211
<td class="blb">&nbsp;</td>
1212
<td class="blb">&nbsp;</td>
1213
<td class="blb">&nbsp;</td>
1214
<td class="blb">&nbsp;</td>
1215
</tr>
1216
<tr>
1217
<td class="bb"><a class="ref" href="#RRULE">rrule</a></td>
1218
<td class="blb">0-m</td>
1219
<td class="blb">0-m</td>
1220
<td class="blb">0-m</td>
1221
<td class="blb">&nbsp;</td>
1222
<td class="blb">&nbsp;</td>
1223
<td class="blb">&nbsp;</td>
1224
<td class="blb">&nbsp;</td>
1225
<td class="blb">&nbsp;</td>
1226
</tr>
1227
<tr>
1228
<td class="bb"><a class="ref" href="#REQUEST-STATUS">rstatus</a></td>
1229
<td class="blb">0-m</td>
1230
<td class="blb">0-m</td>
1231
<td class="blb">0-m</td>
1232
<td class="blb">0-m</td>
1233
<td class="blb">&nbsp;</td>
1234
<td class="blb">&nbsp;</td>
1235
<td class="blb">&nbsp;</td>
1236
<td class="blb">&nbsp;</td>
1237
</tr>
1238
<tr>
1239
<td class="bb"><a class="ref" href="#SEQUENCE">sequence</a></td>
1240
<td class="blb">0-1</td>
1241
<td class="blb">0-1</td>
1242
<td class="blb">0-1</td>
1243
<td class="blb">&nbsp;</td>
1244
<td class="blb">&nbsp;</td>
1245
<td class="blb">&nbsp;</td>
1246
<td class="blb">&nbsp;</td>
1247
<td class="blb">&nbsp;</td>
1248
</tr>
1249
<tr>
1250
<td class="bb"><a class="ref" href="#STATUS">status</a></td>
1251
<td class="blb">0-1</td>
1252
<td class="blb">0-1</td>
1253
<td class="blb">0-1</td>
1254
<td class="blb">&nbsp;</td>
1255
<td class="blb">&nbsp;</td>
1256
<td class="blb">&nbsp;</td>
1257
<td class="blb">&nbsp;</td>
1258
<td class="blb">&nbsp;</td>
1259
</tr>
1260
<tr>
1261
<td class="bb"><a class="ref" href="#SUMMARY">summary</a></td>
1262
<td class="blb">0-1</td>
1263
<td class="blb">0-1</td>
1264
<td class="blb">0-1</td>
1265
<td class="blb">&nbsp;</td>
1266
<td class="blb">&nbsp;</td>
1267
<td class="blb">&nbsp;</td>
1268
<td class="blb">1</td>
1269
<td class="blb">&nbsp;</td>
1270
</tr>
1271
<tr>
1272
<td class="bb"><a class="ref" href="#TRANSP">transp</a></td>
1273
<td class="blb">0-1</td>
1274
<td class="blb">&nbsp;</td>
1275
<td class="blb">&nbsp;</td>
1276
<td class="blb">&nbsp;</td>
1277
<td class="blb">&nbsp;</td>
1278
<td class="blb">&nbsp;</td>
1279
<td class="blb">&nbsp;</td>
1280
<td class="blb">&nbsp;</td>
1281
</tr>
1282
<tr>
1283
<td class="bb"><a class="ref" href="#TRIGGER">trigger</a></td>
1284
<td class="blb">&nbsp;</td>
1285
<td class="blb">&nbsp;</td>
1286
<td class="blb">&nbsp;</td>
1287
<td class="blb">&nbsp;</td>
1288
<td class="blb">1</td>
1289
<td class="blb">1</td>
1290
<td class="blb">1</td>
1291
<td class="blb">1</td>
1292
</tr>
1293
<tr>
1294
<td class="bb"><a class="ref" href="#UID">uid</a></td>
1295
<td class="blb">0-1</td>
1296
<td class="blb">0-1</td>
1297
<td class="blb">0-1</td>
1298
<td class="blb">0-1</td>
1299
<td class="blb">&nbsp;</td>
1300
<td class="blb">&nbsp;</td>
1301
<td class="blb">&nbsp;</td>
1302
<td class="blb">&nbsp;</td>
1303
</tr>
1304
<tr>
1305
<td class="bb"><a class="ref" href="#URL">url</a></td>
1306
<td class="blb">0-1</td>
1307
<td class="blb">0-1</td>
1308
<td class="blb">0-1</td>
1309
<td class="blb">0-1</td>
1310
<td class="blb">&nbsp;</td>
1311
<td class="blb">&nbsp;</td>
1312
<td class="blb">&nbsp;</td>
1313
<td class="blb">&nbsp;</td>
1314
</tr>
1315
<tr>
1316
<td class="bb"><a class="ref" href="#X-PROPERTY_PROP">x-prop</a></td>
1317
<td class="blb">0-m</td>
1318
<td class="blb">0-m</td>
1319
<td class="blb">0-m</td>
1320
<td class="blb">0-m</td>
1321
<td class="blb">0-m</td>
1322
<td class="blb">0-m</td>
1323
<td class="blb">0-m</td>
1324
<td class="blb">0-m</td>
1325
</tr>
1326
</table>
1327
<p>
1328
If not set, the <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties
1329
are automatically created by iCalcreator<br>
1330
for <a href="#VEVENT">vevent</a>,<a href="#VTODO">vtodo</a>, <a href="#VJOURNAL">vjournal</a> and <a href="#VFREEBUSY">vfreebusy</a> components<br>
1331
when using iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or <a href="#returnCalendar">returnCalendar</a><br>
1332
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>.
1333
</p>
1334
<br>
1335
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
1336

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

    
1339
<a name="iCalcreator_object_methods"></a><h2>3.1 iCalcreator object methods</h2>
1340

    
1341
<a name="Calendar_object_constructors"></a><h3>3.1.1 Constructors</h3>
1342
<a name="vcalendar_constr"></a><h4>3.1.1.1 vcalendar</h4>
1343
<p>Create a new <a href="#VCALENDAR">VCALENDAR</a> object.</p>
1344
<p class="label">Format</p>
1345
<p class="format">vcalendar::vcalendar( [ config ] )</p>
1346
<p class="comment">
1347
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1348
</p>
1349
<p class="label">Basic example</p>
1350
<p class="example">&lt;?php
1351
.. .
1352
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
1353
$vcalendar = new vcalendar( $config );
1354
...
1355
</p>
1356
<p>
1357
The <strong>calendar</strong> property PRODID and each component property <a href="#UID">UID</a> are AUTOMATICALLY generated in iCalcreator,
1358
if not set manually, and based on the configuration <a href="#Unique_id">unique_id</a>.
1359
</p>
1360
<p class="label">Extended example</p>
1361
<p class="example">&lt;?php
1362
.. .
1363
$tz        = &quot;Europe/Stockholm&quot;
1364
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;
1365
                    &quot;TZID&quot;      =&gt; $tz );
1366
$vcalendar = new vcalendar( $config );
1367
$vcalendar-&gt;setProperty( "X-WR-TIMEZONE", $tz );
1368
.. .
1369
.. .  // <span class="comment">insert components or parse an iCal file (and edit components)</span>
1370
.. .
1371
$xprops    = array( &quot;X-LIC-LOCATION&quot; => $tz );
1372
iCalUtilityFunctions::createTimezone( $vcalendar, $tz, $xprops );
1373
.. .
1374
</p>
1375
<p>
1376
The <a href="#dTZID">TZID</a> config key and value (timezone) is supplied when setting <a href="#DTSTART">DTSTART</a>,
1377
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>,
1378
if not set manually, a TZID <b>auto completion</b>.
1379
</p>
1380
<p>
1381
Some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
1382
and vtimezone component with property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>,
1383
review <a href="#createTimezone">createTimezone</a>, a function in iCalUtilityFunctions class.
1384
</p>
1385
<br>
1386
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1387

    
1388

    
1389
<a name="vevent_constr"></a><h4>3.1.1.2 vevent</h4>
1390
<p class="label">Format 1</p>
1391
<p>Create a new <a href="#VEVENT">VEVENT</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
1392
<p class="format">vcalendar::newComponent( &quot;vevent&quot; )</p>
1393
<p class="label">Example</p>
1394
<p class="example">&lt;?php
1395
.. .
1396
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1397
$vcalendar = new vcalendar( $config );
1398
...
1399
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
1400
$vevent-&gt;setProperty(...
1401
...
1402
</p>
1403
<p class="label">Format 2</p>
1404
<p>Create a new <a href="#VEVENT">VEVENT</a> object.</p>
1405
<p class="format">vevent::vevent( [ config ] )</p>
1406
<p class="comment">
1407
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1408
</p>
1409
<p class="label">Example</p>
1410
<p class="example">&lt;?php
1411
.. .
1412
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1413
$vcalendar = new vcalendar( $config );
1414
...
1415
$config    = $vcalendar-&gt;getConfig();
1416
$vevent    = new vevent( $config );
1417
$vevent-&gt;setProperty(...
1418
...
1419
$vcalendar-&gt;setComponent( $vevent );
1420
...
1421
</p>
1422
<br>
1423
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1424

    
1425

    
1426
<a name="vtodo_constr"></a><h4>3.1.1.3 vtodo</h4>
1427
<p class="label">Format 1</p>
1428
<p>Create a new <a href="#VTODO">VTODO</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
1429
<p class="format">vcalendar::newComponent( &quot;vtodo&quot; )</p>
1430
<p class="label">Example</p>
1431
<p class="example">&lt;?php
1432
.. .
1433
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1434
$vcalendar = new vcalendar( $config );
1435
...
1436
$vtodo     = &amp; $vcalendar-&gt;newComponent( &quot;vtodo&quot; );
1437
$vtodo-&gt;setProperty(...
1438
...
1439
</p>
1440
<p class="label">Format 2</p>
1441
<p>Create a new <a href="#VTODO">VTODO</a> object.</p>
1442
<p class="format">vtodo::vtodo( [ config ] )</p>
1443
<p class="comment">
1444
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1445
</p>
1446
<p class="label">Example</p>
1447
<p class="example">&lt;?php
1448
.. .
1449
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1450
$vcalendar = new vcalendar( $config );
1451
...
1452
$vtodo     = new vtodo( $vcalendar-&gt;getConfig());
1453
$vtodo-&gt;setProperty(...
1454
...
1455
$vcalendar-&gt;setComponent( $vtodo );
1456
...
1457
</p>
1458
<br>
1459
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1460

    
1461

    
1462
<a name="vjournal_constr"></a><h4>3.1.1.4 vjournal</h4>
1463
<p class="label">Format 1</p>
1464
<p>Create a new <a href="#VJOUNAL">VJOURNAL</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
1465
<p class="format">vcalendar::newComponent( &quot;vjournal&quot; )</p>
1466
<p class="label">Example</p>
1467
<p class="example">&lt;?php
1468
.. .
1469
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1470
$vcalendar = new vcalendar( $config );
1471
...
1472
$vjournal  = &amp; $vcalendar-&gt;newComponent( &quot;vjournal&quot; );
1473
$vjournal-&gt;setProperty(...
1474
...
1475
</p>
1476
<p class="label">Format 2</p>
1477
<p>Create a new <a href="#VJOURNAL">VJOURNAL</a> object.</p>
1478
<p class="format">vjournal::vjournal( [ config ] )</p>
1479
<p class="comment">
1480
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1481
</p>
1482
<p class="label">Example</p>
1483
<p class="example">&lt;?php
1484
.. .
1485
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1486
$vcalendar = new vcalendar( $config );
1487
...
1488
$vjournal  = new vjournal( $vcalendar-&gt;getConfig());
1489
$vjournal-&gt;setProperty(...
1490
...
1491
$vcalendar-&gt;setComponent( $vjournal );
1492
...
1493
</p>
1494
<br>
1495
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1496

    
1497

    
1498
<a name="vfreebusy_constr"></a><h4>3.1.1.5 vfreebusy</h4>
1499
<p class="label">Format 1</p>
1500
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object using an iCalcreator object factory-method, returning a reference to the new component.</p>
1501
<p class="format">vcalendar::newComponent( &quot;vfreebusy&quot; )</p>
1502
<p class="label">Example</p>
1503
<p class="example">&lt;?php
1504
.. .
1505
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1506
$vcalendar = new vcalendar( $config );
1507
...
1508
$vfreebusy = &amp; $vcalendar-&gt;newComponent( &quot;vfreebusy&quot; );
1509
$vfreebusy-&gt;setProperty(...
1510
...
1511
</p>
1512
<p class="label">Format 2</p>
1513
<p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object.</p>
1514
<p class="format">vfreebusy::vfreebusy( [ config ] )</p>
1515
<p class="comment">
1516
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1517
</p>
1518
<p class="label">Example</p>
1519
<p class="example">&lt;?php
1520
.. .
1521
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1522
$vcalendar = new vcalendar( $config );
1523
...
1524
$vfreebusy = new vfreebusy( $vcalendar-&gt;getConfig());
1525
$vfreebusy-&gt;setProperty(...
1526
...
1527
$vcalendar-&gt;setComponent( $vfreebusy );
1528
...
1529
</p>
1530
<br>
1531
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1532

    
1533

    
1534
<a name="valarm_constr"></a><h4>3.1.1.6 valarm</h4>
1535
<p class="label">Format 1</p>
1536
<p>Create a new <a href="#VALARM">VALARM</a> object using an iCalcreator object component factory-method, returning a reference to the new (sub-)component.</p>
1537
<p class="format">calendarComponent::newComponent( &quot;valarm&quot; )</p>
1538
<p class="label">Example</p>
1539
<p class="example">&lt;?php
1540
.. .
1541
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1542
$vcalendar = new vcalendar( $config );
1543
...
1544
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
1545
$vevent-&gt;setProperty(...
1546
...
1547
$valarm    = &amp; $vevent-&gt;newComponent( &quot;valarm&quot; );
1548
$valarm-&gt;setProperty(...
1549
...
1550
</p>
1551
<p class="label">Format 2</p>
1552
<p>Create a new <a href="#VALARM">VALARM</a> object.</p>
1553
<p class="format">valarm::valarm( [ config ] )</p>
1554
<p class="comment">
1555
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1556
</p>
1557
<p class="label">Example</p>
1558
<p class="example">&lt;?php
1559
.. .
1560
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1561
$vcalendar = new vcalendar( $config );
1562
...
1563
$vevent    = new vevent();
1564
$vevent-&gt;setProperty(...
1565
...
1566
$valarm    = new valarm( $vevent-&gt;getConfig());
1567
$valarm-&gt;setProperty(...
1568
...
1569
$vevent-&gt;setComponent( $valarm );
1570
...
1571
$vcalendar-&gt;setComponent( $vevent );
1572
...
1573
</p>
1574
<br>
1575
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1576

    
1577

    
1578
<a name="vtimezone_constr"></a><h4>3.1.1.7 vtimezone</h4>
1579
<p>
1580
The vtimezone component describe, at a minimum, the base offset from <b>UTC</b> for the time zone.
1581
For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
1582
</p>
1583
<p class="label">Format 1</p>
1584
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object using an iCalcreator object component factory-method, returning a reference to the new component.</p>
1585
<p class="format">vcalendar::newComponent( &quot;vtimezone&quot; )</p>
1586
<p class="label">Example</p>
1587
<p class="example">&lt;?php
1588
.. .
1589
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1590
$vcalendar = new vcalendar( $config );
1591
...
1592
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
1593
$vtimezone-&gt;setProperty(...
1594
...
1595
</p>
1596
<p class="label">Format 2</p>
1597
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object.</p>
1598
<p class="format">vtimezone::vtimezone( [ config ] )</p>
1599
<p class="comment">
1600
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1601
</p>
1602
<p class="label">Example</p>
1603
<p class="example">&lt;?php
1604
.. .
1605
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1606
$vcalendar = new vcalendar( $config );
1607
...
1608
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
1609
$vtimezone-&gt;setProperty(...
1610
...
1611
$vcalendar-&gt;setComponent( $vtimezone );
1612
...
1613
</p>
1614
<br>
1615
<h5>Creation of timezone components</h5>
1616
<p>
1617
It is possible to create timezone components, using a function in iCalUtilityFunctions class, <a href="#createTimezone">createTimezone</a>
1618
and utilizing the <em>PHP</em> DateTimeZone class (<em>PHP</em> 5 >= 5.2.0).
1619
</p>
1620
<br>
1621
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1622

    
1623
<a name="standard_constr"></a><h4>3.1.1.8 standard</h4>
1624
<p class="label">Format 1</p>
1625
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> <b>standard</b> object using an iCalcreator object component factory-method, returning a reference to the new (sub-)component.</p>
1626
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
1627
<p class="label">Example</p>
1628
<p class="example">&lt;?php
1629
.. .
1630
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1631
$vcalendar = new vcalendar( $config );
1632
...
1633
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
1634
$vtimezone-&gt;setProperty(...
1635
...
1636
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
1637
$standard-&gt;setProperty(...
1638
...
1639
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
1640
$daylight-&gt;setProperty(...
1641
...
1642
</p>
1643
<p class="label">Format 2</p>
1644
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> STANDARD object.</p>
1645
<p class="format">vtimezone::vtimezone( &quot;standard&quot; [, config ] )</p>
1646
<p class="comment">
1647
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1648
</p>
1649
<p class="label">Example</p>
1650
<p class="example">&lt;?php
1651
.. .
1652
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1653
$vcalendar = new vcalendar( $config );
1654
...
1655
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
1656
$vtimezone-&gt;setProperty(...
1657
...
1658
$standard  = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
1659
$standard-&gt;setProperty(...
1660
...
1661
$vtimezone-&gt;setComponent( $standard );
1662
...
1663
$daylight  = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig());
1664
$daylight-&gt;setProperty(...
1665
...
1666
$vtimezone-&gt;setComponent( $daylight );
1667
...
1668
$vcalendar-&gt;setComponent( $vtimezone );
1669
...
1670
</p>
1671
<br>
1672
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1673

    
1674

    
1675
<a name="daylight_constr"></a><h4>3.1.1.9 daylight</h4>
1676
<p class="label">Format 1</p>
1677
<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>
1678
<p class="format">vtimezone::newComponent( &quot;standard&quot; )</p>
1679
<p class="label">Example</p>
1680
<p class="example">&lt;?php
1681
.. .
1682
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1683
$vcalendar = new vcalendar( $config );
1684
...
1685
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
1686
...
1687
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
1688
...
1689
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
1690
...
1691
</p>
1692
<p class="label">Format 2</p>
1693
<p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> DAYLIGHT object.</p>
1694
<p class="format">vtimezone::vtimezone( &quot;daylight&quot; [, config ] )</p>
1695
<p class="comment">
1696
config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
1697
</p>
1698
<p class="label">Example</p>
1699
<p class="example">&lt;?php
1700
.. .
1701
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1702
$vcalendar = new vcalendar( $config );
1703
...
1704
$vtimezone = new vtimezone( $vcalendar-&gt;getConfig());
1705
...
1706
$standard  = new vtimezone( &quot;standard&quot;, $vtimezone-&gt;getConfig());
1707
...
1708
$vtimezone-&gt;setComponent( $standard );
1709
$daylight  = new vtimezone( &quot;daylight&quot;, $vtimezone-&gt;getConfig() );
1710
...
1711
$vtimezone-&gt;setComponent( $daylight );
1712
$vcalendar-&gt;setComponent( $vtimezone );
1713
...
1714
</p>
1715
<br>
1716
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
1717

    
1718

    
1719
<a name="iCalcreator_object_property_methods"></a><h3>3.1.2 iCalcreator object property methods</h3>
1720

    
1721
<a name="deleteProperty"></a><h4>3.1.2.1 deleteProperty</h4>
1722
<p>Generic iCalcreator object deleteProperty method, simplifying removal of <strong>calendar</strong> properties.</p>
1723
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
1724
<p class="label">Format</p>
1725
<p class="format">vcalendar::deleteProperty( [ PropName [, order=1 ] )</p>
1726
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
1727
                    unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
1728
order    = (int) if missing 1st/next occurrence,
1729
                 used with multiple (property) occurrences
1730
</p>
1731
<p class="label">Example</p>
1732
<p class="example">&lt;?php
1733
.. .
1734
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1735
$vcalendar = new vcalendar( $config );
1736
$vcalendar-&gt;parse();
1737
if( !$vcalendar-&gt;deleteProperty( &quot;method&quot; ))
1738
&nbsp;&nbsp;echo "METHOD property not found";
1739
.. .
1740
</p>
1741
<br>
1742
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1743

    
1744

    
1745
<a name="getProperty"></a><h4>3.1.2.2 getProperty</h4>
1746
<p class="label">Format 1</p>
1747
<p>Generic iCalcreator getProperty method, simplifying fetch of <strong>calendar</strong> properties.</p>
1748
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
1749
<p class="format">vcalendar::getProperty( [ PropName [, order=1 [, complete=FALSE ]]] )</p>
1750
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
1751
           unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
1752
order    = (int) if missing 1st/next occurrence,
1753
           used with multiply (property) occurrences
1754
complete = (bool) FALSE (default) : output only property value
1755
                  TRUE            : output = array( &quot;value&quot;=&gt; &lt;value&gt; ,&quot;params&quot; =&gt; &lt;parameter array&gt;)
1756
</p>
1757
<p class="label">Example 1</p>
1758
<p class="example">&lt;?php
1759
.. .
1760
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1761
$vcalendar = new vcalendar( $config );
1762
$vcalendar-&gt;parse();
1763
$calscale  = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
1764
.. .
1765
</p>
1766
<p class="label">Example 2</p>
1767
<p class="example">&lt;?php
1768
.. .
1769
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1770
$vcalendar    = new vcalendar( $config );
1771
$vcalendar-&gt;parse();
1772
while( $xprop = $vcalendar-&gt;getProperty( )) { // <span class="comment">get x-properties</span>
1773
.. .
1774
</p>
1775
<a name="getProperty2"></a>
1776
<a name="geoLocation"></a>
1777
<p class="label">Format 2</p>
1778
<p>
1779
Ability to fetch specific <i>component</i> property (unique) value(-s) and number of occurrence(-s).
1780
 The search includes <b>ALL</b> components within the iCalcreator object instance.
1781
</p>
1782
<p>
1783
Outputs an array( *[ (string) unique-property-value =&gt; (int) number_of_occurrence ] ) or an empty array if no hits.
1784
The array is sorted by (asc.) key. If a property contains multiple values (like &quot;CATAGORIES:course1,courseB&quot; or
1785
 &quot;RESOURCES:pc,camera&quot;), they are split into unique values.
1786
</p>
1787
<dl>
1788
<dt>Supported Descriptive Component Properties
1789
<dd><a href="#CATEGORIES">CATEGORIES</a>
1790
<dd><a href="#LOCATION">LOCATION</a>
1791
<dd>GEOLOCATION&nbsp;<sup>*1</sup>
1792
<dd><a href="#PRIORITY">PRIORITY</a>
1793
<dd><a href="#RESOURCES">RESOURCES</a>
1794
<dd><a href="#STATUS">STATUS</a>
1795
<dd><a href="#SUMMARY">SUMMARY</a>
1796
<dt>Supported Date and Time Component Property
1797
<dd><a href="#DTSTART">DTSTART</a>&nbsp;<sup>*2</sup>
1798
<dt>Supported Relationship Component Properties
1799
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*3</sup>
1800
<dd><a href="#CONTACT">CONTACT</a>
1801
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*3</sup>
1802
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>&nbsp;<sup>*4</sup> (alt. &quot;R-UID&quot;)
1803
<dd><a href="#RELATED-TO">RELATED-TO</a>
1804
<dd><a href="#URL">URL</a>
1805
<dd><a href="#UID">UID</a>
1806
</dl>
1807
<dl>
1808
<dt><sup>*1</sup>
1809
<dd>Using the non-standard directive &quot;GEOLOCATION&quot;, iCalcreator returns output supporting<br>
1810
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
1811
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
1812
 (only if <a href="#GEO">GEO</a> is set).
1813
<dt><sup>*2</sup>
1814
<dd>Using <a href="#DTSTART">DTSTART</a> as argument returns dates in format &quot;YYYYMMDD&quot; (please note, dates within a <a href="#RDATE">RDATE</a>/<a href="#RRULE">RRULE</a>
1815
 recurrence set are NOT included, only the origin start date (<a href="#DTSTART">DTSTART</a>)).
1816
<dt><sup>*3</sup>
1817
<dd>The <a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> output values are prefixed
1818
 by &quot;protocol&quot; like &quot;MAILTO:chair@kigkonsult.se&quot;.
1819
<dt><sup>*4</sup>
1820
<dd>Using &quot;RECURRENCE-ID-UID&quot; returns <a href="#UID">UID</a> values for component(-s) where <a href="#RECURRENCE-ID">RECURRENCE-ID</a> is set.
1821
</dl>
1822
<p>
1823
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
1824
</p>
1825
<p>
1826
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
1827
</p>
1828
<p class="format">vcalendar::getProperty( PropName )</p>
1829
<p class="comment">propName = (string) case independent, property name</p>
1830
<p class="label">Example 1</p>
1831
<p>Fetch all attendees in the iCalcreator object instance.</p>
1832
<p class="example">&lt;?php
1833
.. .
1834
$attendees = $vcalendar-&gt;getProperty( &quot;ATTENDEE&quot; );
1835
foreach( $attendees as $attendee => $occurrCount ) {
1836
.. .
1837
</p>
1838
<p class="label">Example 2</p>
1839
<p>Fetch all DTSTARTs in the iCalcreator object instance.</p>
1840
<p class="example">&lt;?php
1841
.. .
1842
$startDates = $vcalendar-&gt;getProperty( &quot;DTSTART&quot; );
1843
foreach( $startDates as $startDate => $occurrCount ) {
1844
.. .
1845
</p>
1846
<br>
1847
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1848

    
1849

    
1850
<a name="setProperty"></a><h4>3.1.2.3 setProperty</h4>
1851
<p>Generic the iCalcreator object setProperty method,simplifying insert of <strong>calendar</strong> properties.</p>
1852
<p>A successful update returns TRUE.</p>
1853
<p class="label">Format</p>
1854
<p class="format">vcalendar::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
1855
<p class="comment">propName = (string) case independent, strict [RFC5545] <strong>calendar</strong> property names,
1856
                                      unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY">X-property</a>.
1857
Proparg  = (mixed) property argument
1858
           Last property argument is a (optional) property dependent parameters
1859
           array( *[(string) key =&gt; (string) value ] ).
1860
           A non-standard (, experimental) parameter key MUST be prefixed by &quot;X-&quot;.
1861
</p>
1862
<p class="label">Example</p>
1863
<p class="example">&lt;?php
1864
.. .
1865
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
1866
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot;,
1867
                    &quot;TZID&quot;      =&gt; &quot;Europe/Stockholm&quot; );
1868
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
1869
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
1870
...
1871
</p>
1872
<br>
1873
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1874

    
1875

    
1876
<a name="CALSCALE"></a><h4>3.1.2.4 CALSCALE</h4>
1877
<p>
1878
This property defines the <strong>calendar</strong> scale used for the <strong>calendar</strong> information specified in the <strong>iCalendar</strong> object.
1879
</p>
1880
<p>
1881
The default value is &quot;GREGORIAN&quot;, implied when missing.
1882
</p>
1883
<h5>Create CALSCALE</h5>
1884
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
1885
<p class="label">Format</p>
1886
<p class="format">vcalendar::createCalscale()</p>
1887
<p class="label">Example</p>
1888
<p class="example">&lt;?php
1889
.. .
1890
$str = $vcalendar-&gt;createCalscale();
1891
...
1892
</p>
1893
<h5>Delete CALSCALE</h5>
1894
<p>Remove CALSCALE from calendar.</p>
1895
<p class="label">Format</p>
1896
<p class="format">vcalendar::deleteProperty( &quot;calscale&quot; )</p>
1897
<p class="label">Example</p>
1898
<p class="example">&lt;?php
1899
.. .
1900
$vcalendar-&gt;deleteProperty( &quot;CALSCALE&quot; );
1901
...
1902
</p>
1903
<h5>Get Calscale</h5>
1904
<p>If set, returns property value, otherwise FALSE.</p>
1905
<p class="label">Format</p>
1906
<p class="format">vcalendar::getProperty( &quot;calscale&quot; )</p>
1907
<p class="label">Example</p>
1908
<p class="example">&lt;?php
1909
.. .
1910
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
1911
$vcalendar = new vcalendar( $config );
1912
$vcalendar-&gt;parse();
1913
$calscale  = $vcalendar-&gt;getProperty( &quot;calscale&quot; );
1914
.. .
1915
</p>
1916
<h5>Set CALSCALE</h5>
1917
<p>Insert property value.</p>
1918
<p class="label">Format</p>
1919
<p class="format">vcalendar::setProperty( &quot;calscale&quot;, value )</p>
1920
<p class="comment">value = (string) calscale value</p>
1921
<p class="label">Example</p>
1922
<p class="example">&lt;?php
1923
.. .
1924
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1925
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
1926
$vcalendar-&gt;setProperty( &quot;calscale&quot;, &quot;GREGORIAN&quot; );
1927
.. .
1928
</p>
1929
<br>
1930
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1931

    
1932

    
1933
<a name="METHOD"></a><h4>3.1.2.5 METHOD</h4>
1934
<p>
1935
This property defines the <strong>iCalendar</strong> object method associated with the <strong>calendar</strong> object.
1936
</p>
1937
<p>
1938
METHOD property (value PUBLISH etc.) may be required when importing iCal files
1939
into some calendaring software (MS etc.), as well as <a href="#X-PROPERTY">x-properties</a>
1940
"X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"
1941
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
1942
</p>
1943
<h5>Create METHOD</h5>
1944
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
1945
<p class="label">Format</p>
1946
<p class="format">vcalendar::createMethod()</p>
1947
<p class="label">Example</p>
1948
<p class="example">&lt;?php
1949
.. .
1950
$str = $vcalendar-&gt;createMethod();
1951
...
1952
</p>
1953
<h5>Delete METHOD</h5>
1954
<p>Remove METHOD from calendar.</p>
1955
<p class="label">Format</p>
1956
<p class="format">vcalendar::deleteProperty( &quot;METHOD&quot; )</p>
1957
<p class="label">Example</p>
1958
<p class="example">&lt;?php
1959
.. .
1960
$vcalendar-&gt;deleteProperty( &quot;METHOD&quot; );
1961
...
1962
</p>
1963
<h5>Get METHOD</h5>
1964
<p>If set, returns property value, otherwise FALSE.</p>
1965
<p class="label">Format</p>
1966
<p class="format">vcalendar::getProperty( &quot;method&quot; );</p>
1967
<p class="label">Example</p>
1968
<p class="example">&lt;?php
1969
.. .
1970
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;);
1971
$vcalendar = new vcalendar( $config );
1972
$vcalendar-&gt;parse();
1973
$method    = $vcalendar-&gt;getProperty( &quot;method&quot; );
1974
.. .
1975
</p>
1976
<h5>Set METHOD</h5>
1977
<p>Insert property value.</p>
1978
<p class="label">Format</p>
1979
<p class="format">vcalendar::setProperty( &quot;method&quot;, value )</p>
1980
<p class="comment">value = (string) method value</p>
1981
<p class="label">Example</p>
1982
<p class="example">&lt;?php
1983
.. .
1984
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
1985
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
1986
$vcalendar-&gt;setProperty( &quot;method&quot;, &quot;PUBLISH&quot; );
1987
...
1988
</p>
1989
<br>
1990
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
1991

    
1992

    
1993
<a name="VERSION"></a><h4>3.1.2.6 VERSION</h4>
1994
<p>
1995
This property specifies the identifier corresponding to the version number of the <strong>iCalendar</strong> specification.
1996
This property is always placed first in the <strong>calendar</strong> file.
1997
</p>
1998
<h5>Create Version</h5>
1999
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
2000
<p class="label">Format</p>
2001
<p class="format">vcalendar::createVersion()</p>
2002
<p class="label">Example</p>
2003
<p class="example">&lt;?php
2004
.. .
2005
$str = $vcalendar-&gt;createVersion();
2006
...
2007
</p>
2008
<h5>Get Version</h5>
2009
<p>Fetch property value.</p>
2010
<p class="label">Format</p>
2011
<p class="format">vcalendar::getProperty( &quot;version&quot; )</p>
2012
<p class="label">Example</p>
2013
<p class="example">&lt;?php
2014
.. .
2015
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2016
$vcalendar = new vcalendar( $config );
2017
$vcalendar-&gt;parse();
2018
$version   = $vcalendar-&gt;getProperty( &quot;version&quot; )
2019
.. .
2020
</p>
2021
<h5>Set Version</h5>
2022
<p>Insert property value.
2023
Only version 2.0 valid, version is <b>AUTO</b> generated at <strong>calendar</strong> creation.</p>
2024
<p class="label">Format</p>
2025
<p class="format">vcalendar::setProperty( &quot;version&quot;, version )</p>
2026
<p class="comment">version = (string) iCal version</p>
2027
<p class="label">Example</p>
2028
<p class="example">&lt;?php
2029
.. .
2030
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2031
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
2032
$vcalendar-&gt;setProperty( &quot;version&quot;, &quot;2.0&quot; );
2033
...
2034
</p>
2035
<br>
2036
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
2037

    
2038
<a name="X-PROPERTY"></a><h4>3.1.2.7 X-PROPERTY</h4>
2039
<p>
2040
A <strong>calendar</strong>, non-standard property with a TEXT value and a name with an &quot;X-&quot; prefix. In a <strong>calendar</strong>,
2041
an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
2042
</p>
2043
<p>
2044
X-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"  may be required when importing iCal files
2045
into some calendaring software (MS etc.), as well as <a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
2046
and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
2047
</p>
2048
<p>The value type is TEXT.</p>
2049
<h5>Create X-property</h5>
2050
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
2051
<p class="label">Format</p>
2052
<p class="format">vcalendar::createXprop()</p>
2053
<p class="label">Example</p>
2054
<p class="example">&lt;?php
2055
.. .
2056
$str = $vcalendar-&gt;createXprop();
2057
...
2058
</p>
2059
<h5>Delete X-PROPERTY</h5>
2060
<p>Remove X-PROPERTY from <strong>calendar</strong>.</p>
2061
<p class="label">Format</p>
2062
<p class="format">vcalendar::deleteProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
2063
<p class="label">Example 1</p>
2064
<p>Delete the x-property named &quot;X-PROPERTY&quot;.</p>
2065
<p class="example">&lt;?php
2066
.. .
2067
$vcalendar-&gt;deleteProperty( &quot;X-PROPERTY&quot; );
2068
...
2069
</p>
2070
<p class="label">Example 2</p>
2071
<p>Delete all x-properties.</p>
2072
<p class="example">&lt;?php
2073
.. .
2074
while( $vcalendar-&gt;deleteProperty())
2075
  continue;
2076
...
2077
</p>
2078
<h5>Get X-PROPERTY</h5>
2079
<p>If set, returns property (name and) value, otherwise FALSE.</p>
2080
<p class="label">Format</p>
2081
<p class="format">vcalendar::getProperty()</p>
2082
<p class="format">vcalendar::getProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
2083
<p class="comment">output = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</p>
2084
<p class="format">vcalendar::getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
2085
<p class="comment">propOrderNo = (int) specific property value</p>
2086
<p class="comment">output = array( propertyName<sup>1</sup>
2087
              , array( &quot;value&quot;  =&gt; propertyData<sup>2</sup> )
2088
                     , &quot;params&quot; =&gt; params<sup>3</sup>))
2089
</p>
2090
<p class="label">Example 1</p>
2091
<p>Read all x-prop values in a loop.</p>
2092
<p class="example">&lt;?php
2093
.. .
2094
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2095
$vcalendar    = new vcalendar( $config );
2096
$vcalendar-&gt;parse();
2097
while( $xprop = $vcalendar-&gt;getProperty( )) { // <span class="comment">$xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
2098
.. .
2099
</p>
2100
<p class="label">Example 2</p>
2101
<p>If exists, read X-WR-TIMEZONE x-prop</p>
2102
<p class="example">&lt;?php
2103
.. .
2104
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2105
$vcalendar = new vcalendar( $config );
2106
$vcalendar-&gt;parse();
2107
if( $xprop = $vcalendar-&gt;getProperty( &quot;X-WR-TIMEZONE&quot; )) {
2108
.. . // <span class="comment">$xprop = array( &quot;X-WR-TIMEZONE&quot;, propertyData<sup>2</sup> )</span>
2109
.. .
2110
</p>
2111
<p class="label">Example 3</p>
2112
<p class="example">&lt;?php
2113
.. .
2114
$config       = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2115
$vcalendar    = new vcalendar( $config );
2116
$vcalendar-&gt;parse();
2117
while( $xprop = $vcalendar-&gt;getProperty( FALSE, FALSE, TRUE )) {
2118
     /* <span class="comment">$xprop = array( propertyName<sup>1</sup>
2119
                                         , array( &quot;value &quot;   =&gt; propertyData<sup>2</sup>
2120
                                                   , &quot;params &quot;=&gt; params<sup>3</sup> ))</span>
2121
     */
2122
.. .
2123
</p>
2124
<h5>Set X-PROPERTY</h5>
2125
Insert property name and value. If an x-prop with the same name already exists, it will be replaced.
2126
PropertyNames are always stored upperCase, ex. x-wr-calname =&gt; X-WR-CALNAME.
2127
<p class="label">Format</p>
2128
<p class="format">vcalendar::setProperty( propertyName, propertyData [, params ] )</p>
2129
<p class="comment">propertyName<sup>1</sup> = (string) Any property name with a &quot;X-&quot; prefix
2130
propertyData<sup>2</sup> = (string) Value type TEXT
2131
params<sup>3</sup>       = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams] )
2132
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
2133
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
2134
lang<sup>*</sup>         = as defined in [RFC5646]
2135
</p>
2136
<p class="label">Example</p>
2137
<p class="example">&lt;?php
2138
.. .
2139
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2140
$vcalendar = new vcalendar( $config ); // initiate new CALENDAR
2141
     // <span class="comment">set some X-properties.. .</span>
2142
$vcalendar-&gt;setProperty( &quot;x-wr-calname&quot;,  &quot;Calendar Sample&quot; )
2143
$vcalendar-&gt;setProperty( &quot;X-WR-CALDESC&quot;,  &quot;Calendar Description&quot; );
2144
$vcalendar-&gt;setProperty( &quot;X-WR-TIMEZONE&quot;, &quot;Europe/Stockholm&quot; );
2145
...
2146
</p>
2147
<br>
2148
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
2149

    
2150
<a name="iCalcreator_component_object_methods"></a><h3>3.1.3 iCalcreator component object methods</h3>
2151

    
2152
<a name="deleteComponent"></a><h4>3.1.3.1 deleteComponent</h4>
2153
<p>
2154
Remove component from the iCalcreator object instance.<br>
2155
FALSE is returned if no property exists or when end-of-properties at consecutive function calls.
2156
</p>
2157
<p class="label">format 1</p>
2158
Remove component with order number (1st=1, 2nd=2.. .).
2159
<p class="format">vcalendar::deleteComponent( orderNumber )</p>
2160
<p class="comment">orderNumber = (int) order number</p>
2161
<p class="label">format 2</p>
2162
<P>Remove component with component type (e.g. &quot;vevent&quot;) and order 1 alt. suborder number.</p>
2163
<p class="format">vcalendar::deleteComponent( componentType [, componentSuborderNumber])</p>
2164
<p class="comment">componentType           = (string) component type
2165
componentSuborderNumber = (int) order number</p>
2166
<p class="label">format 3</p>
2167
<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>
2168
<p class="format">vcalendar::deleteComponent( <a href="#UID">UID</a> )</p>
2169
<p class="label">Example 1</p>
2170
<p class="example">&lt;?php
2171
.. .
2172
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2173
$vcalendar = new vcalendar( $config );
2174
$vcalendar-&gt;parse();
2175
$vcalendar-&gt;deleteComponent( 1 );
2176
$vcalendar-&gt;deleteComponent( &quot;vtodo&quot;, 2 );
2177
$vcalendar-&gt;deleteComponent( &quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;);
2178
.. .
2179
</p>
2180
<p class="label">Example 2</p>
2181
<p>Deleting all components, using format 2 without order number.</p>
2182
<p class="example">&lt;?php
2183
.. .
2184
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2185
$vcalendar = new vcalendar( $config );
2186
$vcalendar-&gt;parse();
2187
.. .
2188
while( $vcalendar-&gt;deleteComponent( &quot;vevent&quot;))
2189
  continue;
2190
.. .
2191
$vtodo = $vcalendar-&gt;getComponent( &quot;vtodo&quot; );
2192
while( $vtodo-&gt;deleteComponent( &quot;valarm&quot;))
2193
  continue;
2194
.. .
2195
</p>
2196
<br>
2197
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2198

    
2199
<a name="getComponent"></a><h4>3.1.3.2 getComponent</h4>
2200
<p>Get component from the iCalcreator object instance.</p>
2201
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
2202
<p class="label">format 1</p>
2203
<p>Get next component, until end-of-components.</p>
2204
<p class="format">vcalendar::getComponent()</p>
2205
<p class="label">Example</p>
2206
<p class="example">&lt;?php
2207
.. .
2208
$config      = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2209
$vcalendar   = new vcalendar( $config );
2210
$vcalendar-&gt;parse();
2211
while( $comp = $vcalendar-&gt;getComponent()) {
2212
.. .
2213
}
2214
.. .
2215
</p>
2216
<p class="label">format 2</p>
2217
<P>Get specific component with order number (1st=1, 2nd=2.. .).</p>
2218
<p class="format">vcalendar::getComponent( orderNumber )</p>
2219
<p class="comment">orderNumber = (int) order number</p>
2220
<p class="label">Example</p>
2221
<p class="example">&lt;?php
2222
.. .
2223
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2224
$vcalendar = new vcalendar( $config );
2225
$vcalendar-&gt;parse();
2226
if( $comp  = $vcalendar-&gt;getComponent( 1 )) {
2227
.. .
2228
}
2229
.. .
2230
</p>
2231

    
2232
<p class="label">format 3</p>
2233
<p>
2234
Get (first/next) component with component type (until end-of-components) alt.
2235
get specific component with component type and suborder number (1st=1, 2nd=2.. .).
2236
</p>
2237
<p class="format">vcalendar::getComponent( componentType [, componentSuborderNumber])</p>
2238
<p class="comment">componentType           = (string) component type
2239
componentSuborderNumber = (int) order number</p>
2240
<p class="label">Example</p>
2241
<p class="example">&lt;?php
2242
.. .
2243
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2244
$vcalendar = new vcalendar( $config );
2245
$vcalendar-&gt;parse();
2246
if( $comp  = $vcalendar-&gt;getComponent( &quot;vtodo&quot;, 2 )) {
2247
.. .
2248
}
2249
.. .
2250
</p>
2251

    
2252
<p class="label">format 4</p>
2253
<p>
2254
Get (first/next) component with <a href="#UID">UID</a> as key.
2255
(<a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.)
2256
</p>
2257
<p class="format">vcalendar::getComponent( <a href="#UID">UID</a> )</p>
2258
<p class="label">Example</p>
2259
<p class="example">&lt;?php
2260
.. .
2261
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2262
$vcalendar = new vcalendar( $config );
2263
$vcalendar-&gt;parse();
2264
$uid       = &quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;;
2265
if( $comp  = $vcalendar-&gt;getComponent( $uid )) {
2266
.. .
2267
}
2268
.. .
2269
</p>
2270

    
2271
<a name="getComponent5"></a>
2272
<p class="label">format 5</p>
2273
<p>
2274
Get (first/next) component based on specific property contents:
2275
</p>
2276
<dl>
2277
<dt>Supported Descriptive Component Properties
2278
<dd><a href="#CATEGORIES">CATEGORIES</a>
2279
<dd><a href="#LOCATION">LOCATION</a>
2280
<dd><a href="#PRIORITY">PRIORITY</a>
2281
<dd><a href="#RESOURCES">RESOURCES</a>
2282
<dd><a href="#STATUS">STATUS</a>
2283
<dd><a href="#SUMMARY">SUMMARY</a>
2284
<dt>Date and Time Component Properties
2285
<dd><a href="#COMPLETED">COMPLETED</a>
2286
<dd><a href="#DTEND">DTEND</a>
2287
<dd><a href="#DUE">DUE</a>
2288
<dd><a href="#DTSTART">DTSTART</a>
2289
<dt>SupportedRelationship Component Properties
2290
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
2291
<dd><a href="#CONTACT">CONTACT</a>
2292
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
2293
<dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>
2294
<dd><a href="#RELATED-TO">RELATED-TO</a>
2295
<dd><a href="#URL">URL</a>
2296
<dd><a href="#UID">UID</a>
2297
<dt>Change Management Component Properties
2298
<dd><a href="#CREATED">CREATED</a>
2299
<dd><a href="#DTSTAMP">DTSTAMP</a>
2300
<dd><a href="#LAST-MODIFIED">LAST-MODIFIED</a>
2301
</dl>
2302
<dl>
2303
<dt><sup>*1</sup>
2304
<dd><a href="#ATTENDEE">ATTENDEE</a> and
2305
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by protocol ex. &quot;MAILTO:chair@ical.net&quot;.
2306
</dl>
2307
<p>
2308
For the property &quot;SUMMARY&quot; ,if a search value (any case) exists within property value, a hit exists.
2309
For the other, non-date, properties an exact (strict case) match is required.
2310
</p>
2311
<p>
2312
To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
2313
</p>
2314
<p>
2315
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components,
2316
use <a href="#getProperty2">getProperty</a> (Format 2).
2317
</p>
2318
<p class="format">vcalendar::getComponent( search )</p>
2319
<p class="comment">
2320
search       = (array) ( *[ propertyName =&gt; uniqueValue ]), multiple array elements are combined by &quot;OR&quot;
2321
propertyName = (string) property name, above
2322
propertyData = (string) unique property value (strict case),
2323
               date format &quot;YYYYMMDD&quot; (if any side is DATE, only dates are used),
2324
               datetime format &quot;YYYYMMDDTHHMMSS&quot;</p>
2325
<p class="label">Example</p>
2326
<p class="example">&lt;?php
2327
.. .
2328
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2329
$vcalendar = new vcalendar( $config );
2330
$vcalendar-&gt;parse();
2331
while( $comp  = $vcalendar-&gt;getComponent( array( &quot;RESOURCES&quot; =&gt; &quot;PC&quot; )) {
2332
.. .
2333
}
2334
.. .
2335
</p>
2336
<br>
2337
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2338

    
2339
<a name="newComponent"></a><h4>3.1.3.3 newComponent</h4>
2340
<P>
2341
Create component (<a href="#VEVENT">VEVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a> / <a href="#VTIMEZONE">VTIMEZONE</a>)
2342
using a iCalcreator object factory-method, returning a reference to the new component.
2343
</p>
2344
<p class="label">Format</p>
2345
<p class="format">vcalendar::newComponent( componentType )</p>
2346
<p class="comment">componentType = (string) component type</p>
2347
<p class="label">Example</p>
2348
<p class="example">&lt;?php
2349
.. .
2350
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2351
$vcalendar = new vcalendar( $config );
2352
...
2353
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
2354
...
2355
</p>
2356

    
2357
<br>
2358
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2359

    
2360
<a name="selectComponents"></a><h4>3.1.3.4 selectComponents</h4>
2361
<p class="label">Format 1</p>
2362
<p>
2363
Selects  <a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> /
2364
<a href="#VFREEBUSY">VFREEBUSY</a> components from the iCalcreator object instance on based on <b>dates</b>
2365
(notice <a href="#date_restriction">date restriction</a>), based on the initial <a href="#DTSTART">DTSTART</a>
2366
property along with the <a href="#RRULE">RRULE</a>, <a href="#RDATE">RDATE</a>, <a href="#EXDATE">EXDATE</a>
2367
and <a href="#EXRULE">EXRULE</a> properties in the component.
2368
</p>
2369
<p>Requirement:</p>
2370
<ul>
2371
<li>The property <a href="#DTSTART">DTSTART</a> is required. If missing in a <a href="#VTODO">VTODO</a> component, <a href="#DTSTART">DUE</a> is used.<br>
2372
</ul>
2373
<p>Limitations:</p>
2374
<ul>
2375
<li>The values &quot;SECONDLY&quot; / &quot;MINUTELY&quot; / &quot;HOURLY&quot; in the &quot;FREQ&quot; rule part are NOT supported.
2376
<li>If using components with properties<br>
2377
<a href="#UID">UID</a> in combination with <a href="#SEQUENCE">SEQUENCE</a> and <a href="#RECURRENCE-ID">RECURRENCE-ID</a><br>
2378
(i.e. an individual instance within the recurrence set),<br>
2379
the <a href="#RECURRENCE-ID">RECURRENCE-ID</a> parameter &quot;RANGE&quot; (&quot;THISANDPRIOR&quot; / &quot;THISANDFUTURE&quot;) is NOT supported.<br>
2380
</ul>
2381
<p>FALSE is returned if no selected component exists.</p>
2382
<p class="format">vcalendar::selectComponents([ startYear, startMonth, startDay
2383
                [, endYear,   endMonth,   endDay
2384
                [, cType [, flat [, any [, split]]]]]])
2385
</p>
2386
<p>
2387
Returns an array with components (events.. .).
2388
For all recurrent instances of a <strong>calendar</strong> component, an x-property,
2389
&quot;X-CURRENT-DTSTART&quot; and opt. also &quot;X-CURRENT-DTEND&quot; alt. &quot;X-CURRENT-DUE&quot;,
2390
has been created with a TEXT content, &quot;Y-m-d&nbsp;[H:i:s][timezone/UTC&nbsp;offset]&quot;
2391
showing the current start and opt. also end alt. due date.<br>
2392
Also a &quot;X-RECURRENCE&quot; x-property is set with order number (valid if selectComponents is called from DTSTART date).
2393
</p>
2394
<p class="comment">startYear  : (int) start year  (4*digit),   default current year
2395
startMonth : (int) start month (1-2*digit), default current month
2396
startDay   : (int) start day   (1-2*digit), default current day
2397
endYear    : (int) end year    (4*digit),   default startYear
2398
endMonth   : (int) end month   (1-2*digit), default startMonth
2399
endDay     : (int) end day     (1-2*digit), default startDay
2400
cType      : (mixed) <strong>calendar</strong> component type(-s), (string/array)
2401
                   (&quot;vevent&quot;, &quot;vtodo&quot;, &quot;vjournal&quot;, &quot;vfreebusy&quot;)
2402
             (bool) FALSE (default) =&gt; all
2403
flat       : (bool) TRUE =&gt; output : array[] (ignores split)
2404
               component where recurrence pattern exists within period
2405
             FALSE (default) =&gt; output : array[Year][Month][Day][]
2406
any        : (bool) TRUE (default) =&gt; select components with recurrence within period
2407
                    FALSE =&gt; only components that starts (DTSTART) within period
2408
split      : (bool) TRUE (default) =&gt; one component copy for every day it occurs
2409
                                      within the period
2410
                    FALSE =&gt; one occurrence of component in output array,
2411
                             start date/recurrence (start) date
2412

    
2413
valid         flat    any     split
2414
combinations                          (defaults in upper case)
2415
           1  FALSE   TRUE    TRUE
2416
           2  FALSE   TRUE    false
2417
           3  FALSE   false   [false] (split set to false if flat=FALSE and any=false)
2418
           4  true    TRUE    [false] (split set to false if flat=true)
2419
           5  true    false   [false] (split set to false if flat=true)
2420
</p>
2421
<p class="label">Example</p>
2422
<p class="example">&lt;?php
2423
.. .
2424
$config     = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2425
                     &quot;directory&quot; =&gt; &quot;import&quot;,
2426
                     &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2427
$vcalendar  = new vcalendar( $config );
2428
$vcalendar-&gt;parse();
2429
$events_arr = $vcalendar-&gt;selectComponents( 2007, 11, 1, 2007, 11, 30, &quot;vevent&quot; );
2430
 // <span class="comment">select all events occurring 1-30 nov. 2007</span>
2431
foreach( $events_arr as $year =&gt; $year_arr ) {
2432
  foreach( $year_arr as $month =&gt; $month_arr ) {
2433
    foreach( $month_arr as $day =&gt; $day_arr ) {
2434
      foreach( $day_arr as $event ) {
2435
        $currddate   = $event-&gt;getProperty( &quot;x-current-dtstart&quot; );
2436
        <span class="comment">// if member of a recurrence set, returns
2437
       // array(&quot; x-current-dtstart&quot;,
2438
       // &lt;(string) date(&quot;Y-m-d&nbsp;[H:i:s][timezone/UTC&nbsp;offset]&quot;)&gt;)</span>
2439
        $startDate   = $event-&gt;getProperty( &quot;dtstart&quot; );
2440
        $summary     = $event-&gt;getProperty( &quot;summary&quot; );
2441
        $description = $event-&gt;getProperty( &quot;description&quot; );
2442
        .. .
2443
        .. .
2444
</p>
2445
<a name="selectComponents2"></a>
2446
<p class="label">format 2</p>
2447
<p>
2448
Using this format, the iCalcreator object method selects components based on specific property value(-s).
2449
</p>
2450
<dl>
2451
<dt>Supported Descriptive Component Properties
2452
<dd><a href="#CATEGORIES">CATEGORIES</a>
2453
<dd><a href="#LOCATION">LOCATION</a>
2454
<dd><a href="#PRIORITY">PRIORITY</a>
2455
<dd><a href="#RESOURCES">RESOURCES</a>
2456
<dd><a href="#STATUS">STATUS</a>
2457
<dd><a href="#SUMMARY">SUMMARY</a>
2458
<dt>Supported Relationship Component Properties
2459
<dd><a href="#ATTENDEE">ATTENDEE</a>&nbsp;<sup>*1</sup>
2460
<dd><a href="#CONTACT">CONTACT</a>
2461
<dd><a href="#ORGANIZER">ORGANIZER</a>&nbsp;<sup>*1</sup>
2462
<dd><a href="#RELATED-TO">RELATED-TO</a>
2463
<dd><a href="#URL">URL</a>
2464
<dd><a href="#UID">UID</a>
2465
</dl>
2466
<dl>
2467
<dt><sup>*1</sup>
2468
<dd><a href="#ATTENDEE">ATTENDEE</a> and
2469
<a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by (upper case) protocol like &quot;MAILTO:chair@ical.net&quot;.
2470
</dl>
2471
<p>
2472
For the property <a href="#SUMMARY">SUMMARY</a>, if a search value (any case) exists within property value, a hit is found.
2473
For the other properties an exact (strict case) match is required. Multiple search properties may coexist.
2474
</p>
2475
<p>
2476
To retrieve specific iCalcreator instance property values, searching <b>ALL</b> components,
2477
use <a href="#getProperty2">getProperty</a> (Format 2).
2478
</p>
2479
<p>
2480
To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
2481
</p>
2482
<p class="format">vcalendar::selectComponents( searchArray )</p>
2483
<p>Outputs an array of matched (unique) components in <a href="#UID">UID</a> order.</p>
2484
<p class="comment">searchArray   : (array) *( propertyName =&gt; propertyValue )
2485
propertyName  : (string) above (any case)
2486
propertyValue : (string) value / (array) ( *[ (string) value] )
2487
</p>
2488
<p class="label">Example</p>
2489
<p class="example">&lt;?php
2490
.. .
2491
$config        = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2492
                        &quot;directory&quot; =&gt; &quot;import&quot;,
2493
                        &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2494
$vcalendar     = new vcalendar( $config );
2495
$vcalendar-&gt;parse();
2496
$searchArray   = array( &quot;PRIORITY&quot; =&gt; array( 1, 2, 3, 4 ));
2497
$highPrioArr   = $vcalendar-&gt;selectComponents( $searchArray );
2498
 // <span class="comment">select all components with PRIORITY set to high (1-4)</span>
2499
if( !empty( $highPrioArr )) {
2500
  $highPrioCal = new vcalendar( array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; ));
2501
  $highPrioCal-&gt;setProperty( "X-WR-CALDESC", "High priority events" );
2502
  foreach( $highPrioArr as $highPrioComponent )
2503
    $highPrioCal-&gt;setComponent( $highPrioComponent );
2504
  $highPrioCal-&gt;returnCalendar();
2505
}
2506
.. .
2507
</p>
2508
<br>
2509
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2510

    
2511
<a name="setComponent"></a><h4>3.1.3.5 setComponent</h4>
2512
<p>
2513
Replace or update component in the iCalcreator object instance.
2514
Also add a <strong>calendar</strong> component to the iCalcreator object instance
2515
when <strong>calendar</strong> component is created with the procedural (<b>non</b>-factory) method,
2516
see example <a href="#vevent_constr">VEVENT</a>, format 2.
2517
</p>
2518
<p>A successful update returns TRUE.</p>
2519
<p class="label">format 1</p>
2520
<p>Insert last in component chain.</p>
2521
<p class="format">vcalendar::setComponent( component )
2522
addComponent( component ) // <span class="comment">alias</span></p>
2523
<p class="comment">component = (object) iCalcreator component instance</p>
2524
<p class="comment">addComponent, may be removed in future versions.</p>
2525
<p class="label">format 2</p>
2526
<p>
2527
Insert/replace component with order number (1st=1, 2nd=2.. .).
2528
If replace and orderNumber is not found, component is inserted last in chain.
2529
</p>
2530
<p class="format">vcalendar::setComponent( component, orderNumber )</p>
2531
<p class="comment">component = (object) iCalcreator component instance
2532
int       = (int) order numder</p>
2533
<p class="label">format 3</p>
2534
<p>
2535
Replace component with component type and 1st alt. component order number.
2536
If orderNumber is not found, component is inserted last in chain.
2537
</p>
2538
<p class="format">vcalendar::setComponent( component, componentType [, componentSuborderNo])</p>
2539
<p class="comment">component           = (object) iCalcreator component instance
2540
componentType       = (string) component type
2541
componentSuborderNo = (int) component Suborder Number</p>
2542
<p class="label">format 4</p>
2543
<p>
2544
Replace component with <a href="#UID">UID</a>.
2545
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.
2546
If <a href="#UID">UID</a> is not found, component is inserted last in chain.
2547
</p>
2548
<p class="format">vcalendar::setComponent( component, <a href="#UID">UID</a> )</p>
2549
<p class="comment">component = (object) iCalcreator component instance</p>
2550
<p class="label">Example</p>
2551
<p class="example">&lt;?php
2552
.. .
2553
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;filename&quot; =&gt; &quot;file.ics&quot;);
2554
$vcalendar = new vcalendar( $config );
2555
$vcalendar-&gt;parse();
2556
$vevent    = vcalendar-&gt;getComponent( 1 ); // <span class="comment">fetch first EVENT</span>
2557
$vevent-&gt;setProperty( &quot;dtstart, 2006, 12, 24, 19, 30, 00 );
2558
                                           // <span class="comment">update <a class="ref" href="#DTSTART">DTSTART</a> property</span>
2559
$vcalendar-&gt;setComponent( $vevent, 1 );    // <span class="comment">replace first component</span>
2560
.. .
2561
</p>
2562
<br>
2563
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
2564

    
2565
<a name="iCalcreator_inputoutput_methods"></a><h3>3.1.4 iCalcreator input/output methods</h3>
2566

    
2567
<a name="parse_merge"></a><h4>3.1.4.1 parse and merge</h4>
2568
<p>
2569
Parse iCal file(-s) or string/array <strong>calendar</strong> content into a single iCalcreator object instance (components, properties and parameters),
2570
including multiple vcalendars (within a single ICS file) parse, e.g. Oracle Calendar exports.
2571
</p>
2572
<p>
2573
As long as php.ini directive &quot;allow_url_fopen&quot; is enabled, remote files, URLs; protocol &quot;http&quot; (&quot;webcal&quot;), are supported.
2574
 A remote file, URL, <b>must</b> be prefixed by &quot;http://&quot; (&quot;webcal://&quot;) and suffixed by a valid filename.!
2575
 Recommendation is to download (cache) remote file before parsing, due to execution time and control.
2576
</p>
2577
<p>
2578
If missing, component property <a href="#UID">UID</a> is created when parsing.
2579
 For that reason <a href="#Unique_id">UNIQUE_ID</a> might need to be set before parsing, Se examples below.
2580
</p>
2581
<p>
2582
Notice <a href="#date_restriction">date restriction</a>!
2583
</p>
2584
<p>
2585
If major parse error occurs (like file access error, invalid <strong>calendar</strong> file or <strong>calendar</strong> file without components), FALSE is returned.
2586
</p>
2587
<p>
2588
Minor errors like non-standard line-endings, initial and trailing empty lines
2589
 as well as files without proper end line(-s) (i.e. missing component end and/or &quot;END:CALENDAR&quot; iCal directives)
2590
 are managed.
2591
</p>
2592
<p>
2593
Non-standard iCal properties (except the <a href="#X-PROPERTY_PROP">X-properties</a>) are ignored.
2594
</p>
2595
<p class="label">Format</p>
2596
<p class="format">vcalendar::parse( [ textToParse ] )</p>
2597
<p class="comment">textToParse = (string) calendarContent
2598
                       ex. result from - file_get_contents( &quot;filename&quot;)
2599
              (array)  calendarContent
2600
                       ex. result from - file( &quot;filename&quot;, FILE_IGNORE_NEW_LINES )</p>
2601
<p class="label">parse example 1</p>
2602
<p class="example">&lt;?php
2603
.. .
2604
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2605
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2606
$vcalendar = new vcalendar( $config );
2607
$vcalendar-&gt;parse();
2608
.. .
2609
</p>
2610
<p class="label">parse example 2</p>
2611
<p class="example">&lt;?php
2612
.. .
2613
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2614
                    &quot;url&quot;       =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
2615
$vcalendar = new vcalendar( $config );
2616
$vcalendar-&gt;parse();
2617
.. .
2618
</p>
2619
<p class="label">parse example 3</p>
2620
<p class="example">&lt;?php
2621
.. .
2622
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2623
                    &quot;url&quot;       =&gt; &quot;http://www.ical.net/calendars/calendar.ics&quot; );
2624
$vcalendar = new vcalendar( $config );
2625
...
2626
$str       = array(
2627
&quot;BEGIN:VCALENDAR&quot;,
2628
&quot;PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.16.6//&quot;,
2629
&quot;VERSION:2.0&quot;,
2630
&quot;BEGIN:VEVENT&quot;,
2631
&quot;DTSTART:20101224T190000Z&quot;,
2632
&quot;DTEND:20101224T200000Z&quot;,
2633
&quot;DTSTAMP:20101020T103827Z&quot;,
2634
&quot;UID:20101020T113827-1234GkdhFR@test.org&quot;,
2635
&quot;DESCRIPTION:example&quot;,
2636
&quot;END:VEVENT&quot;,
2637
&quot;END:VCALENDAR&quot;);
2638
$vcalendar-&gt;parse( $str );
2639
...
2640
</p>
2641
<p class="label">merge example</p>
2642
<p class="example">&lt;?php
2643
.. .
2644
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2645
                    &quot;directory&quot; =&gt; &quot;import&quot; );
2646
$vcalendar = new vcalendar( $config );
2647

    
2648
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file1.ics&quot; );
2649
$vcalendar-&gt;parse();
2650

    
2651
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;file2.ics&quot; );
2652
$vcalendar-&gt;parse();
2653

    
2654
$vcalendar-&gt;setConfig( &quot;directory&quot;,&nbsp;&quot;export&quot; );
2655
$vcalendar-&gt;setConfig( &quot;filename&quot;,&nbsp;&nbsp;&quot;icalmerge.ics&quot; );
2656
$vcalendar-&gt;saveCalendar();
2657
.. .
2658
</p>
2659
<br>
2660
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>
2661

    
2662
<a name="createCalendar"></a><h4>3.1.4.2 createCalendar</h4>
2663
Generate and return <strong>calendar</strong> in a string, testing.. .?
2664
<p class="label">Format</p>
2665
<p class="format">vcalendar::createCalendar()</p>
2666
<p class="label">Example</p>
2667
<p class="example">&lt;?php
2668
.. .
2669
$str = $vcalendar-&gt;createCalendar();
2670
echo $str;
2671
...
2672
</p>
2673
<br>
2674
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>
2675

    
2676
<a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
2677
<p>
2678
Redirect the iCalcreator object instance content to user browser. Filename, addressed to browser, is automatically generated if missing or not set;<br>
2679
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
2680
</p>
2681
<p class="label">Format</p>
2682
<p class="format">vcalendar::returnCalendar( [ utf8Encode [, gzip ]] )</p>
2683
<p class="comment">utf8Encode = (bool) TRUE:  utf8 encoded output, FALSE: (default) no encoding
2684
gzip       = (bool) TRUE:  gzip compressed output
2685
                           Header &quot;Content-Length&quot; only sent when gzip=TRUE
2686
                    FALSE: (default) no compressing</p>
2687
<p class="label">Example 1</p>
2688
<p class="example">&lt;?php
2689
.. .
2690
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
2691
$vcalendar = new vcalendar( $config );
2692
.. .
2693
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
2694
$vevent-&gt;setProperty( &quot;dtstart&quot;, array( &quot;year&quot;  =&gt; 2007
2695
                                      , &quot;month&quot; =&gt; 4
2696
                                      , &quot;day&quot;   =&gt; 1
2697
                                      , &quot;hour&quot;  =&gt; 19 ));
2698
$vevent-&gt;setProperty( &quot;duration&quot;, 0, 0, 3 ));
2699
$vevent-&gt;setProperty( &quot;LOCATION&quot;, &quot;Central Plaza&quot; );
2700
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
2701
.. .
2702
$vcalendar-&gt;returnCalendar();
2703
.. .
2704
</p>
2705
<p class="label">Example 2</p>
2706
<p class="example">&lt;?php
2707
.. .
2708
$config     = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2709
                     &quot;directory&quot; =&gt; &quot;import&quot;,
2710
                     &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2711
$vcalendar  = new vcalendar( $config );
2712
$vcalendar-&gt;parse();
2713
$utf8Encode = TRUE;
2714
if( isset( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ) &amp;&amp;
2715
  ( FALSE !== strpos( strtolower( $_SERVER[&quot;HTTP_ACCEPT_ENCODING&quot;] ), &quot;gzip&quot; )))
2716
  $gzip     = TRUE;
2717
else
2718
  $gzip     = FALSE;
2719
$vcalendar-&gt;returnCalendar( $utf8Encode, $gzip );
2720
...
2721
</p>
2722
<br>
2723
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>
2724

    
2725
<a name="saveCalendar"></a><h4>3.1.4.4 saveCalendar</h4>
2726
<p>
2727
Save the iCalcreator object instance in a file, uses present directory if directory not set, filename is automatically generated if missing or not set;<br>
2728
<span class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot; </span>.
2729
</p>
2730
<p>Directory/filename <b>must</b> be writeable, delimiter default <em>PHP</em> constant DIRECTORY_SEPARATOR.</p>
2731
<p>If file error occurs, FALSE is returned.</p>
2732
<p class="label">Format</p>
2733
<p class="format">vcalendar::saveCalendar ( [ directory [, filename [, delimiter ]]] )</p>
2734
<p class="comment">directory = (string) directory, default FALSE
2735
filename  = (string  file name, default FALSE
2736
delimiter = (string) path directory/filename separator, default FALSE</p>
2737
Parameters for <span class="format">directory/filename/delimiter</span>, kept for backward compatibility,
2738
may be removed i future versions. Recommendation is to use <span class="format">setConfig</span>, Se
2739
example below.
2740
<p class="label">Example</p>
2741
<p class="example">&lt;?php
2742
.. .
2743
$vcalendar-&gt;setConfig( array( &quot;directory&quot; =&gt; &quot;depot&quot;,
2744
                              &quot;filename&quot;  =&gt; &quot;calendar.ics&quot; ));
2745
$result = $vcalendar-&gt;saveCalendar();
2746
if( !$result )
2747
&nbsp;&nbsp;echo &quot;error when saving.. .&quot;
2748
...
2749
</p>
2750
<br>
2751
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>
2752

    
2753
<a name="sort"></a><h4>3.1.4.5 sort</h4>
2754
<p class="label">Format 1</p>
2755
<p>
2756
Sort created/parsed <strong>calendar</strong> components on the following (prioritized) keys:<br>
2757
1 - X-CURRENT-DTSTART - X-CURRENT-DTEND/X-CURRENT-DUE<br>
2758
&nbsp;&nbsp;&nbsp;&nbsp;(if created in iCalcreator object method <a href="#selectComponents">selectComponents</a>)<br>
2759
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>
2760
1 - <a href="#DTSTART">DTSTART</a> - <a href="#DUE">DUE</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VTODO">VTODO</a> components)<br>
2761
1 - <a href="#DTSTART">DTSTART</a> (<a href="#VJOURNAL">VJOURNAL</a> components)<br>
2762
2 - <a href="#CREATED">CREATED</a> / <a href="#DTSTAMP">DTSTAMP</a><br>
2763
3 - <a href="#UID">UID</a><br>
2764
A date value, like &quot;DTSTART;VALUE=DATE:20120717&quot;, are sorted before a datetime value.<br>
2765
<a href="#VTIMEZONE">VTIMEZONE</a> component(-s) is always placed first (ordered by <a href="#TZID">TZID</a>). The
2766
<a href="#VTIMEZONE">STANDARD</a>&nbsp;/&nbsp;<a href="#VTIMEZONE">DAYLIGHT</a>&nbsp; sub-components are sorted (on asc. key <a href="#DTSTART">DTSTART</a>) when calling
2767
<a href="#createCalendar">createCalendar</a> (or <a href="#returnCalender">returnCalender</a>).
2768
<br>
2769
<a href="#VALARM">ALARM</a> sub-components, if exists, are not sorted.
2770

    
2771
</p>
2772
<p class="format">vcalendar::sort()</p>
2773
<p class="label">Example</p>
2774
<p class="example">&lt;?php
2775
.. .
2776
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2777
                    &quot;directory&quot; =&gt; &quot;import&quot;,
2778
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2779
$vcalendar = new vcalendar( $config );
2780
$vcalendar-&gt;parse();
2781
$vcalendar-&gt;returnCalendar();
2782
...
2783
</p>
2784

    
2785
<p class="label">Format 2</p>
2786
<p>
2787
Sort created/parsed <strong>calendar</strong> components based on specific property values and ascending order.
2788
 If a property is not set in component, an empty sort key is used (i.e. sorted first).
2789
</p>
2790
<p class="format">vcalendar::sort( sortArgument )</p>
2791
<p class="comment">sortArgument: (string) &quot;<a href="#ATTENDEE">ATTENDEE</a>&quot; <sup>*</sup> / &quot;<a href="#CATEGORIES">CATEGORIES</a>&quot; <sup>*</sup> / &quot;<a href="#CONTACT">CONTACT</a>&quot; <sup>*</sup> / &quot;<a href="#DTSTAMP">DTSTAMP</a>&quot; /
2792
                       &quot;<a href="#LOCATION">LOCATION"</a>&quot; / &quot;<a href="#ORGANIZER">ORGANIZER</a>&quot; / &quot;<a href="#PRIORITY">PRIORITY</a>&quot; /
2793
                       &quot;<a href="#RESOURCES">RESOURCES</a>&quot; <sup>*</sup> / &quot;<a href="#STATUS">STATUS</a>&quot; / &quot;<a href="#SUMMARY">SUMMARY</a>&quot; / &quot;<a href="#URL">URL</a>&quot; / &quot;<a href="#UID">UID</a>&quot; <sup>**</sup>.
2794
<p class="comment"><sup>*) </sup> For a property where multiple occurrence may exist (<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#CONTACT">CONTACT</a>, <a href="#RESOURCES">RESOURCES</a>) lowest (alphabetic) value is used as sort key.</p>
2795
<p class="comment"><sup>**)</sup> For multiple components with the same <a href="#UID">UID</a>, components with <a href="#RECURRENCE-ID">RECURRENCE-ID</a> / <a href="#SEQUENCE">SEQUENCE</a> set are sorted first (on asc. values).</p>
2796
<br>
2797
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>
2798

    
2799
<a name="useCachedCalendar"></a><h4>3.1.4.6 useCachedCalendar</h4>
2800
<p>
2801
If recent version of local (non-empty and saved) <strong>calendar</strong> file exists, an HTTP redirect header is sent otherwise FALSE is returned.
2802
</p>
2803
<p class="label">Format</p>
2804
<p class="format">vcalendar::useCachedCalendar( [ timeout ] )</p>
2805
<p class="format">vcalendar::useCachedCalendar( [ directory [, filename [, delimiter [, timeout ]]]] )</p>
2806
<p class="comment">directory = (string) directory, default FALSE
2807
filename  = (string  file name, default FALSE
2808
delimiter = (string) path directory/filename separator, default FALSE
2809
timeout   = (int) default 3600 sec
2810
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>
2811
<p class="label">Example</p>
2812
<p class="example">&lt;?php
2813
.. .
2814
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
2815
$vcalendar-&gt;setConfig( &quot;filename&quot;, &quot;calendar.ics&quot; );
2816
$vcalendar-&gt;useCachedCalendar();
2817
...
2818
</p>
2819
<br>
2820
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_inputoutput_methods">[up]</a>
2821

    
2822
<a name="iCalcreator_configuration_methods"></a><h3>3.1.5 iCalcreator configuration methods</h3>
2823

    
2824
<a name="configKeys"></a><h4>3.1.5.1 configuration keys</h4>
2825
<p>All configuration keys (allowEmpty, compsInfo etc.) case independent.</p>
2826
<table>
2827
<tr>
2828
<td class="bl bb">key</td>
2829
<td class="bl bb"><strong>calendar</strong></td>
2830
<td class="bl bb">component</td>
2831
<td class="bl bb">remark</td>
2832
</tr>
2833
<tr>
2834
<td class="bl bb"><a class="ref" href="#allowEmpty">allowEmpty</a></td>
2835
<td class="bl bb center">*</td>
2836
<td class="bl bb center">*</td>
2837
<td class="bl bb ref">&nbsp;</td>
2838
</tr>
2839
<tr>
2840
<td class="bl bb"><a class="ref" href="#Compsinfo">Compsinfo</a></td>
2841
<td class="bl bb center">*</td>
2842
<td class="bl bb center">*</td>
2843
<td class="bl bb ref">getConfig only</td>
2844
</tr>
2845
<tr>
2846
<td class="bl bb"><a class="ref" href="#Delimiter">Delimiter</a></td>
2847
<td class="bl bb center">*</td>
2848
<td class="bl bb">&nbsp;</td>
2849
<td class="bl bb ref">&nbsp;</td>
2850
</tr>
2851
<tr>
2852
<td class="bl bb"><a class="ref" href="#Directory">Directory</a></td>
2853
<td class="bl bb center">*</td>
2854
<td class="bl bb">&nbsp;</td>
2855
<td class="bl bb ref">&nbsp;</td>
2856
</tr>
2857
<tr>
2858
<td class="bl bb"><a class="ref" href="#Filename">Filename</a></td>
2859
<td class="bl bb center">*</td>
2860
<td class="bl bb">&nbsp;</td>
2861
<td class="bl bb ref">&nbsp;</td>
2862
</tr>
2863
<tr>
2864
<td class="bl bb"><a class="ref" href="#Dirfile">Dirfile</a></td>
2865
<td class="bl bb center">*</td>
2866
<td class="bl bb">&nbsp;</td>
2867
<td class="bl bb ref">getConfig only</td>
2868
</tr>
2869
<tr>
2870
<td class="bl bb"><a class="ref" href="#Filesize">Filesize</a></td>
2871
<td class="bl bb center">*</td>
2872
<td class="bl bb">&nbsp;</td>
2873
<td class="bl bb ref">getConfig only</td>
2874
</tr>
2875
<tr>
2876
<td class="bl bb"><a class="ref" href="#Format">Format</a></td>
2877
<td class="bl bb center">*</td>
2878
<td class="bl bb">&nbsp;</td>
2879
<td class="bl bb ref">&nbsp;</td>
2880
</tr>
2881
<tr>
2882
<td class="bl bb"><a class="ref" href="#Language">Language</a></td>
2883
<td class="bl bb center">*</td>
2884
<td class="bl bb center">*</td>
2885
<td class="bl bb ref">&nbsp;</td>
2886
</tr>
2887
<tr>
2888
<td class="bl bb"><a class="ref" href="#NewlineChar">NewlineChar</a></td>
2889
<td class="bl bb center">*</td>
2890
<td class="bl bb center">*</td>
2891
<td class="bl bb ref">&nbsp;</td>
2892
</tr>
2893
<tr>
2894
<td class="bl bb"><a class="ref" href="#setPropertyNames">setPropertyNames</a></td>
2895
<td class="bl bb center">&nbsp;</td>
2896
<td class="bl bb center">*</td>
2897
<td class="bl bb ref">getConfig only</td>
2898
</tr>
2899
<tr>
2900
<td class="bl bb"><a class="ref" href="#dTZID">TZID</a></td>
2901
<td class="bl bb center">*</td>
2902
<td class="bl bb center">*</td>
2903
<td class="bl bb ref">&nbsp;</td>
2904
</tr>
2905
<tr>
2906
<td class="bl bb"><a class="ref" href="#Unique_id">Unique_id</a></td>
2907
<td class="bl bb center">*</td>
2908
<td class="bl bb center">*</td>
2909
<td class="bl bb ref">&nbsp;</td>
2910
</tr>
2911
<tr>
2912
<td class="bl bb"><a class="ref" href="#configURL">URL</a></td>
2913
<td class="bl bb center">*</td>
2914
<td class="bl bb">&nbsp;</td>
2915
<td class="bl bb ref">&nbsp;</td>
2916
</tr>
2917
</table>
2918
<br>
2919
<br>
2920
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
2921

    
2922
<a name="getConfig"></a><h4>3.1.5.2 getConfig</h4>
2923
<p class="format">vcalendar::getConfig( [ key ] )</p>
2924
<p class="comment">key = (string) config key</p>
2925
<p class="label">Example 1</p>
2926
<p class="example">&lt;?php
2927
.. .
2928
$filename = $vcalendar-&gt;getConfig( &quot;filename&quot; );
2929
.. .
2930
</p>
2931
In this example, notice <a href="#Filename">Filename</a>
2932
<br>
2933
<p class="label">Example 2</p>
2934
<p class="example">&lt;?php
2935
.. .
2936
$config = $vcalendar-&gt;getConfig();
2937
.. .
2938
</p>
2939
<p class="comment">Output= array( string key =&gt; mixed value
2940
           *[, string key =&gt; mixed value] )</p>
2941
<br>
2942
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
2943

    
2944
<a name="initConfig"></a><h4>3.1.5.3 calendar/component initialization</h4>
2945
<p class="label">Format</p>
2946
<p>Create a new iCalcreator object instance.</p>
2947
<p class="format">vcalendar::vcalendar( [ config ] )</p>
2948
<p class="comment">config = (array) ( *[, key =&gt; value] )
2949
key    = (string) config key
2950
value  = (mixed) config value</p>
2951
<p class="label">Example 1</p>
2952
<p class="example">&lt;?php
2953
.. .
2954
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2955
                    &quot;directory&quot; =&gt; &quot;import&quot;,
2956
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2957
$vcalendar = new vcalendar( $config );
2958
.. .
2959
</p>
2960
<p>Create a new <strong>calendar</strong> component.</p>
2961
<p class="format">vcalendar::component( [ config ] )</p>
2962
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
2963
key    = (string) config key
2964
value  = (mixed) config value</p>
2965
<p class="label">Example 2</p>
2966
<p class="example">&lt;?php
2967
.. .
2968
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
2969
$vevent = new vevent( $config );
2970
.. .
2971
</p>
2972
<p class="label">Example 3</p>
2973
<p class="example">&lt;?php
2974
.. .
2975
$config = $vcalendar-&gt;getConfig();
2976
$vevent = new vevent( $config );
2977
.. .
2978
</p>
2979
<p>Only component relevant configuration are set. If using the <a href="#newComponent">newComponent</a> function, configuration is set automatically.</p>
2980
<br>
2981
<br>
2982
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
2983

    
2984
<a name="setConfig"></a><h4>3.1.5.4 setConfig</h4>
2985
<p>A successful &quot;setConfig&quot; returns TRUE.</p>
2986
<p class="label">Format 1</p>
2987
<p class="format">vcalendar::setConfig( [ config ] )</p>
2988
<p class="comment">config = (array) ( key =&gt; value *[, key =&gt; value] )
2989
key    = (string) config key
2990
value  = (mixed) config value</p>
2991
<p class="label">Example 1</p>
2992
<p class="example">&lt;?php
2993
.. .
2994
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
2995
                    &quot;directory&quot; =&gt; &quot;import&quot;,
2996
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
2997
$vcalendar = new vcalendar();
2998
$vcalendar-&gt;setConfig( $config );
2999
.. .
3000
</p>
3001
<p class="label">Example 2</p>
3002
<p class="example">&lt;?php
3003
.. .
3004
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
3005
$vevent = new vevent();
3006
$vevent-&gt;setConfig( $config );
3007
.. .
3008
</p>
3009
<p class="label">Format 2</p>
3010
<p class="format">vcalendar::setConfig( key, value )</p>
3011
<p class="comment">key    = (string) config key
3012
value  = (mixed) config value</p>
3013
<p class="label">Example 1</p>
3014
<p class="example">&lt;?php
3015
.. .
3016
$vcalendar = new vcalendar();
3017
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
3018
.. .
3019
</p>
3020
<p class="label">Example 2</p>
3021
<p class="example">&lt;?php
3022
.. .
3023
$vevent = new vevent();
3024
$vevent-&gt;setConfig( &quot;unique_id&quot;, &quot;kigkonsult.se&quot; );
3025
.. .
3026
</p>
3027
<br>
3028
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3029

    
3030
<a name="allowEmpty"></a><h4>3.1.5.5 Allow empty components</h4>
3031
<p>
3032
Allow or reject empty <strong>calendar</strong> properties. Used in <a href="#createCalendar">createCalendar</a>, <a href="#returnCalender">returnCalender</a> or
3033
create&lt;Property&gt; methods, creating [RFC5545] formats.
3034
</p>
3035
<p>
3036
Default TRUE (allow).
3037
</p>
3038

    
3039
<br>
3040
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3041

    
3042
<a name="Compsinfo"></a><h4>3.1.5.6 Component information</h4>
3043
<p>Only to use with iCalcreator object method getConfig.</p>
3044
<p>
3045
Get information about the iCalcreator object instance components. Returns array with basic information
3046
about all components (in array format) within the iCalcreator object instance.
3047
</p>
3048
<p class="comment">Output   = array ( *compinfo )
3049
compinfo = array ( &quot;ordno&quot; =&gt; int ordno,
3050
                   // <span class="commsnt">order number (1st=1, 2nd=2..)</span>
3051
                 , &quot;type&quot;  =&gt; string type
3052
                   // <span class="comment">component type (vevent, vtodo.. .</span>
3053
                 , &quot;uid&quot;   =&gt; string uid
3054
                   // <span class="comment">component <a href="#UID">UID</a> (not for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a>)</span>
3055
                 , &quot;props&quot; =&gt;
3056
                     array( *[ propertyName =&gt; Property count ])
3057
                   // <span class="comment">for every set property</span>
3058
                 , &quot;sub&quot;   =&gt; array( *compinfo ))
3059
                   // <span class="comment">if subcomponents exists, an array for each subcomponent</span></p>
3060
<p class="label">Example</p>
3061
<p class="example">&lt;?php
3062
.. .
3063
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3064
                    &quot;directory&quot; =&gt; &quot;import&quot;,
3065
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
3066
$vcalendar = new vcalendar( $config );
3067
$vcalendar-&gt;parse();
3068
$compsinfo = $vcalendar-&gt;getConfig( &quot;compsinfo&quot; );
3069
foreach( $compsinfo as compinfo) {
3070
&nbsp;&nbsp;echo &quot; order number : &quot;.$compinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3071
&nbsp;&nbsp;echo &quot; type : &quot;.$compinfo[&quot;type&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3072
&nbsp;&nbsp;echo &quot; UID : &quot;.$compinfo[&quot;uid&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3073
&nbsp;&nbsp;foreach( $compinfo[&quot;props&quot;] as $propertyName =&gt; $propertyCount )
3074
&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;  $propertyName = $propertyCount&quot;;
3075
&nbsp;&nbsp;if( is_array( $compinfo[&quot;sub&quot;] )) {
3076
&nbsp;&nbsp;&nbsp;&nbsp;foreach( $compinfo[&quot;sub&quot;] as $subcompinfo ) {
3077
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot; order number : &quot;.$subcompinfo[&quot;ordno&quot;].&quot;&lt;br&nbsp;/&gt;&quot;;
3078
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* .. dito if subcomponents exists .. . */
3079
&nbsp;&nbsp;&nbsp;&nbsp;}
3080
&nbsp;&nbsp;}
3081
}
3082
.. .
3083
</p>
3084
<br>
3085
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3086

    
3087
<a name="Delimiter"></a><h4>3.1.5.7 Delimiter</h4>
3088
<p>Directory/filename delimiter.</p>
3089
<p>
3090
Default <em>PHP</em> constant DIRECTORY_SEPARATOR. If used, <b>must</b> be set BEFORE filename!
3091
</p>
3092
<br>
3093
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3094

    
3095
<a name="Directory"></a><h4>3.1.5.8 Directory</h4>
3096
<p>
3097
Local directory to store/read iCal files.
3098
</p>
3099
<p>
3100
Default &quot;<b>.</b>&quot;.
3101
</p>
3102
<p>
3103
Directory <b>must</b> be set BEFORE <a href="#Filename">filename</a> and <b>must</b> exist and be writeable otherwise FALSE is returned.
3104
If set using an config array and together with <a name="Filename"><u>Filename</u></a>, Directory are set automatically first.
3105
When setting Directory, any previously set <a href="#configURL">URL</a> is removed.
3106
</p>
3107
<br>
3108
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3109

    
3110
<a name="Fileinfo"></a><h4>3.1.5.9 Fileinfo</h4>
3111
<p>
3112
Only available in iCalcreator object method getConfig, giving information in array format about <a href="#Directory">directory</a>,
3113
<a href="#Filename">filename</a> and <a href="#Filesize">filesize</a>.
3114
</p>
3115
<p class="label">Example</p>
3116
<p class="example">&lt;?php
3117
.. .
3118
$fileinfo = $vcalendar-&gt;getConfig( &quot;fileinfo&quot; );
3119
.. .
3120
</p>
3121
<p class="comment">output = array( &lt;directory&gt;, &lt;filename&gt;, &lt;filesize&gt; )</p>
3122
<br>
3123
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3124

    
3125
<a name="Filename"></a><h4>3.1.5.10 Filename</h4>
3126
<p>iCal local file name, default created like (if not set):</p>
3127
<p class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.ics&quot;;</p>
3128
<p class="format">$filename = date( &quot;YmdHis&quot; ).&quot;.xml&quot;; <span class="comment"> // if <a href="#Format">format</a> set to &quot;xcal&quot;</span></p>
3129
<p>
3130
If not set, filename is created when requested, ex. in iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or getConfig(&quot;filename&quot;).
3131
</p>
3132
<p>
3133
Local filename <b>must</b> be set AFTER setting directory (and opt. delimiter)!
3134
Filename (and opt. directory) <b>must</b> be readable/writeable otherwise FALSE is returned.
3135
</p>
3136
<br>
3137
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3138

    
3139
<a name="Filesize"></a><h4>3.1.5.11 Filesize</h4>
3140
<p>
3141
Only when getting configuration (using iCalcreator object method getConfig).<br>
3142
Returns the size of the file in bytes, to be called<br>
3143
- after &quot;saveCalendar()&quot;<br>
3144
or<br>
3145
- after a &quot;setConfig( &quot;directory&quot; / &quot;filename&quot; )&quot; and before/after &quot;parse()&quot;.<br>
3146
Getting the filesize for a remote file (URL) will always return zero.
3147
</p>
3148
<br>
3149
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3150

    
3151
<a name="Format"></a><h4>3.1.5.12 Format</h4>
3152
<p>Format for the iCalcreator object instance output, &quot;iCal&quot;/&quot;xCal&quot;, any case.</p>
3153
<p>
3154
&quot;iCal&quot; is default ([RFC5545]), &quot;xCal&quot; force xml formatted output, according to<br>
3155
&quot;draft-ietf-calsch-many-xcal-01.txt&quot; (now obsolete).
3156
</p>
3157
<p>
3158
For converting to and from XML, according to rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;,use functions<br>
3159
- <a href="#iCal2XML">iCal2XML</a> converts an iCalcreator object instance to XML<br>
3160
- <a href="#XML2iCal">XML2iCal</a> converts XML (string/file) to an iCalcreator object instance.
3161
</p>
3162
<br>
3163
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3164

    
3165
<a name="Language"></a><h4>3.1.5.13 Language</h4>
3166
<p>
3167
Language for the iCalcreator object instance and component TEXT value properties as defined in [RFC5646].
3168
</p>
3169
<p>
3170
Default empty.
3171
</p>
3172
<p>
3173
If NOT set in TEXT property parameters, language from component instance &quot;setConfig( &quot;language&quot;, ..)&quot; method will be used, if set,
3174
otherwise language from <strong>calendar</strong> method &quot;setConfig( &quot;language&quot;, ..)&quot; will be used, if set.
3175
</p>
3176
<p>
3177
The <strong>calendar</strong> property PRODID is always recreated when setting (<strong>calendar</strong>) language
3178
 (, note <a href="#Unique_id">Unique_id</a>, below).
3179
</p>
3180
<br>
3181
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3182

    
3183
<a name="NewlineChar"></a><h4>3.1.5.14 NewlineChar</h4>
3184
<p>
3185
Character(s) used for carriage return + line feed (CR+LF).
3186
</p>
3187
<p>
3188
Default &quot;\r\n&quot; as defined in [RFC5545].
3189
</p>
3190
<br>
3191
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3192

    
3193
<a name="setPropertyNames"></a><h4>3.1.5.15 setPropertyNames</h4>
3194
<p>
3195
Returns array of property names for all set properties in component. &quot;X-PROP&quot; will be used when <a href="#X-PROPERTY_PROP">X-properties</a> are set.
3196
</p>
3197
<br>
3198
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3199

    
3200
<a name="dTZID"></a><h4>3.1.5.16 TZID</h4>
3201
<p>
3202
General timezone, will be used if no TZID parameter is supplied when setting <a href="#DTSTART">DTSTART</a>,
3203
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>, a TZID <b>auto completion</b>.
3204
</p>
3205
<p>
3206
Default empty.
3207
</p>
3208
<p>
3209
Note, some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
3210
and vtimezone component property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>
3211
(to be set manually, examine also the <a href="#createTimezone">createTimezone</a> function).
3212
</p>
3213
<br>
3214
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3215

    
3216
<a name="Unique_id"></a><h4>3.1.5.17 Unique_id</h4>
3217
<p>
3218
&quot;Unique_id&quot; is used in <strong>calendar</strong> property PRODID and component property <a href="#UID">UID</a>,
3219
both created automatically (, if not setting <a href="#UID">UID</a> manually.
3220
</p>
3221
<p class="quotes">PRODID
3222
The identifier is RECOMMENDED to be the identical syntax to the [RFC 822] addr-spec.
3223
A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which.. .
3224
</p>
3225
<p>
3226
Default <b>AUTOMATICALLY</b> generated by using <em>PHP</em> function gethostbyname( $_SERVER[&quot;SERVER_NAME&quot;] )
3227
when running in a web server environment or &quot;localhost&quot; when using command line interface.
3228
Used when setting other (domain) name than server name.
3229
</p>
3230
<p>
3231
The <strong>calendar</strong> property PRODID is always recreated when setting unique_id.
3232
</p>
3233
<p>
3234
If missing, the component property <a href="#UID">UID</a> is created at first use of iCalcreator object methods <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a> or <a href="#saveCalendar">saveCalendar</a>
3235
</p>
3236
<p>
3237
A strong recommendation is <b>always</b> to set unique_id, creating a new iCalcreator object or component instance,
3238
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>.
3239
</p>
3240
<br>
3241

    
3242
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3243

    
3244
<a name="configURL"></a><h4>3.1.5.18 URL</h4>
3245
<p>
3246
When reading remote files with URL (using the <a href="#parse">parse()</a> method),
3247
only protocol &quot;http&quot; (&quot;webcal&quot;) is supported,
3248
i.e. URL <b>must</b> be prefixed by &quot;http://&quot; (&quot;webcal://&quot;) and suffixed by a valid filename.
3249
</p>
3250
<p>
3251
When setting URL, any previously set Directory is removed.<br>
3252
The URL filename part can be retrieved by - getConfig( &quot;filename&quot; ).
3253
</p>
3254
<p>
3255
When storing a remote iCal file locally, only directory need to be set,
3256
filename remains unchanged (i.e. 1. set URL, 2. parse, 3. set directory, 4. saveCalendar).
3257
</p>
3258
<p class="label">Example</p>
3259
<p>Parse of remote file, then local save in &quot;depot&quot; folder, using original filename</p>
3260
<p class="example">&lt;?php
3261
.. .
3262
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3263
                    &quot;url&quot;       =&gt; &quot;http://www.iCal.net/depot/calendar.ics&quot; );
3264
$vcalendar = new vcalendar( $config );
3265
$vcalendar-&gt;parse();
3266
$vcalendar-&gt;sort();
3267
.. .
3268
.. .
3269
$vcalendar-&gt;setConfig( &quot;directory&quot;, &quot;depot&quot; );
3270
$vcalendar-&gt;saveCalendar();
3271
.. .
3272
</p>
3273
<br>
3274
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
3275

    
3276
<a name="Calendar_component_object_property_function_list"></a><h2>3.2 Calendar component property method list</h2>
3277
<p>
3278
All iCalcreator component object property methods for get/set data.<br>
3279
For property format in detail, see
3280
<a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
3281
</p>
3282
<a name="DATE_WITH_UTC_TIME"></a>
3283
<span class="label">Notice:</span> for properties and DATE-TIME with <b>UTC</b> time.
3284
<p class="quotes">RFC2445:
3285
The date with UTC time, or absolute time,
3286
is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90),
3287
the UTC designator, appended to the time value.
3288
For example, the following represents January 19, 1998, at 0700 UTC:
3289
</p>
3290
<p class="quotes">DTSTART:19980119T070000Z</p>
3291
<p class="quotes">The <a href="#TZID">TZID</a> property parameter MUST <b>NOT</b> be applied to DATE-TIME properties
3292
whose time values are specified in UTC.
3293
</p>
3294
<p>
3295
<a name="date_restriction"></a>
3296
<span class="label">Notice:</span> date limitation.<br>
3297
Due to a limitation in <em>PHP</em> date functions, e.g. <span class="format">mktime</span>,
3298
<span class="format">strtotime</span>, a date (e.g. while setting <a href="#DTSTART">DTSTART</a> property)
3299
before &quot;January 1 1970 00:00:00 GMT&quot; may force a <em>PHP</em> date function to generate an error or set date to &quot;January 1 1970&quot;.
3300
</p>
3301
<a name="deleteProperty_PROP"></a><h3>3.2.1 deleteProperty</h3>
3302
Generic iCalcreator object instance delete property method,simplifying removal of <strong>calendar</strong> properties.<br>
3303
FALSE is returned if no property exists or when end-of-properties at consecutive function calls.
3304
<p class="label">Format</p>
3305
<p class="format">calendarComponent::deleteProperty( [ PropName [, order ] )</p>
3306
<p class="comment">propName = (string) case independent, [RFC5545] component property names,
3307
                    unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
3308
order    = (int)    if missing 1st/next occurrence,
3309
                    used with multiply (property) occurrences</p>
3310
<p class="label">Example</p>
3311
<p>Remove all COMMENT properties in first event component.</p>
3312
<p class="example">&lt;?php
3313
.. .
3314
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3315
                    &quot;directory&quot; =&gt; &quot;import&quot;,
3316
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
3317
$vcalendar = new vcalendar( $config );
3318
$vcalendar-&gt;parse();
3319
$event     = $vcalendar-&gt;getComponent( &quot;vevent&quot; );
3320
while( $event-&gt;deleteProperty( &quot;comment&quot; ))
3321
&nbsp;&nbsp;continue;
3322
.. .
3323
</p>
3324
<br>
3325
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3326

    
3327
<a name="getProperty_PROP"></a><h3>3.2.2 getProperty</h3>
3328
<a name="geoLocation_PROP"></a>
3329
<p>Generic iCalcreator component get property method, simplifying fetch of properties.</p>
3330
<p>FALSE is returned if no property exists or when end-of-properties at consecutive function calls.</p>
3331
<p>Using the non-standard directive &quot;GEOLOCATION&quot;, iCalcreator returns output supporting<br>
3332
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
3333
 by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
3334
 (only if <a href="#GEO">GEO</a> is set).
3335
</p>
3336
<p class="label">Format</p>
3337
<p class="format">calendarComponent::getProperty( PropName [, order [, complete ]] )</p>
3338
<p class="comment">propName = (string) case independent, [RFc5545] component property names,
3339
                    unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
3340
order    = (int)    if missing/FALSE 1st/next occurrence,
3341
                    otherwise with multiply occurrences (1st=1, 2nd=2.. .)
3342
complete - (bool)   FALSE (default): output only property value
3343
                    TRUE           : output =
3344
                             array(&quot;value&quot; =&gt; &lt;value&gt;
3345
                                  ,&quot;params&quot;=&gt; &lt;parameter array&gt;)</p>
3346
<p class="label">Example</p>
3347
<p class="example">&lt;?php
3348
.. .
3349
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
3350
                    &quot;directory&quot; =&gt; &quot;import&quot;,
3351
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
3352
$vcalendar = new vcalendar( $config );
3353
$vcalendar-&gt;parse();
3354
while( $vevent = $vcalendar-&gt;getComponent( &quot;vevent&quot; )) {
3355
  $dtstart     = $vevent-&gt;getProperty( &quot;dtstart&quot; );      // <span class="comment">one occurrence</span>
3356
  $description = $vevent-&gt;getProperty( &quot;description&quot; );  // <span class="comment">one occurrence</span>
3357
  while( $comment = $vevent-&gt;getProperty( &quot;comment&quot; )) { // <span class="comment">MAY occur more than once</span>
3358
  .. .
3359
  }
3360
}
3361
.. .
3362
</p>
3363
<br>
3364
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3365

    
3366
<a name="parse"></a><h3>3.2.3 parse</h3>
3367
<p>
3368
Parse iCal component property text from a string or an array.
3369
Each string/array row must be strict RFC5545 formatted, i.e. begin with a property name.
3370
</p>
3371
<p>
3372
Complete <a href="#VALARM">ALARM</a>s, all properties included, in array format and
3373
first array row as &quot;BEGIN:VALARM&quot;, last as &quot;END:VALARM&quot;
3374
as well as <a href="#VTIMEZONE">TIMEZONE</a> and standard/daylight subcomponents.
3375
</p>
3376
<p>
3377
If major parse error occurs (like invalid <strong>calendar</strong> structure or no <strong>calendar</strong> components), FALSE is returned.
3378
</p>
3379
<p>
3380
Minor errors like non-standard line-endings, initial and trailing empty lines
3381
 as well as files without proper end line(-s) (i.e. missing component end iCal directives)
3382
 are managed.
3383
</p>
3384
<p>
3385
Except the <a href="#X-PROPERTY_PROP">X-properties</a>, non-standard properties are ignored.
3386
</p>
3387
<p class="label">Format</p>
3388
<p class="format">calendarComponent::parse( propertyText )</p>
3389
<p class="comment">propertyText = (string) [RFC5545] formatted property,
3390
               (array)  [RFC5545] formatted properties,
3391
               property name <b>must</b> start string / rows(-s)</p>
3392
<p class="label">example</p>
3393
<p class="example">&lt;?php
3394
.. .
3395
$e = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
3396
$e-&gt;parse( &quot;DTSTAMP:19970324T1200Z&quot; );
3397
$e-&gt;parse( &quot;SEQUENCE:0&quot; );
3398
$e-&gt;parse( &quot;ORGANIZER:MAILTO:jdoe@host1.com&quot; );
3399
$e-&gt;parse( array(
3400
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com&quot;,
3401
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host2.com&quot;,
3402
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host3.com&quot;,
3403
&quot;ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host4.com&quot; ));
3404
$e-&gt;parse( &quot;DTSTART:19970324T123000Z&quot; );
3405
$e-&gt;parse( &quot;DTEND:19970324T210000Z&quot; );
3406
$e-&gt;parse( &quot;CATEGORIES:MEETING,PROJECT&quot; );
3407
$e-&gt;parse( &quot;CLASS:PUBLIC&quot; );
3408
$e-&gt;parse( &quot;SUMMARY:Calendaring Interoperability Planning Meeting&quot; );
3409
$e-&gt;parse( &quot;STATUS:DRAFT&quot; );
3410
$e-&gt;parse( &quot;DESCRIPTION:Project xyz Review Meeting Minutes\\n &quot;
3411
         . &quot;Agenda\\n &quot;
3412
         . &quot;1. Review of project version 1.0 requirements.\\n &quot;
3413
         . &quot;2. Definition of project processes.\\n &quot;
3414
         . &quot;3. Review of project schedule.\\n &quot;
3415
         . &quot;Participants: John Smith, Jane Doe, Jim Dandy\\n &quot;
3416
         . &quot;- It was decided that the requirements need to be signed off by \\n &quot;
3417
         . &quot;product marketing.\\n &quot;
3418
         . &quot;- Project processes were accepted.\\n &quot;
3419
         . &quot;- Project schedule needs to account for scheduled holidays and employee\\n &quot;
3420
         . &quot; vacation time. Check with HR for specific dates.\\n &quot;
3421
         . &quot;- New schedule will be distributed by Friday.\\n &quot;
3422
         . &quot;- Next weeks meeting is cancelled. No meeting until 3/23.&quot; );
3423
$e-&gt;parse( &quot;LOCATION:LDB Lobby&quot; );
3424
$e-&gt;parse( &quot;ATTACH;FMTTYPE=application/postscript:ftp://xyz.com/pub/conf/bkgrnd.ps&quot; );
3425
$e-&gt;parse( array( &quot;BEGIN:VALARM&quot;
3426
                , &quot;ACTION:AUDIO&quot;
3427
                , &quot;TRIGGER;VALUE=DATE-TIME:19970224T070000Z&quot;
3428
                , &quot;ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud&quot;
3429
                , &quot;REPEAT:4&quot;
3430
                , &quot;DURATION:PT1H&quot;
3431
                , &quot;X-alarm:non-standard ALARM property&quot;
3432
                , &quot;END:VALARM&quot; ));
3433
$e-&gt;parse( &quot;X-xomment:non-standard property will be displayed, comma escaped&quot;);
3434
.. .
3435
</p>
3436
<br>
3437
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3438

    
3439

    
3440
<a name="setProperty_PROP"></a><h3>3.2.4 setProperty</h3>
3441
<p>
3442
Generic iCalcreator component object set property method, simplifying insert of properties. For properties where
3443
multiple occurrences are allowed, last parameter is an index, implementing replaceProperty functionality.
3444
</p>
3445
<p>A successful update returns TRUE.</p>
3446
<p class="label">Format</p>
3447
<p class="format">calendarComponent::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
3448
<p class="comment">propName  = (string) case independent, [RFC5545] component property names,
3449
                    unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY_PROP">X-property</a>.
3450
Proparg_n = (mixed) property content
3451
            Last property argument is a (optional) property dependent parameters
3452
            array( *[(string) key =&gt; (string) value ] ).
3453
            A non-standard (, experimental) parameter key MUST be prefixed by &quot;X-&quot;.
3454
</p>
3455
<p class="label">Example</p>
3456
<p class="example">&lt;?php
3457
.. .
3458
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
3459
$vevent-&gt;setProperty( &quot;dtstart&quot;
3460
                    , array(&quot;year&quot;=&gt;2007,&quot;month&quot;=&gt;4,&quot;day&quot;=&gt;1,&quot;hour&quot;=&gt;19));
3461
$vevent-&gt;setProperty( &quot;duration&quot;, 0, 0, 3 ));
3462
$vevent-&gt;setProperty( &quot;LOCATION&quot;, &quot;Central Plaza&quot; );
3463
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;PHP summit&quot; );
3464
.. .
3465
</p>
3466
<br>
3467
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3468

    
3469

    
3470
<a name="ACTION"></a><h3>3.2.5 ACTION</h3>
3471
<p>
3472
This property defines the action to be invoked when an <a href="#VALARM">VALARM</a> is triggered,
3473
<br> &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;.
3474
This property is REQUIRED and MUST NOT occur more than once. (&quot;PROCEDURE&quot; is deprecated in [RFC5545].)
3475
</p>
3476
<h5>Create ACTION</h5>
3477
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3478
<p class="label">Format</p>
3479
<p class="format">calendarComponent::createAction()</p>
3480
<p class="label">Example</p>
3481
<p class="example">&lt;?php
3482
.. .
3483
$str = $component-&gt;createAction();
3484
.. .
3485
</p>
3486
<h5>Delete ACTION</h5>
3487
<p>Remove ACTION from component.</p>
3488
<p class="label">Format</p>
3489
<p class="format">calendarComponent::deleteProperty( &quot;Action&quot; )</p>
3490
<p class="label">Example</p>
3491
<p class="example">&lt;?php
3492
.. .
3493
$valarm-&gt;deleteProperty( &quot;Action&quot; );
3494
.. .
3495
</p>
3496
<h5>Get ACTION</h5>
3497
<p>If set, returns property value, otherwise FALSE.</p>
3498
<p class="label">Format 1</p>
3499
<p class="format">calendarComponent::getProperty( &quot;Action&quot; )</p>
3500
<p class="comment">output = actionValue<sup>1</sup>
3501
<p class="label">Format 2</p>
3502
<p class="format">calendarComponent::getProperty( &quot;Action&quot;, FALSE , TRUE )</p>
3503
<p class="comment">output = array( &quot;value&quot;  =&gt; actionValue<sup>1</sup>
3504
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
3505
<p class="label">Example</p>
3506
<p class="example">&lt;?php
3507
.. .
3508
$action = $valarm-&gt;getProperty( &quot;action&quot; );
3509
.. .
3510
</p>
3511
<h5>Set ACTION</h5>
3512
<p>Insert property value.</p>
3513
<p class="label">Format</p>
3514
<p class="format">calendarComponent::setProperty( &quot;Action&quot;, actionValue [, xparams ] )</p>
3515
<p class="comment">actionValue<sup>1</sup> = (string) one of &quot;AUDIO&quot; / &quot;DISPLAY&quot; / &quot;EMAIL&quot; / &quot;PROCEDURE&quot;
3516
xparams<sup>2</sup>     = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
3517
</p>
3518
<p class="label">Example</p>
3519
<p class="example">&lt;?php
3520
.. .
3521
$valarm-&gt;setProperty( &quot;action&quot;, &quot;DISPLAY&quot; );
3522
.. .
3523
</p>
3524
<br>
3525
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3526

    
3527

    
3528
<a name="ATTACH"></a><h3>3.2.6 ATTACH</h3>
3529
<p>
3530
The property provides the capability to associate a document object with a <strong>calendar</strong> component. The property is
3531
is REQUIRED and MUST NOT occur more than once in an &quot;ALARM&quot; (&quot;ACTION&quot; &quot;procedure&quot;),
3532
OPTIONAL and MUST NOT occur more than once in an &quot;ALARM&quot; (&quot;ACTION&quot; &quot;audio&quot;) and
3533
OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VALARM">VALARM</a> (&quot;ACTION&quot; &quot;email&quot;) components.
3534
</p>
3535
<p>
3536
The default value type for ATTACH is URI. The value type can also be set to BINARY to indicate inline binary encoded content (params<sup>2</sup>).
3537
</p>
3538
<p>
3539
If using other parameters than the recommended &quot;FMTTYPE&quot; and the mandatory &quot;ENCODING&quot; (=&quot;BASE64&quot;)and &quot;VALUE&quot; (=&quot;BINARY&quot;)
3540
for an inline binary encoded attachment,
3541
please use only characters within the ASCII character set in parameter name and content,
3542
to ensure proper line folding when using <a href="#createCalendar">createCalendar</a> and/or <a href="#returnCalendar">returnCalendar</a>.
3543
</p>
3544
<h5>Create ATTACH</h5>
3545
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3546
<p class="label">Format</p>
3547
<p class="format">calendarComponent::createAttach()</p>
3548
<p class="label">Example</p>
3549
<p class="example">&lt;?php
3550
.. .
3551
$str = $component-&gt;createAttach();
3552
.. .
3553
</p>
3554
<h5>Delete ATTACH</h5>
3555
<p>Remove ATTACH from component.</p>
3556
<p class="label">Format</p>
3557
<p class="format">calendarComponent::deleteProperty( &quot;ATTACH&quot; )</p>
3558
<p class="label">Example 1</p>
3559
<p class="example">&lt;?php
3560
.. .
3561
$valarm-&gt;deleteProperty( &quot;ATTACH&quot; );
3562
.. .
3563
</p>
3564
<p class="label">Example 2</p>
3565
Delete ATTACH property no 2.
3566
<p class="example">&lt;?php
3567
.. .
3568
$valarm-&gt;deleteProperty( &quot;ATTACH&quot;, 2 );
3569
.. .
3570
</p>
3571
<p class="label">Example 3</p>
3572
Deleting all ATTACH properties.
3573
<p class="example">&lt;?php
3574
.. .
3575
while( $valarm-&gt;deleteProperty( &quot;ATTACH&quot; ))
3576
  continue;
3577
.. .
3578
</p>
3579
<h5>Get ATTACH</h5>
3580
<p>If set, returns property value(-s), otherwise FALSE.</p>
3581
<p class="label">Format 1</p>
3582
<p class="format">calendarComponent::getProperty( &quot;Attach&quot; )</p>
3583
<p class="comment">output = attachValue<sup>1</sup></p>
3584
<p class="label">Format 2</p>
3585
<p class="format">calendarComponent::getProperty( &quot;ATTACH&quot;, propOrderNo/FALSE , TRUE )</p>
3586
<p class="comment">propOrderNo = (int) specific property value,
3587
<p class="comment">output = array( &quot;value&quot;  =&gt; attachValue<sup>1</sup>
3588
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
3589
<p class="label">Format 3</p>
3590
<p class="format">calendarComponent::getProperty( &quot;Attach&quot;, propOrderNo )</p>
3591
<p class="comment">propOrderNo = (int) specific property value</p>
3592
<p class="comment">Get propOrderNo ATTACH</p>
3593
<p class="label">Example</p>
3594
<p class="example">&lt;?php
3595
.. .
3596
$attach = $valarm-&gt;getProperty( &quot;attach&quot; );
3597
.. .
3598
</p>
3599
<h5>Set ATTACH</h5>
3600
<p>Insert property value. Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
3601
<p class="label">Format</p>
3602
<p class="format">calendarComponent::setProperty( &quot;attach&quot;, attachValue<sup>1</sup> [, params [, propOrderNo ]] )</p>
3603
<p class="comment">attachValue<sup>1</sup> = (string) URI / inline binary encoded content
3604
params<sup>2</sup>      = (array ) ( [ &quot;ENCODING&quot; =&gt; &quot;BASE64&quot;, &quot;VALUE&quot; =&gt; &quot;BINARY&quot; ]
3605
                          [, &quot;FMTTYPE&quot;  =&gt; contentType ]
3606
                         *[,&nbsp;xparams ] )
3607
contentType  = (string) The parameter value MUST be the TEXT for either an IANA
3608
                        registered content type or a non-standard content type.
3609
xparams      = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
3610
propOrderNo  = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
3611
</p>
3612
<p class="label">Example</p>
3613
<p class="example">&lt;?php
3614
.. .
3615
$vevent-&gt;setProperty( &quot;attach&quot;
3616
                    , &quot;ftp://domain.com/pub/docs/agenda.doc&quot;
3617
                    , array( &quot;FMTTYPE&quot; =&gt; &quot;application/binary&quot; ));
3618
.. .
3619
</p>
3620
<br>
3621
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3622

    
3623

    
3624
<a name="ATTENDEE"></a><h3>3.2.7 ATTENDEE</h3>
3625
<p>
3626
The property defines an "Attendee" within a <strong>calendar</strong> component and is OPTIONAL and MUST NOT occur more than once
3627
in a VALARM (&quot;ACTION&quot; &quot;email&quot;), OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
3628
</p>
3629
<p>This value type for ATTENDEE is URI, a <strong>calendar</strong> user address.</p>
3630
<h5>Create ATTENDEE</h5>
3631
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3632
<p class="label">Format</p>
3633
<p class="format">calendarComponent::createAttendee()</p>
3634
<p class="label">Example</p>
3635
<p class="example">&lt;?php
3636
.. .
3637
$str = $component-&gt;createAttendee();
3638
.. .
3639
</p>
3640
<h5>Delete ATTENDEE</h5>
3641
<p>Remove ATTENDEE from component.</p>
3642
<p class="label">Format</p>
3643
<p class="format">calendarComponent::deleteProperty( &quot;ATTENDEE&quot; )</p>
3644
<p class="label">Example 1</p>
3645
<p>Delete (single/first) ATTENDEE property</p>
3646
<p class="example">&lt;?php
3647
.. .
3648
$valarm-&gt;deleteProperty( &quot;ATTENDEE&quot; );
3649
.. .
3650
</p>
3651
<p class="label">Example 2</p>
3652
<p>Delete ATTENDEE property no 2.</p>
3653
<p class="example">&lt;?php
3654
.. .
3655
$valarm-&gt;deleteProperty( &quot;ATTENDEE&quot;, 2 );
3656
.. .
3657
</p>
3658
<p class="label">Example 3</p>
3659
Deleting all ATTENDEE properties.
3660
<p class="example">&lt;?php
3661
.. .
3662
while( $valarm-&gt;deleteProperty( &quot;ATTENDEE&quot; ))
3663
  continue;
3664
.. .
3665
</p>
3666
<h5>Get ATTENDEE</h5>
3667
<p>If set, returns property value(-s), otherwise FALSE.</p>
3668
<p class="label">Format 1</p>
3669
<p class="format">calendarComponent::getProperty( &quot;Attendee&quot; )</p>
3670
<p class="comment">output = attendeeValue<sup>1</sup></p>
3671
<p class="label">Format 2</p>
3672
<p class="format">calendarComponent::getProperty( &quot;ATTENDEE&quot;, propOrderNo/FALSE , TRUE )</p>
3673
<p class="comment">propOrderNo = (int) specific property value</p>
3674
<p class="comment">output = array( &quot;value&quot;  =&gt; attendeeValue<sup>1</sup>
3675
              , &quot;params&quot; =&gt; array( params<sup>2</sup> ))</p>
3676
<p class="label">Format 3</p>
3677
<p class="format">calendarComponent::getProperty( &quot;ATTENDEE&quot;, propOrderNo )</p>
3678
<p class="comment">propOrderNo = (int) specific property value</p>
3679
<p class="comment">output = attendeeValue<sup>1</sup></p>
3680
<p class="label">Example</p>
3681
<p class="example">&lt;?php
3682
.. .
3683
$attendee = $valarm-&gt;getProperty( &quot;attendee&quot; );
3684
.. .
3685
</p>
3686
<h5>Set ATTENDEE</h5>
3687
<p>
3688
Insert property value. If exist, default parameter values are removed after input (params<sup>2</sup>).
3689
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738 ),
3690
if missing, &quot;mailto:&quot; is set (indicating an internet mail address).
3691
Also MEMBER and DIR parameters must be prefixed by protocol. DELEGATED-TO, DELEGATED-FROM, SENT-BY parameters
3692
must use protocol &quot;mailto:&quot;, prefixed if missing (indicating an internet mail address).
3693
</p>
3694
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
3695
<p class="label">Format</p>
3696
<p class="format">calendarComponent::setProperty( &quot;attendee&quot;, attendeeValue [, params [, propOrderNo ]] )</p>
3697
<p class="comment">attendeeValue<sup>1</sup> = (string) a <strong>calendar</strong> user address, a URI as defined by
3698
                         [RFC 1738] or any other IANA registered form
3699
                         for a URI.
3700
params<sup>2</sup>        = (array) ( [CUTYPE] [,MEMBER] [,ROLE] [,PARTSTAT]
3701
                           [,RVSP] [,DELEGATED-TO] [,DELEGATED-FROM]
3702
                           [,SENT-BY] [,CN] [,DIR] [,LANGUAGE]
3703
                          *[,xparams] )
3704
CUTYPE        = "CUTYPE" =&gt; &quot;INDIVIDUAL&quot;
3705
                            (An individual, <b>Default</b>)
3706
                          / &quot;GROUP&quot;
3707
                            (A group of individuals)
3708
                          / &quot;RESOURCE&quot;
3709
                            (A physical resource)
3710
                          / &quot;ROOM&quot;
3711
                            (A room resource)
3712
                          / &quot;UNKNOWN&quot;
3713
                            (Otherwise not known)
3714
                          / (string) x-name
3715
                            (Experimental type)
3716
                          / iana-token
3717
                            (string) (Other IANA registered type)
3718
MEMBER        = "MEMBER" =&gt; array( *[ (string) &quot;single member
3719
                            of the group or list membership&quot;])
3720
ROLE          = "ROLE"   =&gt; &quot;CHAIR&quot;
3721
                            (Indicates chair of the <strong>calendar</strong>
3722
                             entity)
3723
                          / &quot;REQ-PARTICIPANT&quot;
3724
                            (required participation, <b>Default</b>)
3725
                          / &quot;OPT-PARTICIPANT&quot;
3726
                            (optional participation)
3727
                          / &quot;NON-PARTICIPANT&quot;
3728
                            (information purposes only)
3729
                          / (string) x-name
3730
                            (Experimental role)
3731
                          / (string) iana-token
3732
                            (Other IANA role)
3733
PARTSTAT       = &quot;PARTSTAT&quot; =&gt; &quot;NEEDS-ACTION&quot;
3734
                            (Event needs action, <b>Default</b>)
3735
                          / &quot;ACCEPTED&quot;
3736
                            (Event accepted)
3737
                          / &quot;DECLINED&quot;
3738
                            (Event declined)
3739
                          / &quot;TENTATIVE&quot;
3740
                            (Event tentatively accepted)
3741
                          / &quot;DELEGATED&quot;
3742
                            (Event delegated)
3743
                          / &quot;NEEDS-ACTION&quot;
3744
                            (To-do needs action, <b>Default</b>)
3745
                          / &quot;ACCEPTED&quot;
3746
                            (To-do accepted)
3747
                          / &quot;DECLINED&quot;
3748
                            (To-do declined)
3749
                          / &quot;TENTATIVE&quot;
3750
                            (To-do tentatively accepted)
3751
                          / &quot;DELEGATED&quot;
3752
                            (To-do delegated)
3753
                          / &quot;COMPLETED&quot;
3754
                            (To-do completed.
3755
                              <a href="#COMPLETED">COMPLETED</a> property
3756
                                 has date/time completed)
3757
                          / &quot;IN-PROCESS&quot;
3758
                            (To-do in process of being completed)
3759
                          / &quot;NEEDS-ACTION&quot;
3760
                            (Journal needs action, <b>Default</b>)
3761
                          / &quot;ACCEPTED&quot;
3762
                            (Journal accepted)
3763
                          / &quot;DECLINED&quot;
3764
                            (Journal declined)
3765
                          / (string) x-name
3766
                            (Experimental status)
3767
                          / (string) iana-token
3768
                            (Other IANA registered status)
3769
RSVP           = &quot;RSVP&quot; =&gt; (string) &quot;TRUE&quot;
3770
                                  / &quot;FALSE&quot;, <b>Default</b> (reply expectation)
3771
DELEGATED-TO   = &quot;DELEGATED-TO&quot; =&gt; array(*[(string) &quot;single <strong>calendar</strong> user
3772
                                            to specified by the property
3773
                                            has delegated participation&quot;])
3774
DELEGATED-FROM = &quot;DELEGATED-FROM&quot; =&gt; array( *[ (string) &quot;single <strong>calendar</strong> user that
3775
                                                have delegated their
3776
                                                participation to the
3777
                                                <strong>calendar</strong> user specified
3778
                                                by the property&quot; ] )
3779
SENT-BY        = &quot;SENT-BY&quot; =&gt; (string) single <strong>calendar</strong> user that is
3780
                              acting on behalf
3781
                              of the <strong>calendar</strong> user
3782
                              specified by the property&quot;
3783
LANGUAGE       = &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; (applies to the CN parameter value)
3784
CN             = &quot;CN&quot; =&gt; (string) &quot;common name to be associated with the <strong>calendar</strong>
3785
                          user specified by the property&quot;
3786
DIR            = &quot;DIR&quot; =&gt; (string) &quot;reference to a directory entry associated with
3787
                           the <strong>calendar</strong> user specified by the property&quot;
3788
xparams        = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
3789
propOrderNo    = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
3790
lang<sup>*</sup>          = as defined in [RFC5646]</p>
3791
<p>
3792
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).
3793
</p>
3794
<p class="label">Example</p>
3795
<p class="example">&lt;?php
3796
.. .
3797
$vevent-&gt;setProperty( &quot;attendee&quot;
3798
                    , &quot;attendee1@ical.net&quot;
3799
$vevent-&gt;setProperty( &quot;attendee&quot;
3800
                    , &quot;attendee2@ical.net&quot;
3801
                    , array( &quot;cutype&quot;   =&gt; &quot;INDIVIDUAL&quot;
3802
                           , &quot;member&quot;   =&gt; array( &quot;member1@ical.net&quot;
3803
                                                , &quot;member2@ical.net&quot;
3804
                                                , &quot;member3@ical.net&quot; )
3805
                           , &quot;role&quot;     =&gt; &quot;CHAIR&quot;
3806
                           , &quot;PARTSTAT&quot; =&gt; &quot;ACCEPTED&quot;
3807
                           , &quot;RSVP&quot;     =&gt; &quot;TRUE&quot;
3808
                           , &quot;DELEgated-to&quot; =&gt; array( &quot;part1@ical.net&quot;
3809
                                                    , &quot;part2@ical.net&quot;
3810
                                                    , &quot;part3@ical.net&quot; )
3811
                           , &quot;delegateD-FROM&quot; =&gt;array( &quot;cio@ical.net&quot;
3812
                                                     , &quot;vice.cio@ical.net&quot;)
3813
                           , &quot;SENT-BY&quot;  =&gt; &quot;secretary@ical.net&quot;
3814
                           , &quot;LANGUAGE&quot; =&gt; &quot;us-EN&quot;
3815
                           , &quot;CN&quot;       =&gt; &quot;John Doe&quot;
3816
                           , &quot;DIR&quot;      =&gt; &quot;http://www.ical.net/info.doc&quot;
3817
                           , &quot;x-agenda&quot; =&gt; &quot;status reports&quot; <span class="comment">// xparam</span>
3818
                           , &quot;x-length&quot; =&gt; &quot;15 min&quot;  ));    <span class="comment">// xparam</span>
3819
.. .
3820
</p>
3821
<br>
3822
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3823

    
3824
<a name="CATEGORIES"></a><h3>3.2.8 CATEGORIES</h3>
3825
<p>
3826
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>
3827
The value type for CATEGORIES is TEXT.
3828
</p>
3829
<h5>Create CATEGORIES</h5>
3830
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3831
<p class="label">Format</p>
3832
<p class="format">calendarComponent::createCategories()</p>
3833
<p class="label">Example</p>
3834
<p class="example">&lt;?php
3835
.. .
3836
$str = $component-&gt;createCategories();
3837
.. .
3838
</p>
3839
<h5>Delete CATEGORIES</h5>
3840
<p>Remove CATEGORIES from component.</p>
3841
<p class="label">Format</p>
3842
<p class="format">calendarComponent::deleteProperty( &quot;CATEGORIES&quot; )</p>
3843
<p class="label">Example 1</p>
3844
<p>Delete (single/first) CATEGORIES property</p>
3845
<p class="example">&lt;?php
3846
.. .
3847
$vevent-&gt;deleteProperty( &quot;CATEGORIES&quot; );
3848
.. .
3849
</p>
3850
<p class="label">Example 2</p>
3851
<p>Delete CATEGORIES property no 2.</p>
3852
<p class="example">&lt;?php
3853
.. .
3854
$vevent-&gt;deleteProperty( &quot;CATEGORIES&quot;, 2 );
3855
.. .
3856
</p>
3857
<p class="label">Example 3</p>
3858
<p>Deleting all CATEGORIES properties.</p>
3859
<p class="example">&lt;?php
3860
.. .
3861
while( $vevent-&gt;deleteProperty( &quot;CATEGORIES&quot; ))
3862
  continue;
3863
.. .
3864
</p>
3865
<h5>Get CATEGORIES</h5>
3866
<p>If set, returns property value(-s), otherwise FALSE.</p>
3867
<p class="label">Format 1</p>
3868
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot; )</p>
3869
<p class="comment">output = categoryValue<sup>1</sup></p>
3870
<p class="label">Format 2</p>
3871
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot;, propOrderNo/FALSE , TRUE )</p>
3872
<p class="comment">propOrderNo = (int) specific property value</p>
3873
<p class="comment">output = array( &quot;value&quot;  =&gt; categories<sup>1</sup>
3874
              , &quot;params&quot; =&gt; params<sup>3</sup> )</p>
3875
<p class="label">Format 3</p>
3876
<p class="format">calendarComponent::getProperty( &quot;CATEGORIES&quot;, propOrderNo )</p>
3877
<p class="comment">propOrderNo = (int) specific property value</p>
3878
<p class="comment">Get propOrderNo CATEGORIES</p>
3879
<p class="label">Example</p>
3880
<p class="example">&lt;?php
3881
.. .
3882
$categories = $valarm-&gt;getProperty( &quot;categories&quot; );
3883
.. .
3884
</p>
3885
<h5>Set CATEGORIES</h5>
3886
<p>Insert property value.</p>
3887
<p>
3888
In spite of the fact that CATEGORIES may contain a (comma separated) list of values,
3889
a strong recommendation is to split a CATEGORIES &quot;list&quot; into multiple single CATEGORIES entrys.
3890
</p>
3891
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
3892
<p class="label">Format</p>
3893
<p class="format">calendarComponent::setProperty( &quot;categories&quot;, categories [, params [, propOrderNo ]] )</p>
3894
<p class="comment">categories<sup>1</sup>    = (string) categoryValue / (array) ( *categoryValue )
3895
categoryValue<sup>2</sup> = (string) textual categories or subtypes of the <strong>calendar</strong> component,
3896
                can be specified as a list of categories
3897
                separated by the COMMA character
3898
params<sup>3</sup>        = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;&lt;lang<sup>*</sup>&gt;&quot;] *[, xparams] )
3899
xparams        = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
3900
propOrderNo    = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
3901
lang<sup>*</sup>         = as defined in [RFC5646]</p>
3902
<p class="label">Example</p>
3903
<p class="example">&lt;?php
3904
.. .
3905
$vevent-&gt;setProperty( &quot;categories&quot;, &quot;project_x&quot; );
3906
.. .
3907
</p>
3908
<br>
3909
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3910

    
3911

    
3912
<a name="CLASS"></a><h3>3.2.9 CLASS</h3>
3913
<p>
3914
This property defines the access classification for a <strong>calendar</strong> component and is OPTIONAL
3915
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.
3916
</p>
3917
<h5>Create CLASS</h5>
3918
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3919
<p class="label">Format</p>
3920
<p class="format">calendarComponent::createClass()</p>
3921
<p class="label">Example</p>
3922
<p class="example">&lt;?php
3923
.. .
3924
$str = $component-&gt;createClass();
3925
.. .
3926
</p>
3927
<h5>Delete CLASS</h5>
3928
<p>Remove CLASS from component.</p>
3929
<p class="label">Format</p>
3930
<p class="format">calendarComponent::deleteProperty( &quot;CLASS&quot; )</p>
3931
<p class="label">Example</p>
3932
<p class="example">&lt;?php
3933
.. .
3934
$vjournal-&gt;deleteProperty( &quot;CLASS&quot; );
3935
.. .
3936
</p>
3937
<h5>Get CLASS</h5>
3938
<p>If set, returns property value, otherwise FALSE.</p>
3939
<p class="label">Format 1</p>
3940
<p class="format">calendarComponent::getProperty( &quot;CLASS&quot; )</p>
3941
<p class="comment">output = classValue<sup>1</sup></p>
3942
<p class="label">Format 2</p>
3943
<p class="format">calendarComponent::getProperty( &quot;CLASS&quot;, FALSE , TRUE )</p>
3944
<p class="comment">output = array &quot;value&quot;   =&gt; classValue<sup>1</sup>
3945
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
3946
<p class="label">Example</p>
3947
<p class="example">&lt;?php
3948
.. .
3949
$class = $valarm-&gt;getProperty( &quot;class&quot; );
3950
.. .
3951
</p>
3952
<h5>Set CLASS</h5>
3953
<p>Insert property value.</p>
3954
<p class="label">Format</p>
3955
<p class="format">calendarComponent::setProperty( &quot;class&quot;, classvalue [, xparams ] )</p>
3956
<p class="comment">classvalue<sup>1</sup> = &quot;PUBLIC&quot;
3957
            / &quot;PRIVATE&quot;
3958
            / &quot;CONFIDENTIAL&quot;
3959
            / (string) iana-token
3960
            / (string) x-name
3961
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
3962
</p>
3963
<p class="label">Example</p>
3964
<p class="example">&lt;?php
3965
.. .
3966
$vevent-&gt;setProperty( &quot;class&quot;, &quot;CONFIDENTIAL&quot; );
3967
.. .
3968
</p>
3969
<br>
3970
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
3971

    
3972
<a name="COMMENT"></a><h3>3.2.10 COMMENT</h3>
3973
<p>
3974
This property specifies non-processing information intended to provide a comment to the <strong>calendar</strong> user
3975
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.
3976
</p>
3977
<p>The value type for COMMENT is TEXT.</p>
3978
<h5>Create COMMENT</h5>
3979
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
3980
<p class="label">Format</p>
3981
<p class="format">calendarComponent::createComment()</p>
3982
<p class="label">Example</p>
3983
<p class="example">&lt;?php
3984
.. .
3985
$str = $component-&gt;createComment();
3986
.. .
3987
</p>
3988
<h5>Delete COMMENT</h5>
3989
<p>Remove COMMENT from component.</p>
3990
<p class="label">Format</p>
3991
<p class="format">calendarComponent::deleteProperty( &quot;COMMENT&quot; )</p>
3992
<p class="label">Example 1</p>
3993
<p>Delete (single/first) COMMENT property</p>
3994
<p class="example">&lt;?php
3995
.. .
3996
$vevent-&gt;deleteProperty( &quot;COMMENT&quot; );
3997
.. .
3998
</p>
3999
<p class="label">Example 2</p>
4000
<p>Delete COMMENT property no 2.</p>
4001
<p class="example">&lt;?php
4002
.. .
4003
$vevent-&gt;deleteProperty( &quot;COMMENT&quot;, 2 );
4004
.. .
4005
</p>
4006
<p class="label">Example 3</p>
4007
<p>Deleting all COMMENT properties.</p>
4008
<p class="example">&lt;?php
4009
.. .
4010
while( $vevent-&gt;deleteProperty( &quot;COMMENT&quot; ))
4011
  continue;
4012
.. .
4013
</p>
4014
<h5>Get COMMENT</h5>
4015
<p>If set, returns property value, otherwise FALSE.</p>
4016
<p class="label">Format 1</p>
4017
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot; )</p>
4018
<p class="comment">output = commentValue<sup>1</sup></p>
4019
<p class="label">Format 2</p>
4020
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot;, propOrderNo/FALSE , TRUE )</p>
4021
<p class="comment">propOrderNo = (int) specific property value</p>
4022
<p class="comment">output = array( &quot;value&quot;  =&gt; commentValue<sup>1</sup>
4023
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4024
<p class="label">Format 3</p>
4025
<p class="format">calendarComponent::getProperty( &quot;COMMENT&quot;, propOrderNo )</p>
4026
<p class="comment">propOrderNo = (int) specific property value</p>
4027
<p class="comment">Get propOrderNo COMMENT</p>
4028
<p class="label">Example</p>
4029
<p class="example">&lt;?php
4030
.. .
4031
$comment = $vevent-&gt;getProperty( &quot;comment&quot; );
4032
.. .
4033
</p>
4034
<h5>Set COMMENT</h5>
4035
<p>Insert property value. Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
4036
<p class="label">Format</p>
4037
<p class="format">calendarComponent::setProperty( &quot;comment&quot;, commentValue [, params [, propOrderNo ]] )</p>
4038
<p class="comment">commentValue<sup>1</sup> = (string) Value type Text
4039
params<sup>2</sup>       = (array) (
4040
                   [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
4041
                   [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
4042
                  *[, xparams ] )
4043
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4044
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4045
lang<sup>*</sup>         = as defined in [RFC5646]</p>
4046
<p class="label">Example</p>
4047
<p class="example">&lt;?php
4048
.. .
4049
$vevent-&gt;setProperty( &quot;comment&quot;, &quot;this is a comment&quot; );
4050
.. .
4051
</p>
4052
<br>
4053
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4054

    
4055

    
4056
<a name="COMPLETED"></a><h3>3.2.11 COMPLETED</h3>
4057
<p>
4058
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.
4059
</p>
4060
<p>The value type for COMPLETED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
4061
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
4062
<br>
4063
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4064

    
4065

    
4066
<a name="CONTACT"></a><h3>3.2.12 CONTACT</h3>
4067
<p>
4068
The property is used to represent textual contact information or alternately a reference to textual contact information
4069
 associated with the <strong>calendar</strong> component. The property is OPTIONAL and MUST NOT occur more than once in
4070
 a VFREEBUSY or MAY occur more than once  in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and
4071
 <a href="#VJOURNAL">VJOURNAL</a> components.
4072
</p>
4073
<p>The value type for CONTACT is TEXT.</p>
4074
<h5>Create CONTACT</h5>
4075
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4076
<p class="label">Format</p>
4077
<p class="format">calendarComponent::createContact()</p>
4078
<p class="label">Example</p>
4079
<p class="example">&lt;?php
4080
.. .
4081
$str = $component-&gt;createContact();
4082
.. .
4083
</p>
4084
<h5>Delete CONTACT</h5>
4085
<p>Remove CONTACT from component.</p>
4086
<p class="label">Format</p>
4087
<p class="format">calendarComponent::deleteProperty( &quot;CONTACT&quot; )</p>
4088
<p class="label">Example 1</p>
4089
<p>Delete (single/first) CONTACT property<p>
4090
<p class="example">&lt;?php
4091
.. .
4092
$vevent-&gt;deleteProperty( &quot;CONTACT&quot; );
4093
.. .
4094
</p>
4095
<p class="label">Example 2</p>
4096
<p>Delete CONTACT property no 2.</p>
4097
<p class="example">&lt;?php
4098
.. .
4099
$vevent-&gt;deleteProperty( &quot;CONTACT&quot;, 2 );
4100
.. .
4101
</p>
4102
<p class="label">Example 3</p>
4103
<p>Deleting all CONTACT properties.</p>
4104
<p class="example">&lt;?php
4105
.. .
4106
while( $vevent-&gt;deleteProperty( &quot;CONTACT&quot; ))
4107
  continue;
4108
.. .
4109
</p>
4110
<h5>Get CONTACT</h5>
4111
<p>If set, returns property value, otherwise FALSE.</p>
4112
<p class="label">Format 1</p>
4113
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot; )</p>
4114
<p class="comment">output = contactValue<sup>1</sup></p>
4115
<p class="label">Format 2</p>
4116
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot;, propOrderNo/FALSE , TRUE )</p>
4117
<p class="comment">propOrderNo = (int) specific property value</p>
4118
<p class="comment">output = array( &quot;value&quot;  =&gt; contactValue<sup>1</sup>
4119
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4120
<p class="label">Format 3</p>
4121
<p class="format">calendarComponent::getProperty( &quot;CONTACT&quot;, propOrderNo )</p>
4122
<p class="comment">propOrderNo = (int) specific property value</p>
4123
<p class="comment">Get propOrderNo CONTACT</p>
4124
<p class="label">Example</p>
4125
<p class="example">&lt;?php
4126
.. .
4127
$contact = $vevent-&gt;getProperty( &quot;contact&quot; );
4128
.. .
4129
</p>
4130
<h5>Set CONTACT</h5>
4131
<p>Insert property value. Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
4132
<p class="label">Format</p>
4133
<p class="format">calendarComponent::setProperty( &quot;contact&quot;, contactValue [, params [, propOrderNo ]] )</p>
4134
<p class="comment">contactValue<sup>1</sup> = (string) Value type TEXT
4135
params<sup>2</sup>       = (array) (
4136
                   [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
4137
                   [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
4138
                  *[, xparams] )
4139
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4140
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4141
lang<sup>*</sup>         = as defined in [RFC5646]</p>
4142
<p class="label">Example</p>
4143
<p class="example">&lt;?php
4144
.. .
4145
$c-&gt;setProperty( &quot;contact&quot;, &quot;tel 012-34 56 789&quot; )
4146
.. .
4147
</p>
4148
<br>
4149
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4150

    
4151

    
4152
<a name="CREATED"></a><h3>3.2.13 CREATED</h3>
4153
<p>
4154
This property specifies the date and time that the <strong>calendar</strong> information was created by
4155
the <strong>calendar</strong> user agent in the <strong>calendar</strong> store.
4156
Note: This is analogous to the creation date and time for a file in the file system.
4157
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
4158
<a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
4159
</p>
4160
<p>The value type for CREATED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
4161
<h5>Create CREATED</h5>
4162
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4163
<p class="label">Format</p>
4164
<p class="format">calendarComponent::createCreated()</p>
4165
<p class="label">Example</p>
4166
<p class="example">&lt;?php
4167
.. .
4168
$str = $component-&gt;createCreated();
4169
.. .
4170
</p>
4171
<h5>Delete CREATED</h5>
4172
<p>Remove CREATED from component.</p>
4173
<p class="label">Format</p>
4174
<p class="format">calendarComponent::deleteProperty( &quot;CREATED&quot; )</p>
4175
<p class="label">Example</p>
4176
<p class="example">&lt;?php
4177
.. .
4178
$vevent-&gt;deleteProperty( &quot;CREATED&quot; );
4179
.. .
4180
</p>
4181
<h5>Get CREATED</h5>
4182
<p>If set, returns property value, otherwise FALSE.</p>
4183
<p class="label">Format 1</p>
4184
<p class="format">calendarComponent::getProperty( &quot;CREATED&quot; )</p>
4185
<p class="comment">output = createdDate<sup>1</sup></p>
4186
<p class="label">Format 2</p>
4187
<p class="format">calendarComponent::getProperty( &quot;CREATED&quot;, FALSE , TRUE )</p>
4188
<p class="comment">output = array( &quot;value&quot;  =&gt; createdDate<sup>1</sup>
4189
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4190
<p class="label">Example</p>
4191
<p class="example">&lt;?php
4192
.. .
4193
$created = $vevent-&gt;getProperty( &quot;CREATED&quot; );
4194
.. .
4195
</p>
4196
<h5>Set CREATED</h5>
4197
<p>
4198
Insert property value. Input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or,
4199
if &quot;offset&quot; parameter is used, converted to a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
4200
Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a local datetime to UTC datetime.
4201
</p>
4202
<p>The current UTC date-time is set if called without parameters.</p>
4203
<p class="label">Format</p>
4204
<p class="format">calendarComponent::setProperty( &quot;created&quot;, [ createdDate [, xparams ]] )</p>
4205
<p class="comment">createdDate<sup>1</sup> = (array) ( &quot;year&quot;  =&gt; (int) year
4206
                       , &quot;month&quot; =&gt; (int) month
4207
                       , &quot;day&quot;   =&gt; (int) day
4208
                      [, &quot;hour&quot;  =&gt; (int) hour
4209
                       , &quot;min&quot;   =&gt; (int) min
4210
                       , &quot;sec&quot;   =&gt; (int) sec
4211
                       , &quot;tz&quot;    =&gt; offset ]] )
4212
createdDate  = (int) year
4213
             , (int) month
4214
             , (int) day
4215
            [, (int) hour
4216
             , (int) min
4217
             , (int) sec ]
4218
createdDate  = (array) ( (int) year
4219
                       , (int) month
4220
                       , (int) day
4221
                      [, (int) hour
4222
                       , (int) min
4223
                       , (int) sec
4224
                      [, offset ]] )
4225
createdDate  = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4226
createdDate  = (string) date/datetime string<sup>*</sup>
4227
offset       = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4228
xparams<sup>2</sup>     = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
4229
<br>date/datetime string<sup>*</sup> recommended formats
4230
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
4231
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
4232
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
4233
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
4234
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
4235
    trailing characters (digits), if exists, will be interpreted as offset
4236
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
4237
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
4238
<p class="label">Example 1</p>
4239
<p class="example">&lt;?php
4240
.. .
4241
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
4242
$vcalendar = new vcalendar( $config );
4243
$vtodo     = &amp; $vcalendar-&gt;newComponent( &quot;vtodo&quot; );
4244
.. .
4245
$vtodo-&gt;setProperty( &quot;created&quot;, 2006, 8, 11, 14, 30, 35 ); // <span class="comment">11 august 2006 14.30.35 UTC</span>
4246
.. .
4247
</p>
4248
<p class="label">Example 2</p>
4249
<p class="example">&lt;?php
4250
.. .
4251
$date = array(&quot;year&quot; =&gt; 2006, &quot;month&quot; =&gt; 10, &quot;day&quot; =&gt; 10,
4252
              &quot;hour&quot; =&gt; 10, &quot;min&quot; =&gt; 0, &quot;sec&quot; =&gt; 0, &quot;tz&quot; =&gt; &quot;+0200&quot;);
4253
              // <span class="comment">local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4254
$vtodo-&gt;setProperty( &quot;created&quot;, $date );
4255
.. .
4256
</p>
4257
<p class="label">Example 3</p>
4258
<p class="example">&lt;?php
4259
.. .
4260
$vevent-&gt;setProperty( &quot;created&quot; ); // <span class="comment">current UTC date-time is set if called without parameters</span>
4261
.. .
4262
</p>
4263
<br>
4264
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4265

    
4266

    
4267
<a name="DESCRIPTION"></a><h3>3.2.14 DESCRIPTION</h3>
4268
<p>
4269
This property provides a more complete textual description of the <strong>calendar</strong> component,
4270
than that provided by the <a href="#SUMMARY">SUMMARY</a> property (, analogous to a mail BODY).
4271
The property is OPTIONAL, MUST NOT occur more than once within <a href="#VEVENT">VEVENT</a>,
4272
<a href="#VTODO">VTODO</a> or <a href="#VALARM">VALARM</a> (PROCEDURE) but can be specified multiple
4273
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.
4274
</p>
4275
<p>The value type for DESCRIPTION is TEXT.</p>
4276
<h5>Create DESCRIPTION</h5>
4277
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4278
<p class="label">Format</p>
4279
<p class="format">calendarComponent::createDescription()</p>
4280
<p class="label">Example</p>
4281
<p class="example">&lt;?php
4282
.. .
4283
$str = $component-&gt;createDescription();
4284
.. .
4285
</p>
4286
<h5>Delete DESCRIPTION</h5>
4287
<p>Remove DESCRIPTION from component.</p>
4288
<p class="label">Format</p>
4289
<p class="format">calendarComponent::deleteProperty( &quot;DESCRIPTION&quot; )</p>
4290
<p class="label">Example 1</p>
4291
<p>Delete (single/first) DESCRIPTION property.</p>
4292
<p class="example">&lt;?php
4293
.. .
4294
$vevent-&gt;deleteProperty( &quot;DESCRIPTION&quot; );
4295
.. .
4296
</p>
4297
<p class="label">Example 2</p>
4298
<p>Delete DESCRIPTION property no 2.</p>
4299
<p class="example">&lt;?php
4300
.. .
4301
$vjournal-&gt;deleteProperty( &quot;DESCRIPTION&quot;, 2 );
4302
.. .
4303
</p>
4304
<p class="label">Example 3</p>
4305
<p>Deleting all DESCRIPTION properties.</p>
4306
<p class="example">&lt;?php
4307
.. .
4308
while( $vjournal-&gt;deleteProperty( &quot;DESCRIPTION&quot; ))
4309
  continue;
4310
.. .
4311
</p>
4312
<h5>Get DESCRIPTION</h5>
4313
<p>If set, returns property value(-s), otherwise FALSE.</p>
4314
<p class="label">Format 1</p>
4315
<p class="format">calendarComponent::getProperty( &quot;DESCRIPTION&quot; )</p>
4316
<p class="comment">output = descriptionValue<sup>1</sup></p>
4317
<p class="label">Format 2</p>
4318
<p class="format">calendarComponent::getProperty( &quot;DESCRIPTION&quot;, FALSE , TRUE )</p>
4319
<p class="comment">output = array( &quot;value&quot;  =&gt; descriptionValue<sup>1</sup>
4320
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4321
<p class="label">Example</p>
4322
<p class="example">&lt;?php
4323
.. .
4324
$description = $vevent-&gt;getProperty( &quot;description&quot; );
4325
.. .
4326
</p>
4327
<h5>Set DESCRIPTION</h5>
4328
<p>Insert property value.</p>
4329
<br>
4330
Parameters, if any, will be ordered as prescribed in [RFC5545].
4331
<p class="label">Format</p>
4332
<p class="format">calendarComponent::setProperty( &quot;description&quot;, descriptionValue [, params [, propOrderNo ]] )</p>
4333
<p class="comment">descriptionValue<sup>1</sup> = (string) Value type TEXT
4334
params<sup>2</sup>         = (array) (
4335
                    [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
4336
                    [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
4337
                   *[, xparams ] )
4338
xparams           = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4339
propOrderNo       = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4340
lang<sup>*</sup>          = as defined in [RFC5646]</p>
4341
<p class="label">Example</p>
4342
<p class="example">&lt;?php
4343
.. .
4344
$vevent-&gt;setProperty( &quot;description&quot;, &quot;This is a description&quot; );
4345
.. .
4346
</p>
4347
<br>
4348
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4349

    
4350

    
4351
<a name="DTEND"></a><h3>3.2.15 DTEND</h3>
4352
<p>
4353
This property specifies the date and time that a <strong>calendar</strong> component ends.
4354
The property is OPTIONAL and MUST NOT occur more than once in VFREEBUSY and VEVENT. In VEVENT, it only occurs
4355
if DURATION NOT occurs.
4356
</p>
4357
<p>
4358
The default value type for DTEND is DATE-TIME, can be set to a DATE value type.
4359
</p>
4360
<p class="quotes">
4361
The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
4362
</p>
4363
<p>
4364
Notice that an end date without a time is in effect midnight of the day before the date,
4365
so for timeless dates, use the date following the event date for it to be correct.
4366
For an &quot;all-day event&quot; and using timeless dates, the DTEND is equal DTSTART plus one day,
4367
example all-day event (2007-12-01)<br>DTSTART;VALUE=DATE:20071201<br> DTEND;VALUE=DATE:20071202.
4368
</p>
4369
<h5>Create DTEND</h5>
4370
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4371
<p class="label">Format</p>
4372
<p class="format">calendarComponent::createDtend()</p>
4373
<p class="label">Example</p>
4374
<p class="example">&lt;?php
4375
.. .
4376
$str = $component-&gt;createDtend();
4377
.. .
4378
</p>
4379
<h5>Delete DTEND</h5>
4380
<p>Remove DTEND from component.</p>
4381
<p class="label">Format</p>
4382
<p class="format">calendarComponent::deleteProperty( &quot;DTEND&quot; )</p>
4383
<p class="label">Example</p>
4384
<p class="example">&lt;?php
4385
.. .
4386
$vevent-&gt;deleteProperty( &quot;DTEND&quot; );
4387
.. .
4388
</p>
4389
<h5>Get DTEND</h5>
4390
<p>If set, returns property value, otherwise FALSE.</p>
4391
<p class="label">Format 1</p>
4392
<p class="format">calendarComponent::getProperty( &quot;DTEND&quot; )</p>
4393
<p class="comment">output = dtendDate<sup>1</sup></p>
4394
<p class="label">Format 2</p>
4395
<p class="format">calendarComponent::getProperty( &quot;DTEND&quot;, FALSE , TRUE )</p>
4396
<p class="comment">output = array( &quot;value&quot;  =&gt; dtendDate<sup>1</sup>
4397
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
4398
<p class="label">Example</p>
4399
<p class="example">&lt;?php
4400
.. .
4401
$dtend = $vevent-&gt;getProperty( &quot;dtend&quot; );
4402
.. .
4403
</p>
4404
<h5>Set DTEND</h5>
4405
<p>
4406
Insert property value. If DATE value type is expected, &quot;VALUE&quot; = &quot;DATE&quot; <b>must</b> be set
4407
(in params<sup>2</sup>) otherwise DATE-TIME (default) value type is set.
4408
</p>
4409
<p>
4410
If no timezone parameter (tz or tzidparam below) is set (i.e.local time) and config <a href="#dTZID">TZID</a> is set,
4411
date-time values will be set WITH timezone from config.
4412
Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a datetime from one time zone to another.
4413
</p>
4414
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
4415
<p class="label">Format</p>
4416
<p class="format">calendarComponent::setProperty( &quot;dtend&quot;, dtendDate [, params<sup>2</sup> ] )
4417
<p class="comment">dtendDate<sup>1</sup>    = (array) ( &quot;year&quot;  =&gt; (int) year
4418
                        , &quot;month&quot; =&gt; (int) month
4419
                        , &quot;day&quot;   =&gt; (int) day
4420
                       [, &quot;hour&quot;  =&gt; (int) hour
4421
                        , &quot;min&quot;   =&gt; (int) min
4422
                        , &quot;sec&quot;   =&gt; (int) sec
4423
                       [, &quot;tz&quot;    =&gt; tz ]] )
4424
dtendDate     = (int) year
4425
              , (int) month
4426
              , (int) day
4427
             [, (int) hour
4428
              , (int) min
4429
              , (int) sec
4430
             [, tz ]]
4431
dtendDate     = array( (int) year
4432
                     , (int) month
4433
                     , (int) day
4434
                    [, (int) hour
4435
                     , (int) min
4436
                     , (int) sec
4437
                    [, tz ]] )
4438
dtendDate     = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [,&quot;tz&quot; =&gt; tz])
4439
                // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4440
                // <span class="comment">timestamp with tz=offset will result in a local DATE-TIME</span>
4441
dtendDate     = (string) date/datetime string<sup>*</sup>
4442
                // <span class="comment">Within the "VFREEBUSY" <strong>calendar</strong> component,</span>
4443
                // <span class="comment">the time MUST be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4444
tz            = (string) &lt;timezone  identifier&gt; / offset
4445
                // <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
4446
offset        = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset</span>
4447
                                    // <span class="comment">will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4448
params<sup>2</sup>       = (array) ([ tzidparam/datetimeparam/dateparam ] *[,xparams])
4449
tzidparam     = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
4450
                // <span class="comment">output as local date-time with timezone identifier</span>
4451
                // <span class="comment">if tzidparam=&quot;GMT&quot;/&quot;UTC&quot; then</span>
4452
                // <span class="comment">output date-time is suffixed by 'Z'</span>
4453
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">default, output as date-time</span>
4454
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="comment">output as DATE, ex. all-day event</span>
4455
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4456
<br>date/datetime string<sup>*</sup> recommended formats
4457
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
4458
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
4459
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
4460
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
4461
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
4462
    trailing characters (digits), if exists, will be interpreted as offset/timezone
4463
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
4464
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
4465
<p class="label">Example 1</p>
4466
<p class="example">&lt;?php
4467
.. .
4468
$vevent-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 16, 30, 0 ); <span class="comment">// 11 august 2006 16.30.00 local date</span>
4469
.. .
4470
</p>
4471
<p class="label">Example 2</p>
4472
<p class="example">&lt;?php
4473
.. .
4474
$vfreebusy-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 16, 30, 0, &quot;-040000&quot; );
4475
                         <span class="comment">// 11 august 2006 16.30.00 -040000</span>
4476
                         <span class="comment">// local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4477
.. .
4478
</p>
4479
<p class="label">Example 3</p>
4480
<p class="example">&lt;?php
4481
.. .
4482
$vevent-&gt;setProperty( &quot;dtend&quot;
4483
                    , array( &quot;year&quot; =&gt;, 2006, &quot;month&quot; =&gt; 8, &quot;day&quot;=&gt; 11 )
4484
                    , array( &quot;VALUE&quot; =&gt; &quot;DATE&quot; ));
4485
                    <span class="comment">// end of an all-day event</span>
4486
.. .
4487
</p>
4488
<p class="label">Example 4</p>
4489
<p class="example">&lt;?php
4490
.. .
4491
$calendar->setConfig( 'TZID', 'Europe/Stockholm' );
4492
.. .
4493
$vevent-&gt;setProperty( &quot;dtend&quot;, 2006, 8, 11, 7, 30, 0 );
4494
                   <span class="comment">// output: DTEND;TZID=Europe/Stockholm:20060811T073000</span>
4495
.. .
4496
</p>
4497
<br>
4498
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4499

    
4500

    
4501
<a name="DTSTAMP"></a><h3>3.2.16 DTSTAMP</h3>
4502
<p>
4503
The property indicates the date/time the instance of the <strong>iCalendar</strong> object was created and is OPTIONAL and
4504
MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>
4505
and <a href="#VFREEBUSY">VFREEBUSY</a> components. However, DTSTAMP is <b>AUTOMATICALLY GENERATED</b> in iCalcreator when creating a component.
4506
</p>
4507
<p>
4508
DTSTAMP may be required when importing iCal files into some <strong>calendar</strong> software<br>(MS etc.),
4509
as well as (<strong>calendar</strong>) <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and<br>"X-WR-TIMEZONE",
4510
<a href="#METHOD">METHOD</a> property (value PUBLISH etc.) and the (also auto created) <a href="#UID">UID</a> property.
4511
</p>
4512
<p>The value type for DTSTAMP is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
4513
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
4514
<br>
4515
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4516

    
4517

    
4518
<a name="DTSTART"></a><h3>3.2.17 DTSTART</h3>
4519
<p>
4520
This property specifies when the <strong>calendar</strong> component begins.
4521
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
4522
<a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
4523
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
4524
</p>
4525
<p>The default value type for DTSTART is DATE-TIME, can be set to a DATE value type.</p>
4526
<p>
4527
For an &quot;all-day event&quot; and using timeless dates, example (2007-12-01)<br>
4528
DTSTART;VALUE=DATE:20071201<br>
4529
DTEND;VALUE=DATE:20071202. // <span class="comment">opt., in effect midnight of the day <u>before</u> the date!!</span>
4530
</p>
4531
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
4532
<br>
4533
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4534

    
4535

    
4536
<a name="DUE"></a><h3>3.2.18 DUE</h3>
4537
<p>
4538
This property defines the date and time when a <a href="#VTODO">VTODO</a> is expected to be completed
4539
and is OPTIONAL and MUST NOT occur more than once and only if DURATION NOT occurs.
4540
</p>
4541
<p>
4542
The default value type for DUE is DATE-TIME, can be set to a DATE value type.
4543
</p>
4544
<p class="quotes">
4545
The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
4546
</p>
4547
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
4548
<br>
4549
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4550

    
4551

    
4552
<a name="DURATION"></a><h3>3.2.19 DURATION</h3>
4553
<p>The property specifies a positive duration of time.</p>
4554
<dl>
4555
<dt>In a <a href="#VEVENT">VEVENT</a>
4556
<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>
4557
<dt>In a <a href="#VTODO">VTODO</a>
4558
<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>
4559
<dt>In a <a href="#VFREEBUSY">VFREEBUSY</a>
4560
<dd>it is OPTIONAL and MUST NOT occur more than once. ([RFC2445])<br>
4561
<dd>it can not appear. ([RFC5545])<br>
4562
<dt>In a <a href="#VALARM">VALARM</a>
4563
<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.
4564
</dl>
4565
<p>
4566
If any hour/minute/second duration part is set, all parts are included in output (ex. one hour duration: &quot;PT1H0M0S&quot;).
4567
</p>
4568
<h5>Create DURATION</h5>
4569
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4570
<p class="label">Format</p>
4571
<p class="format">calendarComponent::createDuration()</p>
4572
<p class="label">Example</p>
4573
<p class="example">&lt;?php
4574
.. .
4575
$str = $component-&gt;createDuration();
4576
.. .
4577
</p>
4578
<h5>Delete DURATION</h5>
4579
<p>Remove DURATION from component.</p>
4580
<p class="label">Format</p>
4581
<p class="format">calendarComponent::deleteProperty( &quot;DURATION&quot; )</p>
4582
<p class="label">Example</p>
4583
<p class="example">&lt;?php
4584
.. .
4585
$valarm-&gt;deleteProperty( &quot;DURATION&quot; );
4586
.. .
4587
</p>
4588
<h5>Get DURATION</h5>
4589
<p>If set, returns property value, otherwise FALSE.</p>
4590
<p class="label">Format 1</p>
4591
<p class="format">calendarComponent::getProperty( &quot;DURATION&quot; )</p>
4592
<p class="comment">output = duration<sup>1</sup></p>
4593
<p class="label">Format 2</p>
4594
<p class="format">calendarComponent::getProperty( &quot;DURATION&quot;, FALSE , TRUE )</p>
4595
<p class="comment">output = array( &quot;value&quot;  =&gt; duration<sup>1</sup>
4596
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4597
<p class="label">Example</p>
4598
<p class="example">&lt;?php
4599
.. .
4600
$duration = $vtodo-&gt;getProperty( &quot;duration&quot; );
4601
.. .
4602
</p>
4603
<p class="label">option</p>
4604
<p>
4605
If a 4th argument is used and set to TRUE, returned output is in a DATE-TIME
4606
 output format (like <a href="#DTEND">DTEND</a> / <a href="#DUE">DUE</a>), based on
4607
<a href="#DTSTART">DTSTART</a> value with the added DURATION value.
4608
</p>
4609
<h5>Set DURATION</h5>
4610
<p>Insert property value.</p>
4611
<p class="label">Format</p>
4612
<p class="format">calendarComponent::setProperty( &quot;duration&quot;, duration [, xparams ] )</p>
4613
<p class="comment">
4614
duration<sup>1</sup>  = (array) ( &quot;week&quot; =&gt; (int) week )
4615
duration<sup>1</sup>  = array ( &quot;day&quot;   =&gt; (int) day )
4616
                  [, &quot;hour&quot;  =&gt; (int) hour
4617
                   , &quot;min&quot;   =&gt; (int) min
4618
                   , &quot;sec&quot;   =&gt; (int) sec ])
4619
duration   = (array) ( &quot;sec&quot; =&gt; (int) sec )
4620
duration   = (array) ( (int) week/false
4621
                    [, (int) day/false
4622
                    [, (int) hour
4623
                     , (int) min
4624
                     , (int) sec ]] )
4625
duration   = (int) week/false
4626
          [, (int) day/false
4627
          [, (int) hour
4628
           , (int) min
4629
           , (int) sec ]]
4630
duration   = (string) dur-value = [&quot;+&quot;] &quot;P&quot; (dur-date/dur-time/dur-week)
4631
dur-date   = dur-day [dur-time]
4632
dur-time   = &quot;T&quot; (dur-hour / dur-minute / dur-second)
4633
dur-week   = 1*DIGIT &quot;W&quot;
4634
dur-hour   = 1*DIGIT &quot;H&quot; [dur-minute]
4635
dur-minute = 1*DIGIT &quot;M&quot; [dur-second]
4636
dur-second = 1*DIGIT &quot;S&quot;
4637
dur-day    = 1*DIGIT &quot;D&quot;
4638
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
4639
</p>
4640
<p class="label">Example 1</p>
4641
<p>One day duration.</p>
4642
<p class="example">&lt;?php
4643
.. .
4644
$vtodo-&gt;setProperty &quot;duration&quot; , array( &quot;day&quot; =&gt; 1 ));
4645
.. .
4646
</p>
4647
<p class="label">Example 2</p>
4648
<p>Four hours duration.</p>
4649
<p class="example">&lt;?php
4650
.. .
4651
$vtodo-&gt;setProperty( &quot;duration&quot;, &quot;PT4H&quot; );
4652
.. .
4653
</p>
4654
<br>
4655
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4656

    
4657

    
4658
<a name="EXDATE"></a><h3>3.2.20 EXDATE</h3>
4659
<p>
4660
This property defines the list of date/time exceptions for a recurring <strong>calendar</strong> component and is OPTIONAL
4661
and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
4662
</p>
4663
<p>The default value type for EXDATE is DATE-TIME, can be set to a DATE value type.</p>
4664
<h5>Create EXDATE</h5>
4665
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
4666
<p class="label">Format</p>
4667
<p class="format">calendarComponent::createExdate()</p>
4668
<p class="label">Example</p>
4669
<p class="example">&lt;?php
4670
.. .
4671
$str = $component-&gt;createExdate();
4672
.. .
4673
</p>
4674
<h5>Delete EXDATE</h5>
4675
<p>Remove EXDATE from component.</p>
4676
<p class="label">Format</p>
4677
<p class="format">calendarComponent::deleteProperty( &quot;EXDATE&quot; )</p>
4678
<p class="label">Example 1</p>
4679
<p class="example">&lt;?php
4680
.. .
4681
$vtodo-&gt;deleteProperty( &quot;EXDATE&quot; );
4682
.. .
4683
</p>
4684
<p class="label">Example 2</p>
4685
<P>Delete EXDATE property no 2.</p>
4686
<p class="example">&lt;?php
4687
.. .
4688
$vjournal-&gt;deleteProperty( &quot;EXDATE&quot;, 2 );
4689
.. .
4690
</p>
4691
<p class="label">Example 3</p>
4692
<p>Deleting all EXDATE properties.</p>
4693
<p class="example">&lt;?php
4694
.. .
4695
while( $vjournal-&gt;deleteProperty( &quot;EXDATE&quot; ))
4696
  continue;
4697
.. .
4698
</p>
4699
<h5>Get EXDATE</h5>
4700
<p>If set, returns property value, otherwise FALSE.</p>
4701
<p class="label">Format 1</p>
4702
<p class="format">calendarComponent::getProperty( &quot;EXDATE&quot; )<p>
4703
<p class="comment">output = exdates<sup>1</sup></p>
4704
<p class="label">Format 2</p>
4705
<p class="format">calendarComponent::getProperty( &quot;exdate&quot;, propOrderNo/FALSE, TRUE )</p>
4706
<p class="comment">propOrderNo = (int) specific property value</p>
4707
<p class="comment">output = array( &quot;value&quot;  =&gt; exdates<sup>1</sup>
4708
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4709
<p class="label">Format 3</p>
4710
<p class="format">calendarComponent::getProperty( &quot;EXDATE&quot;, propOrderNo )</p>
4711
<p class="comment">propOrderNo = (int) specific property value</p>
4712
<p class="comment">Get propOrderNo EXDATE</p>
4713
<p class="label">Example</p>
4714
<p class="example">&lt;?php
4715
.. .
4716
$exdate = $vtodo-&gt;getProperty( &quot;exdate&quot; );
4717
.. .
4718
</p>
4719
<h5>Set EXDATE</h5>
4720
<p>Insert property value.</p>
4721
<p>The value type for EXDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
4722
<p>
4723
If DATE value type is set in params (&quot;VALUE&quot; = &quot;DATE&quot;), all timezone or offset in dates are ignored.<br>
4724
If no &quot;VALUE&quot; value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
4725
</p>
4726
<p>
4727
If &quot;TZID&quot; is set in params,
4728
all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
4729
If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
4730
If no &quot;TZID&quot; is set in params and timezone in 1st date, all remaining dates are within this timezone and param &quot;TZID&quot; is set.<br>
4731
If none of the above rules are applicable, DATE-TIME and local date is set default.
4732
</p>
4733
<p>
4734
Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
4735
</p>
4736
<p>EXDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
4737
<p>
4738
In spite of the fact that EXDATE may contain a (comma separated) list of values,
4739
a strong recommendation is to split a EXDATE &quot;list&quot; into multiple single EXDATE entrys.
4740
</p>
4741
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
4742
<p class="label">Format</p>
4743
<p class="format">calendarComponent::setProperty( &quot;exdate&quot;, exdates [, params [, propOrderNo ]] )</p>
4744
<p class="comment">exdates<sup>1</sup>      = (array) ( date *[, date ] )
4745
date          = array( (int) year
4746
                     , (int) month
4747
                     , (int) day
4748
                    [, (int) hour
4749
                     , (int) min
4750
                     , (int) sec
4751
                    [, tz ]] )
4752
date<sup>1</sup>         = (array) ( &quot;year&quot;  =&gt; (int) year
4753
                        , &quot;month&quot; =&gt; (int) month
4754
                        , &quot;day&quot;   =&gt; (int) day
4755
                       [, &quot;hour&quot;  =&gt; (int) hour
4756
                        , &quot;min&quot;   =&gt; (int) min
4757
                        , &quot;sec&quot;   =&gt; (int) sec
4758
                       [, &quot;tz&quot;    =&gt; tz ]] )
4759
date          = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [, &quot;tz&quot; =&gt; tz])
4760
                // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4761
date          = (string) date/datetime string<sup>*</sup>
4762
tz            = (string) &lt;timezone identifier&gt; / offset
4763
                // <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
4764
offset        = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4765
params<sup>2</sup>       = (array) ([(datetimeparam/dateparam)&nbsp;/ tzidparam] *[,xparams])
4766
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">default, output as date-time</span>
4767
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot; // <span class="comment">output as DATE</span>
4768
tzidparam     = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
4769
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
4770
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
4771
<br>date/datetime string<sup>*</sup> recommended formats
4772
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
4773
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
4774
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
4775
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
4776
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
4777
    trailing characters (digits), if exists, will be interpreted as offset/timezone
4778
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
4779
    <span class="commsnt">(notice <a href="#date_restriction">date restriction</a>)</span></p>
4780
<p class="label">Example 1</p>
4781
<p class="example">&lt;?php
4782
.. .
4783
$vevent-&gt;setProperty( &quot;exdate&quot;, array( array( 2006, 8, 14, 16, 0, 0 ));
4784
                    <span class="comment">// exclude 2006-08-14 16.00.00 (local date) from recurrence pattern</span>
4785
.. .
4786
</p>
4787
<p class="label">Example 2</p>
4788
<p class="example">&lt;?php
4789
.. .
4790
$vevent-&gt;setProperty( &quot;exdate&quot;
4791
                    , array( array(&quot;year&quot; =&gt;,2006,&quot;month&quot; =&gt; 8,&quot;day&quot;=&gt; 11))
4792
                    , array( &quot;VALUE&quot; =&gt; &quot;DATE&quot; ));
4793
                   <span class="comment">// exclude 2006-08-11 from recurrence pattern;</span>
4794
.. .
4795
</p>
4796
<br>
4797
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4798

    
4799

    
4800
<a name="EXRULE"></a><h3>3.2.21 EXRULE</h3>
4801
<p>
4802
This property defines a rule or repeating pattern for an exception to a recurrence set and is OPTIONAL
4803
and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
4804
</p>
4805
<p>EXRULE is deprecated in [RFC5545]!</p>
4806
<h5>Create EXRULE</h5>
4807
<p>If set, returns [RFC2445] formatted string, otherwise FALSE.</p>
4808
<p class="label">Format</p>
4809
<p class="format">calendarComponent::createExrule()</p>
4810
<p class="label">Example</p>
4811
<p class="example">&lt;?php
4812
.. .
4813
$str = $component-&gt;createExrule();
4814
.. .
4815
</p>
4816
<h5>Delete EXRULE</h5>
4817
<p>Remove EXRULE from component.</p>
4818
<p class="label">Format</p>
4819
<p class="format">calendarComponent::deleteProperty( &quot;EXRULE&quot; )</p>
4820
<p class="label">Example 1</p>
4821
<p class="example">&lt;?php
4822
.. .
4823
$vtodo-&gt;deleteProperty( &quot;EXRULE&quot; );
4824
.. .
4825
</p>
4826
<p class="label">Example 2</p>
4827
<p>Delete EXRULE property no 2.</p>
4828
<p class="example">&lt;?php
4829
.. .
4830
$vjournal-&gt;deleteProperty( &quot;EXRULE&quot;, 2 );
4831
.. .
4832
</p>
4833
<p class="label">Example 3</p>
4834
<p>Deleting all EXRULE properties.</p>
4835
<p class="example">&lt;?php
4836
.. .
4837
while( $vjournal-&gt;deleteProperty( &quot;EXRULE&quot; ))
4838
  continue;
4839
.. .
4840
</p>
4841
<h5>Get EXRULE</h5>
4842
<p>If set, returns property value, otherwise FALSE.</p>
4843
<p class="label">Format 1</p>
4844
<p class="format">calendarComponent::getProperty( &quot;EXRULE&quot; )</p>
4845
<p class="comment">output = recur<sup>1</sup></p>
4846
<p class="label">Format 2</p>
4847
<p class="format">calendarComponent::getProperty( &quot;exrule&quot;, propOrderNo/FALSE, TRUE )</p>
4848
<p class="comment">propOrderNo = (int) specific property value</p>
4849
<p class="comment">output = array( &quot;value&quot;  =&gt; recur<sup>1</sup>
4850
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
4851
<p class="label">Format 3</p>
4852
<p class="format">calendarComponent::getProperty( &quot;EXRULE&quot;, propOrderNo )</p>
4853
<p class="comment">propOrderNo = (int) specific property value</p>
4854
<p class="comment">Get propOrderNo EXRULE</p>
4855
<p class="label">Example</p>
4856
<p class="example">&lt;?php
4857
.. .
4858
$exrule = $vtodo-&gt;getProperty( &quot;exrule&quot; );
4859
.. .
4860
</p>
4861
<h5>Set EXRULE</h5>
4862
<p>
4863
Insert property value.
4864
Notice, use function <a href="#transformDateTime">transformDateTime</a>to change a local datetime to a UTC datetime.
4865
</p>
4866
<p>Parameters, will be ordered as prescribed in [RFC5545].</p>
4867
<p class="label">Format</p>
4868
<p class="format">calendarComponent::setProperty( &quot;exrule&quot;, recur [, xparams [, propOrderNo ]] )</p>
4869
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).
4870
<p class="comment">recur<sup>1</sup>      = (array) ( "FREQ" =&gt; freq
4871
     // <span class="comment">either UNTIL or COUNT may appear in a &quot;recur&quot;,
4872
        but UNTIL and COUNT MUST NOT occur in the same &quot;recur&quot;</span>
4873
                  [, &quot;UNTIL&quot; &quot;=&gt;&quot; >enddate ]
4874
                  [, &quot;COUNT&quot; &quot;=&gt;&quot; 1*DIGIT ]
4875
     // <span class="comment">the rest of these keywords are optional,
4876
        but MUST NOT occur more than once</span>
4877
                  [, &quot;INTERVAL&quot;   &quot;=&gt;&quot; 1*DIGIT ]
4878
                  [, &quot;BYSECOND&quot;   &quot;=&gt;&quot; byseclist ]
4879
                  [, &quot;BYMINUTE&quot;   &quot;=&gt;&quot; byminlist ]
4880
                  [, &quot;BYHOUR&quot;     &quot;=&gt;&quot; byhrlist ]
4881
                  [, &quot;BYDAY&quot;      &quot;=&gt;&quot; bywdaylist ]
4882
                  [, &quot;BYMONTHDAY&quot; &quot;=&gt;&quot; bymodaylist ]
4883
                  [, &quot;BYYEARDAY&quot;  &quot;=&gt;&quot; byyrdaylist ]
4884
                  [, &quot;BYWEEKNO&quot;   &quot;=&gt;&quot; bywknolist ]
4885
                  [, &quot;BYMONTH&quot;    &quot;=&gt;&quot; bymolist ]
4886
                  [, &quot;BYSETPOS&quot;   &quot;=&gt;&quot; bysplist ]
4887
                  [, &quot;WKST&quot;       &quot;=&gt;&quot; weekday ]
4888
                  [, x-name       &quot;=&gt;&quot; (string) text ] )
4889
freq        = &quot;SECONDLY&quot; /
4890
              &quot;MINUTELY&quot; /
4891
              &quot;HOURLY&quot;   /
4892
              &quot;DAILY&quot;    /
4893
              &quot;WEEKLY&quot;   /
4894
              &quot;MONTHLY&quot;  /
4895
              &quot;YEARLY&quot;
4896
enddate     = date // <span class="comment">a DATE value or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value</span>
4897
date        = (array) ( &quot;year&quot;  =&gt; (int) year
4898
                      , &quot;month&quot; =&gt; (int) month
4899
                      , &quot;day&quot;   =&gt; (int) day
4900
                     [, &quot;hour&quot;  =&gt; (int) hour
4901
                      , &quot;min&quot;   =&gt; (int) min
4902
                      , &quot;sec&quot;   =&gt; (int) sec ])
4903
date        = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
4904
date        = (string) date/datetime string<sup>*</sup>
4905
byseclist   = seconds
4906
byseclist   = (array) (seconds *(, seconds ))
4907
seconds     = 1DIGIT / 2DIGIT ;0 to 59
4908
byminlist   = minutes
4909
byminlist   = (array) ( minutes *(, minutes ))
4910
minutes     = 1DIGIT / 2DIGIT ;0 to 59
4911
byhrlist    = hour
4912
byhrlist    = (array) ( hour *(, hour ))
4913
hour        = 1DIGIT / 2DIGIT ;0 to 23
4914
bywdaylist  = weekdaynum
4915
bywdaylist  = (array) ( weekdaynum *("," weekdaynum ))
4916
weekdaynum  = (array) ( [([plus] ordwk / minus ordwk)], &quot;DAY&quot; =&gt; weekday )
4917
plus        = &quot;+&quot;
4918
minus       = &quot;-&quot;
4919
ordwk       = 1DIGIT / 2DIGIT ;1 to 53
4920
weekday     = &quot;SU&quot; / &quot;MO&quot; / &quot;TU&quot; / &quot;WE&quot; / &quot;TH&quot; / &quot;FR&quot; / &quot;SA&quot;
4921
                ; Corresponding to
4922
                ; SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
4923
                ; FRIDAY, SATURDAY and SUNDAY days of the week.
4924
bymodaylist = monthdaynum
4925
bymodaylist = (array) ( monthdaynum *(, monthdaynum ))
4926
monthdaynum = ( [plus] ordmoday ) / ( minus ordmoday )
4927
ordmoday    = 1DIGIT / 2DIGIT ;1 to 31
4928
byyrdaylist = yeardaynum
4929
byyrdaylist = (array) ( yeardaynum *(, yeardaynum ))
4930
yeardaynum  = ( [plus] ordyrday ) / ( minus ordyrday )
4931
ordyrday    = 1DIGIT / 2DIGIT / 3DIGIT ;1 to 366
4932
bywknolist  = weeknum
4933
bywknolist  = (array) ( weeknum *(, weeknum ))
4934
weeknum     = ( [plus] ordwk ) / ( minus ordwk )
4935
bymolist    = monthnum
4936
bymolist    = (array) ( monthnum *(, monthnum ))
4937
monthnum    = 1DIGIT / 2DIGIT ;1 to 12
4938
bysplist    = setposday
4939
bysplist    = (array) ( setposday *(, setposday ))
4940
setposday   = yeardaynum
4941
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
4942
propOrderNo = (int) order number                              // <span class="comment">1=1st, 2=2nd etc</span>
4943
<br>date/datetime string<sup>*</sup> recommended formats
4944
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
4945
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
4946
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
4947
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
4948
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
4949
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
4950
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
4951
<p class="label">Example</p>
4952
<p class="example">&lt;?php
4953
.. .
4954
$vevent-&gt;setProperty(&nbsp;&quot;Exrule&quot;
4955
             ,&nbsp;array( &quot;FREQ&quot;       =&gt; &quot;MONTHLY&quot;
4956
                    , &quot;UNTIL&quot;      =&gt; &quot;20060831&quot;
4957
   // <span class="comment">DATE / DATE-TIME in <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> format; string/array, see <a class="ref" href="#CREATED">CREATED</a> format</span>
4958
                    , &quot;INTERVAL&quot;   =&gt; 2
4959
                    , &quot;WKST&quot;       =&gt; &quot;SU&quot;
4960
                    , &quot;BYSECOND&quot;   =&gt; 2
4961
                    , &quot;BYMINUTE&quot;   =&gt; array( 2, -4, 6 )                // (*)
4962
                    , &quot;BYHOUR&quot;     =&gt; array( 2, 4, -6 )                // (*)
4963
                    , &quot;BYMONTHDAY&quot; =&gt; -2                               // (*)
4964
                    , &quot;BYYEARDAY&quot;  =&gt; 2                                // (*)
4965
                    , &quot;BYWEEKNO&quot;   =&gt; array( 2, -4, 6 )                // (*)
4966
                    , &quot;BYMONTH&quot;    =&gt; 2                                // (*)
4967
                    , &quot;BYSETPOS&quot;   =&gt; array( 2, -4, 6 )                // (*)
4968
                    , &quot;BYday&quot;      =&gt; array( array(-2, &quot;DAY&quot; =&gt; &quot;WE&quot; )
4969
                                           , array( 3, &quot;DAY&quot; =&gt; &quot;TH&quot;)
4970
                                           , array( 5, &quot;DAY&quot; =&gt; &quot;FR&quot;)
4971
                                           , array(    &quot;DAY&quot; =&gt; &quot;MO&quot;)) // (**)
4972
                    , &quot;X-NAME&quot;     =&gt; &quot;x-value&quot; )
4973
            , array( &quot;key&quot;   =&gt; &quot;xparamValue&quot; ));
4974

    
4975
$vtodo-&gt;setProperty( >&quot;exrule&quot;
4976
            , array( &quot;FREQ&quot;        =&gt; &quot;WEEKLY&quot;
4977
                   , &quot;COUNT&quot;       =&gt; 2
4978
                   , &quot;INTERVAL&quot;    =&gt; 2
4979
                   , &quot;WKST&quot;        =&gt; &quot;SU&quot;
4980
                   , &quot;BYSECOND&quot;    =&gt; array( -2, 4, 6 )                // (*)
4981
                   , &quot;BYMINUTE&quot;    =&gt; -2                               // (*)
4982
                   , &quot;BYHOUR&quot;      =&gt; 2                                // (*)
4983
                   , &quot;BYMONTHDAY&quot;  =&gt; array( 2, -4, 6 )                // (*)
4984
                   , &quot;BYYEARDAY&quot;   =&gt; array( -2, 4, 6 )                // (*)
4985
                   , &quot;BYWEEKNO&quot;    =&gt; -2                               // (*)
4986
                   , &quot;BYMONTH&quot;     =&gt; array( 2, 4, -6 )                // (*)
4987
                   , &quot;BYSETPOS&quot;    =&gt; -2                               // (*)
4988
                   , &quot;BYday&quot;       =&gt; array( 5, &quot;DAY&quot; =&gt; &quot;WE&quot; )        // (**)
4989
                   , &quot;X-NAME&quot;      =&gt; &quot;x-value&quot;  )
4990
            , array( &quot;key&quot;   =&gt; &quot;xparamValue&quot; ));
4991
  // <span class="comment">(*)  single value/array of values</span>
4992
  // <span class="comment">(**) single value array /array of arrays</span>
4993
.. .
4994
</p>
4995
<br>
4996
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
4997

    
4998

    
4999
<a name="FREEBUSY_PROP"></a><h3>3.2.22 FREEBUSY</h3>
5000
<p>
5001
The property defines one or more free or busy time intervals in a <a href="#VFREEBUSY">VFREEBUSY</a>
5002
<strong>calendar</strong> component.
5003
<p>
5004
<p>The value type for FREEBUSY is PERIOD. A PERIOD is a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/DATE-TIME or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/duration.</p>
5005
<h5>Create FREEBUSY</h5>
5006
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5007
<p class="label">Format</p>
5008
<p class="format">calendarComponent::createFreebusy()</p>
5009
<p class="label">Example</p>
5010
<p class="example">&lt;?php
5011
.. .
5012
$str = $component-&gt;createfreebusy();
5013
.. .
5014
</p>
5015
<h5>Delete FREEBUSY</h5>
5016
<p>Remove FREEBUSY from component.</p>
5017
<p class="label">Format</p>
5018
<p class="format">calendarComponent::deleteProperty( &quot;FREEBUSY&quot; )</p>
5019
<p class="label">Example 1</p>
5020
<p>Delete (single/first) FREEBUSY property</p>
5021
<p class="example">&lt;?php
5022
.. .
5023
$vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot; );
5024
.. .
5025
</p>
5026
<p class="label">Example 2</p>
5027
<p>Delete FREEBUSY property no 2.</p>
5028
<p class="example">&lt;?php
5029
.. .
5030
$vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot;, 2 );
5031
.. .
5032
</p>
5033
<p class="label">Example 3</p>
5034
<p>Deleting all FREEBUSY properties.</p>
5035
<p class="example">&lt;?php
5036
.. .
5037
while( $vfreebusy-&gt;deleteProperty( &quot;FREEBUSY&quot; ))
5038
  continue;
5039
.. .
5040
</p>
5041
<h5>Get FREEBUSY</h5>
5042
<p>If set, returns property value, otherwise FALSE.</p>
5043
<p class="label">Format 1</p>
5044
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot; )</p>
5045
<p class="comment">output = array( &quot;fbtyp&quot; =&gt; freebusytype<sup>1</sup> , periods<sup>2</sup> )</p>
5046
<p class="label">Format 3</p>
5047
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot;, propOrderNo/FALSE , TRUE )</p>
5048
<p class="comment">propOrderNo = (int) specific property value</p>
5049
<p class="comment">output = array( &quot;value&quot; =&gt; array(&quot;fbtype&quot; =&gt; freebusytype<sup>1</sup> ,periods<sup>2</sup>)
5050
              , &quot;params&quot; =&gt; xparams<sup>3</sup> )</p>
5051
<p class="label">Format 3</p>
5052
<p class="format">calendarComponent::getProperty( &quot;FREEBUSY&quot;, propOrderNo )</p>
5053
<p class="comment">propOrderNo = (int) specific property value</p>
5054
<p class="comment">Get propOrderNo FREEBUSY</p>
5055
<p class="label">Example</p>
5056
<p class="example">&lt;?php
5057
.. .
5058
$freebusy = $vfreebusy-&gt;getProperty( &quot;FREEBUSY&quot; );
5059
.. .
5060
</p>
5061
<h5>Set FREEBUSY</h5>
5062
Insert property value. A FREEBUSY input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
5063
<p class="label">Format</p>
5064
<p class="format">calendarComponent::setProperty( &quot;freebusy&quot;,freebusytype,fbperiods [,xparams [,propOrderNo ]] )</p>
5065
<p class="comment">freebusytype<sup>1</sup>     = one of &quot;FREE&quot;
5066
                        / &quot;BUSY&quot; <b>Default</b>
5067
                        / &quot;BUSY-UNAVAILABLE&quot;
5068
                        / &quot;BUSY-TENTATIVE&quot;
5069
                        /  x-name
5070
fbperiods         = (array) ( periods<sup>2</sup> )&nbsp;
5071
periods<sup>2</sup>          = (array) ( startdate, enddate/duration ) /
5072
                    (array) ( *[, (array) ( startdate, enddate/duration )] )
5073
startdate/enddate = (array) ( (int) year
5074
                            , (int) month
5075
                            , (int) day
5076
                            , (int) hour
5077
                            , (int) min
5078
                            , (int) sec )
5079
startdate/enddate = (array) ( &quot;year&quot;  =&gt; (int) year
5080
                            , &quot;month&quot; =&gt; (int) month
5081
                            , &quot;day&quot;   =&gt; (int) day
5082
                            , &quot;hour&quot;  =&gt; (int) hour
5083
                            , &quot;min&quot;   =&gt; (int) min
5084
                            , &quot;sec&quot;   =&gt; (int) sec ) // <span class="comment">output format</span>
5085
startdate/enddate = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5086
startdate/enddate = (string) datetime string<sup>*</sup>
5087
                    // <span class="comment">startdate/enddate MUST be an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5088
duration          = (array) ( (int) week / FALSE
5089
                           [, (int) day / FALSE
5090
                            , (int) hour
5091
                            , (int) min
5092
                            , (int) sec] )
5093
duration          = (array) ( &quot;week&quot; =&gt; (int) week / FALSE
5094
                           [, &quot;day&quot;  =&gt; (int) day / FALSE
5095
                           [, &quot;hour&quot; =&gt; (int) hour
5096
                            , &quot;min&quot;  =&gt; (int) min
5097
                            , &quot;sec&quot;  =&gt; (int) sec ]] ); // <span class="comment">output format</span>
5098
duration          = (array) ( &quot;sec&quot;  =&gt; (int) sec )
5099
duration          = (string) dur-value
5100
                        = ([&quot;+&quot;]/&quot;-&quot;) &quot;P&quot; (dur-date/dur-time/dur-week)
5101
dur-date          = dur-day [dur-time]
5102
dur-time          = &quot;T&quot; (dur-hour / dur-minute / dur-second)
5103
dur-week          = 1*DIGIT &quot;W&quot;
5104
dur-hour          = 1*DIGIT &quot;H&quot; [dur-minute]
5105
dur-minute        = 1*DIGIT &quot;M&quot; [dur-second]
5106
dur-second        = 1*DIGIT &quot;S&quot;
5107
dur-day           = 1*DIGIT &quot;D&quot;
5108
xparams<sup>3 </sup>          = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5109
propOrderNo       = (int) order number                              // <span class="comment">1=1st, 2=2nd etc</span>
5110
<br>date/datetime string<sup>*</sup> recommended formats
5111
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
5112
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
5113
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
5114
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
5115
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
5116
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
5117
<p class="label">Example</p>
5118
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).
5119
<p class="example">&lt;?php
5120
.. .
5121
$fdate1 = array ( 2001, 1, 1, 1, 1, 1 );
5122
alt.
5123
$fdate1 = array ( &quot;year&quot;  =&gt; 2001
5124
                , &quot;month&quot; =&gt; 1
5125
                , &quot;day&quot;   =&gt; 1
5126
                , &quot;hour&quot;  =&gt; 1
5127
                , &quot;min&quot;   =&gt; 1
5128
                , &quot;sec&quot;   =&gt; 1 );
5129
$fdate2 = array ( 2002, 2, 2, 2, 2, 2 );
5130
$fdate3 = array ( 2003, 3, 3, 3, 3, 3 );
5131
$fdate4 = &quot;4 April 2005 4:4:4&quot;;
5132
$fdate7 = array ( &quot;year&quot;  =&gt; 2007
5133
                , &quot;month&quot; =&gt; 7
5134
                , &quot;day&quot;   =&gt; 7 );
5135
$fdur6  = array ( &quot;week&quot; =&gt; 0
5136
                , &quot;day&quot;  =&gt; 5
5137
                , &quot;hour&quot; =&gt; 5
5138
                , &quot;min&quot;  =&gt; 5
5139
                , &quot;sec&quot;  =&gt; 5 );
5140
$fdur7  = array ( 0, 0, 6 ); // <span class="comment">duration for 6 hours</span>
5141
$fdur8  = &quot;P2D&quot;;             // <span class="comment">duration two days</span>
5142
$freebusy-&gt;setProperty &quot;freebusy&quot;
5143
                      , &quot;FREE&quot;
5144
                      , array( array( $fdate1, $fdate2 )
5145
                             , array( $fdate3, $fdur6 )
5146
                             , array( $fdate4, $fdate5 )));
5147
$freebusy-&gt;setProperty(&quot;freebusy&quot;
5148
                      , &quot;Busy&quot;
5149
                      , array( array( array( $fdate1, $fdate2 )
5150
                             , array( $fdate3, $fdur8 )
5151
                             , array( $fdate4, $fdur7 )
5152
                             , array( $fdate1, $fdate3 )));
5153
.. .
5154
</p>
5155
<br>
5156
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5157

    
5158

    
5159
<a name="GEO"></a><h3>3.2.23 GEO</h3>
5160
<p>
5161
This property specifies information related to the global position for the activity specified by
5162
<a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components and is OPTIONAL and MUST NOT occur more than once.
5163
</p>
5164
<p>Value type for latitude and longitude is FLOAT.</p>
5165
<p class="quotes">Values for latitude and longitude shall be expressed as decimal
5166
fractions of degrees. Whole degrees of latitude shall be represented by
5167
a two-digit decimal number ranging from 0 through 90. Whole degrees
5168
of longitude shall be represented by a decimal number ranging from 0
5169
through 180. When a decimal fraction of a degree is specified, it shall
5170
be separated from the whole number of degrees by a decimal point.</p>
5171
<p>The output (float) latitude and longitude values are presented up to six decimals.</p>
5172
<p>Using the non-standard directive &quot;GEOLOCATION&quot; when calling iCalcreator
5173
 <a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
5174
 getProperty method, iCalcreator returns output supporting<br>
5175
 ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;<br>
5176
 by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
5177
 (only if <a href="#GEO">GEO</a> is set).
5178
</p>
5179
<h5>Create GEO</h5>
5180
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5181
<p class="label">Format</p>
5182
<p class="format">calendarComponent::createGeo()</p>
5183
<p class="label">Example</p>
5184
<p class="example">&lt;?php
5185
.. .
5186
$str = $component-&gt;createGeo();
5187
.. .
5188
</p>
5189
<h5>Delete GEO</h5>
5190
<p>Remove GEO from component.</p>
5191
<p class="label">Format</p>
5192
<p class="format">calendarComponent::deleteProperty( &quot;GEO&quot; )</p>
5193
<p class="label">Example</p>
5194
<p class="example">&lt;?php
5195
.. .
5196
$vevent-&gt;deleteProperty( &quot;GEO&quot; );
5197
.. .
5198
</p>
5199
<h5>Get GEO</h5>
5200
<p>If set, returns property value, otherwise FALSE.</p>
5201
<p class="label">Format 1</p>
5202
<p class="format">calendarComponent::getProperty( &quot;GEO&quot; )</p>
5203
<p class="comment">output = array( &quot;latitude&quot;  =&gt; &lt;latitude&gt;
5204
              , &quot;longitude&quot; =&gt; &lt;longitude&gt;))</p>
5205
<p class="label">Format 2</p>
5206
<p class="format">calendarComponent::getProperty( &quot;GEO&quot;, FALSE , TRUE )</p>
5207
<p class="comment">output = array( &quot;value&quot; =&gt; array ( &quot;latitude&quot;  =&gt; &lt;latitude&gt;
5208
                                 , &quot;longitude&quot; =&gt; &lt;longitude&gt;))
5209
              , &quot;params&quot; =&gt; xparams<sup>1</sup> )</p>
5210
<p class="label">Example</p>
5211
<p class="example">&lt;?php
5212
.. .
5213
$geo = $vevent-&gt;getProperty( &quot;GEO&quot; );
5214
.. .
5215
</p>
5216
<h5>Set GEO</h5>
5217
<p>Insert property value.</p>
5218
<p class="label">Format</p>
5219
<p class="format">calendarComponent::setProperty( &quot;geo&quot;, latitude, longitude [, xparams ] )</p>
5220
<p class="comment">latitude  = (float) latitude
5221
longitude = (float) longitude
5222
xparams<sup>1</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5223
</p>
5224
<p class="label">Example</p>
5225
<p class="example">&lt;?php
5226
.. .
5227
$vevent-&gt;setProperty( &quot;geo&quot;, 11.23456, -23.45678 );
5228
.. .
5229
</p>
5230
<br>
5231
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5232

    
5233

    
5234
<a name="LAST-MODIFIED"></a><h3>3.2.24 LAST-MODIFIED</h3>
5235
<p>
5236
The property specifies the date and time that the information associated with the <strong>calendar</strong>
5237
component was last revised in the <strong>calendar</strong> store.
5238
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
5239
<a href="#VTODO">VTODO</a>,  <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VTIMEZONE">VTIMEZONE</a> components.
5240
</p>
5241
<p>The value type for LAST-MODIFIED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
5242
<p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
5243
<br>
5244
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5245

    
5246

    
5247
<a name="LOCATION"></a><h3>3.2.25 LOCATION</h3>
5248
<p>
5249
The property defines the intended venue for the activity defined by a <strong>calendar</strong> component.
5250
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
5251
</p>
5252
<p>The value type for LOCATION is TEXT.</p>
5253
<p>Using the non-standard directive &quot;GEOLOCATION&quot; when calling iCalcreator
5254
 <a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
5255
 getProperty method, iCalcreator returns output supporting<br>
5256
ISO6709 &quot;Standard representation of geographic point location by coordinates&quot;,<br>
5257
by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
5258
 (only if <a href="#GEO">GEO</a> is set).
5259
</p>
5260
<h5>Create LOCATION</h5>
5261
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5262
<p class="label">Format</p>
5263
<p class="format">calendarComponent::createLocation()</p>
5264
<p class="label">Example</p>
5265
<p class="example">&lt;?php
5266
.. .
5267
$str = $component-&gt;createLocation();
5268
.. .
5269
</p>
5270
<h5>Delete LOCATION</h5>
5271
<p>Remove LOCATION from component.</p>
5272
<p class="label">Format</p>
5273
<p class="format">calendarComponent::deleteProperty( &quot;LOCATION&quot; )</p>
5274
<p class="label">Example</p>
5275
<p class="example">&lt;?php
5276
.. .
5277
$vevent-&gt;deleteProperty( &quot;LOCATION&quot; );
5278
.. .
5279
</p>
5280
<h5>Get LOCATION</h5>
5281
<p>If set, returns property value, otherwise FALSE.</p>
5282
<p class="label">Format 1</p>
5283
<p class="format">calendarComponent::getProperty( &quot;LOCATION&quot; )</p>
5284
<p class="comment">output = location<sup>1</sup></p>
5285
<p class="label">Format 2</p>
5286
<p class="format">calendarComponent::getProperty( &quot;LOCATION&quot;, FALSE , TRUE )</p>
5287
<p class="comment">output = array( &quot;value&quot;  =&gt; location<sup>1</sup>
5288
              , &quot;params&quot; =&gt; param<sup>2</sup> )</p>
5289
<p class="label">Example</p>
5290
<p class="example">&lt;?php
5291
.. .
5292
$location = $vevent-&gt;getProperty( &quot;LOCATION&quot; );
5293
.. .
5294
</p>
5295
<h5>Set LOCATION</h5>
5296
<p>Insert property value.</p>
5297
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
5298
<p class="label">Format</p>
5299
<p class="format">calendarComponent::setProperty( &quot;location&quot;, location [, param] )</p>
5300
<p class="comment">location<sup>1</sup> = (string) Value type TEXT
5301
params<sup>2</sup>   = (array) ( [&quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
5302
                  [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
5303
                 *[, xparams ]
5304
xparams   = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5305
lang<sup>*</sup>     = as defined in [RFC5646]</p>
5306
<p class="label">Example</p>
5307
<p class="example">&lt;?php
5308
.. .
5309
$vevent-&gt;setProperty( &quot;location&quot;, &quot;Buckingham Palace&quot; );
5310
.. .
5311
</p>
5312
<br>
5313
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5314

    
5315

    
5316
<a name="ORGANIZER"></a><h3>3.2.26 ORGANIZER</h3>
5317
<p>
5318
The property defines the organizer for a <strong>calendar</strong> component and is OPTIONAL
5319
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
5320
<a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
5321
</p>
5322
<p>This value type for ORGANIZER is URI, a <strong>calendar</strong> user address.</p>
5323
<h5>Create ORGANIZER</h5>
5324
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5325
<p class="label">Format</p>
5326
<p class="format">calendarComponent::createOrganizer()</p>
5327
<p class="label">Example</p>
5328
<p class="example">&lt;?php
5329
.. .
5330
$str = $component-&gt;createOrganizer();
5331
.. .
5332
</p>
5333
<h5>Delete ORGANIZER</h5>
5334
<p>Remove ORGANIZER from component.</p>
5335
<p class="label">Format</p>
5336
<p class="format">calendarComponent::deleteProperty( &quot;ORGANIZER&quot; )</p>
5337
<p class="label">Example</p>
5338
<p class="example">&lt;?php
5339
.. .
5340
$vevent-&gt;deleteProperty( &quot;ORGANIZER&quot; );
5341
.. .
5342
</p>
5343
<h5>Get ORGANIZER</h5>
5344
<p>If set, returns property value, otherwise FALSE.</p>
5345
<p class="label">Format 1</p>
5346
<p class="format">calendarComponent::getProperty( &quot;ORGANIZER&quot; )</p>
5347
<p class="comment">output = organizer<sup>1</sup></p>
5348
<p class="label">Format 2</p>
5349
<p class="format">calendarComponent::getProperty( &quot;ORGANIZER&quot;, FALSE , TRUE )</p>
5350
<p class="comment">output = array( &quot;value&quot;  =&gt; organizer<sup>1</sup>
5351
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
5352
<p class="label">Example</p>
5353
<p class="example">&lt;?php
5354
.. .
5355
$organizer = $vevent-&gt;getProperty( &quot;ORGANIZER&quot; );
5356
.. .
5357
</p>
5358
<h5>Set ORGANIZER</h5>
5359
<p>Insert property value.
5360
Property value must be prefixed by protocol (ftp://, http://,mailto:, file://.. . ref. rfc 1738), &quot;mailto:&quot; prefixed if missing.
5361
Also DIR parameter must be prefixed by protocol.
5362
SENT-BY parameter must use protocol &quot;mailto:&quot;, prefixed if missing.
5363
</p>
5364
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
5365
<p class="label">Format</p>
5366
<p class="format">calendarComponent::setProperty( &quot;organizer&quot;, organizer [, params] )</p>
5367
<p class="comment">organizer<sup>1</sup> = (string) a <strong>calendar</strong> user address (cal-address), a URI as defined by
5368
             [RFC 1738] or any other IANA registered form for a URI.
5369
params<sup>2</sup>    = (array) ( [ &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; (applies to the CN parameter value) ]
5370
                       [, &quot;CN&quot;      =&gt; (string) &quot;common name to be associated with the
5371
                                         <strong>calendar</strong> user specified by the property&quot;]
5372
                       [, &quot;DIR&quot;     =&gt; (string) &quot;reference to a directory entry associated
5373
                                         with the <strong>calendar</strong> user specified by the property&quot; ]
5374
                       [, &quot;SENT-BY&quot; =&gt; (string) (cal-address, above)
5375
                                         &quot;single <strong>calendar</strong> user that is acting on behalf
5376
                                         of the <strong>calendar</strong> user specified by the property&quot; ]
5377
                      *[, xparams ]
5378
xparams    = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5379
lang<sup>*</sup>      = as defined in [RFC5646]</p>
5380
<p class="label">Example</p>
5381
<p class="example">&lt;?php
5382
.. .
5383
$dir = &quot;ldap://domain.com:6666/o=3DDC%20Comp,c=3DUS??(cn=3DJohn%20Doe)&quot;;
5384
$vevent-&gt;setProperty( &quot;organizer&quot;
5385
                    , &quot;ical@domain.com&quot;
5386
                    , array( &quot;CN&quot;      =&gt; &quot;John Doe&quot;
5387
                           , &quot;DIR&quot;     =&gt; $dir
5388
                           , &quot;SENT-BY&quot; =&gt; &quot;secretary@domain.com&quot;
5389
                           , &quot;X-Key1&quot;  =&gt; &quot;X-Value1&quot;
5390
                           , &quot;X-Key2&quot;  =&gt; &quot;X-Value2&quot; ));
5391
.. .
5392
</p>
5393
<br>
5394
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5395

    
5396

    
5397
<a name="PERCENT-COMPLETE"></a><h3>3.2.27 PERCENT-COMPLETE</h3>
5398
<p>
5399
This property is used by an assignee or delegatee of a <a href="#VTODO">VTODO</a> to
5400
convey the percent completion of a <a href="#VTODO">VTODO</a> to the Organizer and is
5401
OPTIONAL and MUST NOT occur more than once.
5402
</p>
5403
<p>
5404
The property value is a positive integer between zero and one hundred.
5405
A value of "0" indicates the <a href="#VTODO">VTODO</a> has not yet been started.
5406
A value of "100" indicates that the <a href="#VTODO">VTODO</a> has been completed.
5407
Integer values in between indicate the percent partially complete.
5408
</p>
5409
<h5>Create PERCENT-COMPLETE</h5>
5410
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5411
<p class="label">Format</p>
5412
<p class="format">calendarComponent::createPercentComplete()</p>
5413
<p class="label">Example</p>
5414
<p class="example">&lt;?php
5415
.. .
5416
$str = $component-&gt;createPercentComplete();
5417
.. .
5418
</p>
5419
<h5>Delete PERCENT-COMPLETE</h5>
5420
<p>Remove PERCENT-COMPLETE from component.</p>
5421
<p class="label">Format</p>
5422
<p class="format">calendarComponent::deleteProperty( &quot;PERCENT-COMPLETE&quot; )</p>
5423
<p class="label">Example</p>
5424
<p class="example">&lt;?php
5425
.. .
5426
$vtodo-&gt;deleteProperty( &quot;PERCENT-COMPLETE&quot; )
5427
.. .
5428
</p>
5429
<h5>Get PERCENT-COMPLETE</h5>
5430
<p>If set, returns property value, otherwise FALSE.</p>
5431
<p class="label">Format 1</p>
5432
<p class="format">calendarComponent::getProperty( &quot;PERCENT-COMPLETE&quot; )</p>
5433
<p class="comment">output = percent<sup>1</sup></p>
5434
<p class="label">Format 2</p>
5435
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
5436
<p class="comment">output = array( &quot;value&quot;  =&gt; percent<sup>1</sup>
5437
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
5438
<p class="label">Example</p>
5439
<p class="example">&lt;?php
5440
.. .
5441
$percent = $vtodo-&gt;getProperty( &quot;PERCENT-COMPLETE&quot; );
5442
.. .
5443
</p>
5444
<h5>Set PERCENT-COMPLETE</h5>
5445
<p>Insert property value.</p>
5446
<p class="label">Format</p>
5447
<p class="format">calendarComponent::setProperty( &quot;Percent-Complete&quot;, percent [, xparams ] )</p>
5448
<p class="comment">percent<sup>1</sup> = (int) Value type INTEGER
5449
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5450
</p>
5451
<p class="label">Example</p>
5452
<p class="example">&lt;?php
5453
.. .
5454
$vtodo-&gt;setProperty( &quot;percent-complete&quot;, 90 );
5455
.. .
5456
</p>
5457
<br>
5458
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5459

    
5460

    
5461
<a name="PRIORITY"></a><h3>3.2.28 PRIORITY</h3>
5462
<p>
5463
The property defines the relative priority for a <strong>calendar</strong> component and is OPTIONAL
5464
and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
5465
</p>
5466
<p>
5467
The priority is specified as an integer in the range zero to nine.<br>
5468
A value of zero (US-ASCII decimal 48) specifies an undefined priority.<br>
5469
A value of one (US-ASCII decimal 49) is the highest priority.<br>
5470
A value of two (US-ASCII decimal 50) is the second highest priority.<br>
5471
Subsequent numbers specify a decreasing ordinal priority.<br>
5472
A value of nine (US-ASCII decimal 58) is the lowest priority.
5473
</p>
5474
<h5>Create PRIORITY</h5>
5475
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5476
<p class="label">Format</p>
5477
<p class="format">calendarComponent::createPriority()</p>
5478
<p class="label">Example</p>
5479
<p class="example">&lt;?php
5480
.. .
5481
$str = $component-&gt;createPriority();
5482
.. .
5483
</p>
5484
<h5>Delete PRIORITY</h5>
5485
<p>Remove PRIORITY from component.</p>
5486
<p class="label">Format</p>
5487
<p class="format">calendarComponent::deleteProperty( &quot;PRIORITY&quot; )</p>
5488
<p class="label">Example</p>
5489
<p class="example">&lt;?php
5490
.. .
5491
$vevent-&gt;deleteProperty( &quot;PRIORITY&quot; );
5492
.. .
5493
</p>
5494
<h5>Get PRIORITY</h5>
5495
<p>If set, returns property value, otherwise FALSE.</p>
5496
<p class="label">Format 1</p>
5497
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot; )</p>
5498
<p class="comment">output = priority<sup>1</sup></p>
5499
<p class="label">Format 2</p>
5500
<p class="format">calendarComponent::getProperty( &quot;PRIORITY&quot;, FALSE , TRUE )</p>
5501
<p class="comment">output = array( &quot;value&quot;  =&gt; priority<sup>1</sup>
5502
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
5503
<p class="label">Example</p>
5504
<p class="example">&lt;?php
5505
.. .
5506
$priority = $vevent-&gt;getProperty( &quot;priority&quot; );
5507
.. .
5508
</p>
5509
<h5>Set PRIORITY</h5>
5510
<p>Insert property value.</p>
5511
<p class="label">Format</p>
5512
<p class="format">calendarComponent::setProperty( &quot;priority&quot;, priority [, xparams ] )</p>
5513
<p class="comment">priority<sup>1</sup> = (int) Value type INTEGER
5514
xparams<sup>2</sup>  = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5515
</p>
5516
<p class="label">Example</p>
5517
<p class="example">&lt;?php
5518
.. .
5519
$vevent-&gt;setProperty( &quot;priority&quot;, 3 );
5520
.. .
5521
</p>
5522
<br>
5523
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5524

    
5525

    
5526
<a name="RDATE"></a><h3>3.2.29 RDATE</h3>
5527
<p>
5528
This property defines the list of date/times for a recurrence set and is OPTIONAL and MAY occur
5529
more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>,
5530
<a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
5531
</p>
5532
<p>
5533
The default value type for RDATE is DATE-TIME, can be set to DATE or PERIOD (params<sup>2</sup>).
5534
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.
5535
</p>
5536
<h5>Create RDATE</h5>
5537
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5538
<p class="label">Format</p>
5539
<p class="format">calendarComponent::createRdate()</p>
5540
<p class="label">Example</p>
5541
<p class="example">&lt;?php
5542
.. .
5543
$str = $component-&gt;createRdate();
5544
.. .
5545
</p>
5546
<h5>Delete RDATE</h5>
5547
<p>Remove RDATE from component.</p>
5548
<p class="label">Format</p>
5549
<p class="format">calendarComponent::deleteProperty( &quot;RDATE&quot; )</p>
5550
<p class="label">Example 1</p>
5551
<p>Delete (single/first) RDATE property.</p>
5552
<p class="example">&lt;?php
5553
.. .
5554
$vtodo-&gt;deleteProperty( &quot;RDATE&quot; );
5555
.. .
5556
</p>
5557
<p class="label">Example 2</p>
5558
<p>Delete RDATE property no 2.</p>
5559
<p class="example">&lt;?php
5560
.. .
5561
$vjournal-&gt;deleteProperty( &quot;RDATE&quot;, 2 );</p>
5562
<p class="label">Example 3</p>
5563
<p>Delete all RDATE properties.</p>
5564
<p class="example">&lt;?php
5565
.. .
5566
while( $vjournal-&gt;deleteProperty( &quot;RDATE&quot; ))
5567
  continue;
5568
.. .
5569
</p>
5570
<h5>Get RDATE</h5>
5571
<p>If set, returns property value, otherwise FALSE.</p>
5572
<p class="label">Format 1</p>
5573
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot; )</p>
5574
<p class="comment">output = dates<sup>1</sup></p>
5575
<p class="label">Format 2</p>
5576
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot;, propOrderNo/FALSE , TRUE )</p>
5577
<p class="comment">propOrderNo = (int) specific property value</p>
5578
<p class="comment">output = array( &quot;value&quot;  =&gt; dates<sup>1</sup>
5579
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
5580
<p class="label">Format 3</p>
5581
<p class="format">calendarComponent::getProperty( &quot;RDATE&quot;, propOrderNo )</p>
5582
<p class="comment">propOrderNo = (int) specific property value</p>
5583
<p class="comment">Get propOrderNo RDATE</p>
5584
<p class="label">Example</p>
5585
<p class="example">&lt;?php
5586
.. .
5587
$rdates = $vevent-&gt;getProperty( &quot;RDATE&quot; );
5588
.. .
5589
</p>
5590
<h5>Set RDATE</h5>
5591
<p>Insert property value.</p>
5592
<p>The value type for RDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
5593
<p>
5594
If DATE value type is set in params (&quot;VALUE&quot; = &quot;DATE&quot;), all timezone or offset in dates are ignored.<br>
5595
If no &quot;VALUE&quot; value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
5596
</p>
5597
<p>
5598
If &quot;TZID&quot; is set in params,
5599
all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
5600
If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
5601
If no &quot;TZID&quot; is set in params and timezone in 1st date, all remaining dates are within this timezone and param &quot;TZID&quot; is set.<br>
5602
If none of the above rules are applicable, DATE-TIME and local date is set default.
5603
</p>
5604
<p>
5605
Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
5606
</p>
5607
<p>RDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
5608
<p>
5609
In spite of the fact that RDATE may contain a (comma separated) list of values,
5610
a strong recommendation is to split a RDATE &quot;list&quot; into multiple single RDATE entrys.
5611
</p>
5612
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
5613
<p class="label">Format</p>
5614
<p class="format">calendarComponent::setProperty( &quot;rdate&quot;, dates [, params [, propOrderNo ]] )</p>
5615
<p class="comment">dates<sup>1</sup>        = (array) ( date2 *[, date2 ] )
5616
date2         = date / (array) ( startdate, enddate/duration )
5617
startdate     = date
5618
enddate       = date
5619
date          = (array) ( (int) year
5620
                        , (int) month
5621
                        , (int) day
5622
                       [, (int) int hour
5623
                        , (int) min
5624
                        , (int) day
5625
                        , tz ] )
5626
date          = (array) ( &quot;year&quot;  =&gt; (int) year
5627
                        , &quot;month&quot; =&gt; (int) month
5628
                        , &quot;day&quot;   =&gt; (int) day
5629
                       [, &quot;hour&quot;  =&gt; (int) hour
5630
                        , &quot;min&quot;   =&gt; (int) min
5631
                        , &quot;sec&quot;   =&gt; (int) sec
5632
                       [, &quot;tz&quot;    =&gt; tz ]] )
5633
                     // <span class="comment">output format</span>
5634
date          = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp [, &quot;tz&quot; =&gt; tz ] )
5635
                // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5636
date          = (string) date/datetime string<sup>*</sup>
5637
tz            = &lt;timezone identifier&gt; / offset
5638
                // <span class="comment">timezone will be used as tzidparam, if tzidparam not set</span>
5639
offset        = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
5640
duration      = (array) ( (int) week/false
5641
                       [, (int) day/false
5642
                        , (int) hour
5643
                        , (int) min
5644
                        , (int) sec] )
5645
duration      = (array) ([  &quot;week&quot; =&gt; (int) week / FALSE ,] /
5646
                         [  &quot;day&quot;  =&gt; (int) day / FALSE
5647
                         [, &quot;hour&quot; =&gt; (int) hour
5648
                          , &quot;min&quot;  =&gt; (int) min
5649
                          , &quot;sec&quot;  =&gt; (int) sec ]] );
5650
                     // <span class="comment">output format, only used keys</span>
5651
duration      = (array) ( &quot;sec&quot;  =&gt; (int) sec );
5652
duration      = (string) duration like &quot;P15DT5H0M20S&quot;
5653
params<sup>2</sup>       = ([tzidparam ( / datetimeparam / dateparam / periodparam )] *[, xparams ] )
5654
tzidparam     = &quot;TZID&quot; =&gt; (string) &lt;timezone identifier&gt;
5655
                // <span class="comment">output as local DATE-TIME with timezone identifier</span>
5656
                // <span class="comment">if tzidparam=&quot;GMT&quot;/&quot;UTC&quot; then</span>
5657
                // <span class="comment">output date-time is suffixed by 'Z'</span>
5658
datetimeparam = &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot;         // <span class="comment">default, output as DATE-TIME</span>
5659
dateparam     = &quot;VALUE&quot; =&gt; &quot;DATE&quot;              // <span class="comment">output as DATE</span>
5660
periodparam   = &quot;VALUE&quot; =&gt; &quot;PERIOD&quot;            // <span class="comment">output as PERIOD (datetime)</span>
5661
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5662
propOrderNo   = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
5663
<br>date/datetime string<sup>*</sup> recommended formats
5664
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
5665
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
5666
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
5667
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
5668
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
5669
    trailing characters (digits), if exists, will be interpreted as offset/timezone
5670
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
5671
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
5672
<p class="label">Example</p>
5673
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>
5674
<p class="example">&lt;?php
5675
.. .
5676
// $rdate1 = array ( 2001, 1, 1, 1, 1, 1 );
5677
// alt.
5678
$rdate1 = array( &quot;year&quot;  =&gt; 2001
5679
               , &quot;month&quot; =&gt; 1
5680
               , &quot;day&quot;   =&gt; 1
5681
               , &quot;hour&quot;  =&gt; 1
5682
               , &quot;min&quot;   =&gt; 1
5683
               , &quot;sec&quot;   =&gt; 1
5684
               , &quot;tz&quot;    =&gt; &quot;GMT&quot; );
5685
$rdate2 = array( 2002, 2, 2, 2, 2, 2, &quot;GMT&quot; );
5686
$rdate3 = &quot;3 March 2003 03.03.03&quot;;
5687
$rdate4 = array( 2004, 4, 4, 4, 4, 4, &quot;GMT&quot; );
5688
$rdate5 = array( 2005, 10, 5, 5, 5, 5 );
5689
$rdate8 = array( &quot;year&quot; =&gt; 2007, &quot;month&quot; =&gt; 7, &quot;day&quot; =&gt; 7 );
5690
$rdur6  = array( &quot;week&quot; =&gt; 0
5691
               , &quot;day&quot;  =&gt; 0
5692
               , &quot;hour&quot; =&gt; 5
5693
               , &quot;min&quot;  =&gt; 5
5694
               , &quot;sec&quot;  =&gt; 5 );
5695
$rdur7  = array( 0, 0, 6 );
5696
  <span class="comment">// duration for 6 hours</span>
5697
$rdur8  = array( &quot;week&quot; =&gt; 8 );
5698
  <span class="comment">// duration for 8 weeks</span>
5699

    
5700
$vevent = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
5701
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate1 ));
5702
  <span class="comment">// one recurrence date, date in 7-params format (DATE-TIME)</span>
5703

    
5704
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate1, $rdate2 ));
5705
  <span class="comment">// two dates, date 7-params format (DATE-TIME)</span>
5706

    
5707
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate1, $rdate2 )
5708
                                    , array( $rdate3, $rdate4 ))
5709
                             , array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
5710
  <span class="comment">// Both fromdate and enddate must have 7 params (DATE-TIME) !!!</span>
5711

    
5712
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate2, $rdur6 ))
5713
                             , array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
5714
  <span class="comment">// one duration (fromdate-duration)</span>
5715

    
5716
$vevent-&gt;setProperty( &quot;rdate&quot;, array( array( $rdate1, $date2 )
5717
                                    , array( $rdate3, $rdur7 ))
5718
                             , array( &quot;VALUE&quot; => &quot;PERIOD&quot; ));
5719
  <span class="comment">// period, pairs of fromdate+enddate and fromdate-duration</span>
5720

    
5721
$vevent-&gt;setProperty( &quot;rdate&quot;, array( $rdate5, $date8 ))
5722
                             , array( &quot;VALUE&quot; => &quot;DATE&quot; ));
5723
  <span class="comment">// dates in DATE format</span>
5724
.. .
5725
</p>
5726
<br>
5727
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5728

    
5729

    
5730
<a name="RECURRENCE-ID"></a><h3>3.2.30 RECURRENCE-ID</h3>
5731
<p>
5732
This property is used in conjunction with the <a href="#UID">UID</a> and <a href="#SEQUENCE">SEQUENCE</a>
5733
property to identify a specific instance of a recurring <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
5734
or <a href="#VJOURNAL">VJOURNAL</a> <strong>calendar</strong> component and is OPTIONAL and MAY NOT occur more than once.
5735
</p>
5736
<p>
5737
The property value is the effective value of the <a href="#DTSTART">DTSTART</a> property of the recurrence instance.
5738
The default value type is DATE-TIME, can be set to DATE (params<sup>2</sup>).
5739
</p>
5740
<p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
5741
<br>
5742
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5743

    
5744

    
5745
<a name="RELATED-TO"></a><h3>3.2.31 RELATED-TO</h3>
5746
<p>
5747
The property is used to represent a relationship or reference between one <strong>calendar</strong> component and another
5748
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.
5749
</p>
5750
<p>
5751
The property value consists of the persistent, globally unique identifier of another <strong>calendar</strong> component.
5752
This value would be represented in a <strong>calendar</strong> component by the <a href="#UID">UID</a> property.
5753
</p>
5754
<p>The value type for RELATED-TO is TEXT.</p>
5755
<h5>Create RELATED-TO</h5>
5756
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5757
<p class="label">Format</p>
5758
<p class="format">calendarComponent::createRelatedTo()</p>
5759
<p class="label">Example</p>
5760
<p class="example">&lt;?php
5761
.. .
5762
$str = $component-&gt;createRelatedTo();
5763
.. .
5764
</p>
5765
<h5>Delete RELATED-TO</h5>
5766
<p>Remove RELATED-TO from component.</p>
5767
<p class="label">Format</p>
5768
<p class="format">calendarComponent::deleteProperty( &quot;RELATED-TO&quot; )</p>
5769
<p class="label">Example 1</p>
5770
<p>Delete /single/first) RELATED-TO property</p>
5771
<p class="example">&lt;?php
5772
.. .
5773
$vtodo-&gt;deleteProperty( &quot;RELATED-TO&quot; )</p>
5774
<p class="label">Example 2</p>
5775
<p>Delete RELATED-TO property no 2.</p>
5776
<p class="example">&lt;?php
5777
.. .
5778
$vjournal-&gt;deleteProperty( &quot;RELATED-TO&quot;, 2 );
5779
.. .
5780
</p>
5781
<p class="label">Example 3</p>
5782
<p>Deleting all RELATED-TO properties.</p>
5783
<p class="example">&lt;?php
5784
.. .
5785
while( $vjournal-&gt;deleteProperty( &quot;RELATED-TO&quot; ))
5786
  continue;
5787
.. .
5788
</p>
5789
<h5>Get RELATED-TO</h5>
5790
<p>If set, returns property value, otherwise FALSE.</p>
5791
<p class="label">Format 1</p>
5792
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot; )</p>
5793
<p class="comment">output = relid<sup>1</sup></p>
5794
<p class="label">Format 2</p>
5795
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot;, propOrderNo/FALSE , TRUE )</p>
5796
<p class="comment">propOrderNo = (int) specific property value</p>
5797
<p class="comment">output = array( &quot;value&quot;  =&gt; relid<sup>1</sup>
5798
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
5799
<p class="label">Format 3</p>
5800
<p class="format">calendarComponent::getProperty( &quot;RELATED-TO&quot;, propOrderNo )</p>
5801
<p class="comment">propOrderNo = (int) specific property value</p>
5802
<p class="comment">Get propOrderNo RELATED-TO</p>
5803
<p class="label">Example</p>
5804
<p class="example">&lt;?php
5805
.. .
5806
$relatedId = $vtodo-&gt;getProperty( &quot;RELATED-TO&quot; );
5807
.. .
5808
</p>
5809
<h5>Set RELATED-TO</h5>
5810
<p>Insert property value.</p>
5811
<p class="label">Format</p>
5812
<p class="format">calendarComponent::setProperty( &quot;Related-To&quot;, relid [, params [, propOrderNo ]] )</p>
5813
<p class="comment">relid<sup>1</sup>      = (string) Value type TEXT.
5814
params<sup>2</sup>     = (array) ( [ reltype ] *[, xparams] )
5815
reltype     = &quot;RELTYPE&quot; =&gt; (&quot;PARENT&quot; (Default)
5816
                          / &quot;CHILD&quot;
5817
                          / &quot;SIBLING&quot;
5818
                          / (string) iana-token
5819
                          / (string) x-name )
5820
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5821
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
5822
</p>
5823
<p class="label">Example</p>
5824
<p class="example">&lt;?php
5825
.. .
5826
$vtodo-&gt;setProperty( &quot;related-to&quot;, &quot;19960401-080045-4000F192713@host.com&quot;);
5827
.. .
5828
</p>
5829
<br>
5830
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5831

    
5832
<a name="REPEAT"></a><h3>3.2.32 REPEAT</h3>
5833
<p>
5834
This property defines the number of time the <a href="#VALARM">ALARM</a> should be repeated, after the initial trigger.
5835
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.
5836
</p>
5837
<p>The value type for REPEAT is INTEGER.</p>
5838
<h5>Create REPEAT</h5>
5839
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5840
<p class="label">Format</p>
5841
<p class="format">calendarComponent::createRepeat()</p>
5842
<p class="label">Example</p>
5843
<p class="example">&lt;?php
5844
.. .
5845
$str = $component-&gt;createRepeat();
5846
.. .
5847
</p>
5848
<h5>Delete REPEAT</h5>
5849
<p>Remove REPEAT from component.</p>
5850
<p class="label">Format</p>
5851
<p class="format">calendarComponent::deleteProperty( &quot;REPEAT&quot; )</p>
5852
<p class="label">Example</p>
5853
<p class="example">&lt;?php
5854
.. .
5855
$valarm-&gt;deleteProperty( &quot;REPEAT&quot; );
5856
.. .
5857
</p>
5858
<h5>Get REPEAT</h5>
5859
<p>If set, returns property value, otherwise FALSE.</p>
5860
<p class="label">Format 1</p>
5861
<p class="format">calendarComponent::getProperty( &quot;REPEAT&quot; )</p>
5862
<p class="comment">output = repeatTimes<sup>1</sup></p>
5863
<p class="label">Format 2</p>
5864
<p class="format">calendarComponent::getProperty( &quot;REPEAT&quot;, FALSE , TRUE )</p>
5865
<p class="comment">output = array( &quot;value&quot;  =&gt; repeatTimes<sup>1</sup>
5866
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
5867
<p class="label">Example</p>
5868
<p class="example">&lt;?php
5869
.. .
5870
$repeat = $vtodo-&gt;getProperty( &quot;REPEAT&quot; );
5871
.. .
5872
</p>
5873
<h5>Set REPEAT</h5>
5874
<p>Insert property value.</p>
5875
<p class="label">Format</p>
5876
<p class="format">calendarComponent::setProperty( &quot;repeat&quot;, repeatTimes [, xparams ] )</p>
5877
<p class="comment">repeatTimes<sup>1</sup> = (int) Value type INTEGER
5878
xparams<sup>2</sup>     = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
5879
</p>
5880
<p class="label">Example</p>
5881
<p class="example">&lt;?php
5882
.. .
5883
$valarm-&gt;setProperty( &quot;repeat&quot;, 2 );
5884
.. .
5885
</p>
5886
<br>
5887
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5888

    
5889

    
5890
<a name="REQUEST-STATUS"></a><h3>3.2.33 REQUEST-STATUS</h3>
5891
<p>
5892
This property defines the status code returned for a scheduling request and is OPTIONAL and
5893
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.
5894
</p>
5895
<p>The value type for REQUEST-STATUS is TEXT and consists of</p>
5896
<dl>
5897
<dt>a short return status component,
5898
<dd>(in output) a PERIOD character separated 3-tuple of integers, ex 3.11
5899
<dt>a longer return status description component
5900
<dt>optionally a statusspecific data component
5901
</dl>
5902
<p>In output, the components are separated by (BACKSLASHed) SEMICOLON.</p>
5903
<h5>Create REQUEST-STATUS</h5>
5904
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5905
<p class="label">Format</p>
5906
<p class="format">calendarComponent::createRequestStatus()</p>
5907
<p class="label">Example</p>
5908
<p class="example">&lt;?php
5909
.. .
5910
$str = $component-&gt;createRequestStatus();
5911
.. .
5912
</p>
5913
<h5>Delete REQUEST-STATUS</h5>
5914
<p>Remove REQUEST-STATUS from component.</p>
5915
<p class="label">Format</p>
5916
<p class="format">calendarComponent::deleteProperty( &quot;REQUEST-STATUS&quot; )</p>
5917
<p class="label">Example 1</p>
5918
<p>Delete (single/first) REQUEST-STATUS property.</p>
5919
<p class="example">&lt;?php
5920
.. .
5921
$vtodo-&gt;deleteProperty( &quot;REQUEST-STATUS&quot; );
5922
.. .
5923
</p>
5924
<p class="label">Example 2</p>
5925
<p>Delete REQUEST-STATUS property no 2.</p>
5926
<p class="example">&lt;?php
5927
.. .
5928
$vjournal-&gt;deleteProperty( &quot;REQUEST-STATUS&quot;, 2 );
5929
.. .
5930
</p>
5931
<p class="label">Example 3</p>
5932
<p>Deleting all REQUEST-STATUS properties.</p>
5933
<p class="example">&lt;?php
5934
.. .
5935
while( $vjournal-&gt;deleteProperty( &quot;REQUEST-STATUS&quot; ))
5936
  continue;
5937
.. .
5938
</p>
5939
<h5>Get REQUEST-STATUS</h5>
5940
<p>If set, returns property value, otherwise FALSE.</p>
5941
<p class="label">Format 1</p>
5942
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot; )</p>
5943
<p class="comment">output = array( &quot;statcode&quot; =&gt; statcode<sup>1</sup>
5944
              , &quot;text&quot;     =&gt; errtext<sup>2</sup>
5945
            [ , &quot;extdata&quot;  =&gt; extraData<sup>3</sup> ] )</p>
5946
<p class="label">Format 2</p>
5947
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot;, propOrderNo/FALSE, TRUE )</p>
5948
<p class="comment">propOrderNo = (int) specific property value</p>
5949
<p class="comment">output = array( &quot;value&quot; =&gt; array( &quot;statcode&quot; =&gt; statcode<sup>1</sup>
5950
                                , &quot;text&quot;     =&gt; errtext<sup>2</sup>
5951
                              [ , &quot;extdata&quot;  =&gt; extraData<sup>3</sup> ] )
5952
              , &quot;params&quot; =&gt; params<sup>4</sup> )</p>
5953
<p class="label">Format 3</p>
5954
<p class="format">calendarComponent::getProperty( &quot;REQUEST-STATUS&quot;, propOrderNo )</p>
5955
<p class="comment">propOrderNo = (int) specific property value</p>
5956
<p class="comment">Get propOrderNo REQUEST-STATUS</p>
5957
<p class="label">Example</p>
5958
<p class="example">&lt;?php
5959
.. .
5960
$requestStatus = $vtodo-&gt;getProperty( &quot;REQUEST-STATUS&quot; );
5961
.. .
5962
</p>
5963
<h5>Set REQUEST-STATUS</h5>
5964
<p>Insert property value.</p>
5965
<p class="label">Format</p>
5966
<p class="format">calendarComponent::setProperty( &quot;Request-Status&quot;
5967
           , statcode, errtext [,extraData/FALSE [,params [,propOrderNo]]])</p>
5968
<p class="comment">statcode<sup>1</sup>   = (int) Hierarchical, numeric return status code
5969
                          (1*DIGIT &quot;.&quot; 1*DIGIT 1*DIGIT)
5970
errtext<sup>2</sup>    = (string) Textual status description
5971
extraData<sup>3</sup>  = (string) Textual exception data.
5972
             For example, the offending property name and value
5973
             or complete property line.
5974
params<sup>4</sup>     = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams ] )
5975
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
5976
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
5977
lang<sup>*</sup>       = as defined in [RFC5646]</p>
5978
<p class="label">Example</p>
5979
<p class="example">&lt;?php
5980
.. .
5981
$vfreebusy-&gt;setProperty(&quot;request-status&quot;
5982
                       , 2.00
5983
                       , &quot;Invalid property value&quot;
5984
                       , &quot;DTSTART:96-Apr-31&quot;);
5985
.. .
5986
</p>
5987
<br>
5988
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
5989

    
5990

    
5991
<a name="RESOURCES"></a><h3>3.2.34 RESOURCES</h3>
5992
<p>
5993
This property defines the equipment or resources anticipated for an activity specified by a <strong>calendar</strong> entity
5994
and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
5995
</p>
5996
<p>The value type for RESOURCES is TEXT.</p>
5997
<h5>Create RESOURCES</h5>
5998
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
5999
<p class="label">Format</p>
6000
<p class="format">calendarComponent::createResources()</p>
6001
<p class="label">Example</p>
6002
<p class="example">&lt;?php
6003
.. .
6004
$str = $component-&gt;createResources();
6005
.. .
6006
</p>
6007
<h5>Delete RESOURCES</h5>
6008
<p>Remove RESOURCES from component.</p>
6009
<p class="label">Format</p>
6010
<p class="format">calendarComponent::deleteProperty( &quot;RESOURCES&quot; )</p>
6011
<p class="label">Example 1</p>
6012
<p>Delete (single/first) RESOURCES property.</p>
6013
<p class="example">&lt;?php
6014
.. .
6015
$vevent-&gt;deleteProperty( &quot;RESOURCES&quot; );
6016
.. .
6017
</p>
6018
<p class="label">Example 2</p>
6019
<p>Delete RESOURCES property no 2.</p>
6020
<p class="example">&lt;?php
6021
.. .
6022
$vevent-&gt;deleteProperty( &quot;RESOURCES&quot;, 2 );
6023
.. .
6024
</p>
6025
<p class="label">Example 3</p>
6026
<p>Delete all RESOURCES properties.<p>
6027
<p class="example">&lt;?php
6028
.. .
6029
while( $vevent-&gt;deleteProperty( &quot;RESOURCES&quot; ))
6030
  continue;
6031
.. .
6032
</p>
6033
<h5>Get RESOURCES</h5>
6034
<p>If set, returns property value, otherwise FALSE.</p>
6035
<p class="label">Format 1</p>
6036
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot; )</p>
6037
<p class="comment">output = resources<sup>1</sup></p>
6038
<p class="label">Format 2</p>
6039
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot;, propOrderNo/FALSE, TRUE )</p>
6040
<p class="comment">propOrderNo = (int) specific property value</p>
6041
<p class="comment">output = array( &quot;value&quot;  =&gt; resources<sup>1</sup>
6042
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
6043
<p class="label">Format 3</p>
6044
<p class="format">calendarComponent::getProperty( &quot;RESOURCES&quot;, propOrderNo )</p>
6045
<p class="comment">propOrderNo = (int) specific property value</p>
6046
<p class="comment">Get propOrderNo RESOURCES</p>
6047
<p class="label">Example</p>
6048
<p class="example">&lt;?php
6049
.. .
6050
$resources = $vtodo-&gt;getProperty( &quot;RESOURCES&quot; );
6051
.. .
6052
</p>
6053
<h5>Set RESOURCES</h5>
6054
<p>Insert property value.</p>
6055
<p>
6056
In spite of the fact that RESOURCES may contain a (comma separated) list of values,
6057
a strong recommendation is to split a RESOURCES &quot;list&quot; into multiple single RESOURCES entrys.
6058
</p>
6059
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
6060
<p class="label">Format</p>
6061
<p class="format">calendarComponent::setProperty( &quot;resources&quot;, resources [, params [, propOrderNo ]] )</p>
6062
<p class="comment">resources<sup>1</sup>  = (string) resource / (array) ( *resource )
6063
resource    = (string) textual resources or subtypes of the <strong>calendar</strong> component,
6064
                       can be specified as a list of resources
6065
                       separated by the COMMA character.
6066
params<sup>2</sup>     = (array) (
6067
                   [ &quot;ALTREP&quot; =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
6068
                   [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
6069
                  *[, xparams] )
6070
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6071
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
6072
lang<sup>*</sup>       = as defined in [RFC5646]</p>
6073
<p class="label">Example</p>
6074
<p class="example">&lt;?php
6075
.. .
6076
$vevent-&gt;setProperty( &quot;resources&quot;, &quot;COMPUTER PROJECTOR&quot; );
6077
.. .
6078
</p>
6079
<br>
6080
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6081

    
6082

    
6083
<a name="RRULE"></a><h3>3.2.35 RRULE</h3>
6084
<p>
6085
This property defines a rule or repeating pattern for recurring <a href="#VEVENT">EVENTs</a>, <a href="#VTODO">TODOs</a>,
6086
<a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> definitions and is OPTIONAL and MAY occur more than once ([RFC2445]),
6087
SHOULD NOT occur more than once ([RFC5545]).
6088
</p>
6089
<h5>Create RRULE</h5>
6090
<p>If set, returns iCal formatted string, otherwise FALSE.</p>
6091
<p class="label">Format</p>
6092
<p class="format">calendarComponent::createRrule()</p>
6093
<p class="label">Example</p>
6094
<p class="example">&lt;?php
6095
.. .
6096
$str = $component-&gt;createRrule();
6097
.. .
6098
</p>
6099
<h5>Delete RRULE</h5>
6100
<p>Remove RRULE from component.</p>
6101
<p class="label">Format</p>
6102
<p class="format">calendarComponent::deleteProperty( &quot;RRULE&quot; )</p>
6103
<p class="label">Example 1</p>
6104
<p>Delete (single/first) RRULE property.</p>
6105
<p class="example">&lt;?php
6106
.. .
6107
$vevent-&gt;deleteProperty( &quot;RRULE&quot; );
6108
.. .
6109
</p>
6110
<p class="label">Example 2</p>
6111
<p>Delete RRULE property no 2.</p>
6112
<p class="example">&lt;?php
6113
.. .
6114
$vevent-&gt;deleteProperty( &quot;RRULE&quot;, 2 );
6115
.. .
6116
</p>
6117
<p class="label">Example 3</p>
6118
<p>Delete all RRULE properties.</p>
6119
<p class="example">&lt;?php
6120
.. .
6121
while( $vevent-&gt;deleteProperty( &quot;RRULE&quot; ))
6122
  continue;
6123
.. .
6124
</p>
6125
<h5>Get RRULE</h5>
6126
<p>If set, returns property value, otherwise FALSE.</p>
6127
<p class="label">Format 1</p>
6128
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot; )</p>
6129
<p class="comment">output = recur<sup>1</sup></p>
6130
<p class="label">Format 2</p>
6131
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot;, propOrderNo/FALSE, TRUE )</p>
6132
<p class="comment">propOrderNo = (int) specific property value</p>
6133
<p class="comment">output = array( &quot;value&quot;  =&gt; recur<sup>1</sup>
6134
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6135
<p class="label">Format 3</p>
6136
<p class="format">calendarComponent::getProperty( &quot;RRULE&quot;, propOrderNo )</p>
6137
<p class="comment">propOrderNo = (int) specific property value</p>
6138
<p class="comment">Get propOrderNo RRULE</p>
6139
<p class="label">Example</p>
6140
<p class="example">&lt;?php
6141
.. .
6142
$rrules = $vtodo-&gt;getProperty( &quot;RRULE&quot; );
6143
.. .
6144
</p>
6145
<h5>Set RRULE</h5>
6146
<p>Insert property value.</p>
6147
<p>Parameters will be ordered as prescribed in [RFC5545].</p>
6148
<p class="label">Format</p>
6149
<p class="format">calendarComponent::setProperty( &quot;rrule&quot;, recur [, xparams [, propOrderNo ]] )</p>
6150
<p>
6151
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).
6152
</p>
6153
<p class="comment">recur<sup>1</sup>      = see <a href="#EXRULE">Exrule</a>
6154
xparams<sup>2</sup>    = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6155
propOrderNo = (int) order number                              // <span class="comment">1=1st, 2=2nd etc</span>
6156
</p>
6157
<br>
6158
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6159

    
6160
<a name="SEQUENCE"></a><h3>3.2.36 SEQUENCE</h3>
6161
<p>
6162
This property defines the revision sequence number of the <strong>calendar</strong> component within a sequence of revisions.
6163
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
6164
<a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
6165
</p>
6166
<p class="quotes">
6167
It is monotonically incremented by the <a href="#ORGANIZER">ORGANIZER's</a> CUA (Calendar
6168
User Agent) each time the <a href="#ORGANIZER">ORGANIZER</a> makes a significant revision
6169
to the <strong>calendar</strong> component.
6170
<br><br>
6171
When the <a href="#ORGANIZER">ORGANIZER</a> makes changes to one of the following
6172
properties, the sequence number MUST be incremented: <a href="#DTSTART">DTSTART</a>,
6173
<a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a>, <a href="#RDATE">RDATE</a>, <a href="#RRULE">RRULE</a>,
6174
<a href="#EXDATE">EXDATE</a>, <a href="#EXRULE">EXRULE</a>, <a href="#STATUS">STATUS</a>. In addition,
6175
changes made by the <a href="#ORGANIZER">ORGANIZER</a> to other properties can also force
6176
the sequence number to be incremented. The <a href="#ORGANIZER">ORGANIZER</a> CUA MUST
6177
increment the sequence number when ever it makes changes to
6178
properties in the <strong>calendar</strong> component that the <a href="#ORGANIZER">ORGANIZER</a>
6179
deems will jeopardize the validity of the participation status of the
6180
<a href="#ATTENDEE">Attendees</a>. For example, changing the location
6181
of a meeting from one locale to another distant locale could
6182
effectively impact the participation status of the <a href="#ATTENDEE">Attendees</a>.
6183
</p>
6184
<p>The value type of SEQUENCE is INTEGER.</p>
6185
<h5>Create SEQUENCE</h5>
6186
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6187
<p class="label">Format</p>
6188
<p class="format">calendarComponent::createSequence()</p>
6189
<p class="label">Example</p>
6190
<p class="example">&lt;?php
6191
.. .
6192
$str = $component-&gt;createSequence();
6193
.. .
6194
</p>
6195
<h5>Delete SEQUENCE</h5>
6196
<p>Remove SEQUENCE from component.</p>
6197
<p class="label">Format</p>
6198
<p class="format">calendarComponent::deleteProperty( &quot;SEQUENCE&quot; )</p>
6199
<p class="label">Example</p>
6200
<p class="example">&lt;?php
6201
.. .
6202
$vtodo-&gt;deleteProperty( &quot;SEQUENCE&quot; );
6203
.. .
6204
</p>
6205
<h5>Get SEQUENCE</h5>
6206
<p>If set, returns property value, otherwise FALSE.</p>
6207
<p class="label">Format 1</p>
6208
<p class="format">calendarComponent::getProperty( &quot;SEQUENCE&quot; )</p>
6209
<p class="comment">output = sequence<sup>1</sup></p>
6210
<p class="label">Format 2</p>
6211
<p class="format">calendarComponent::getProperty( &quot;SEQUENCE&quot;, FALSE , TRUE )</p>
6212
<p class="comment">output = array( &quot;value&quot;  =&gt; sequence<sup>1</sup>
6213
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6214
<p class="label">Example</p>
6215
<p class="example">&lt;?php
6216
.. .
6217
$sequence = $vtodo-&gt;getProperty( &quot;SEQUENCE&quot; );
6218
.. .
6219
</p>
6220
<h5>Set SEQUENCE</h5>
6221
<p>Insert property value.</p>
6222
<p class="label">Format</p>
6223
<p class="format">calendarComponent::setProperty( &quot;sequence&quot; [, sequence [, xparams ]] )</p>
6224
<p class="comment">sequence<sup>1</sup> = (int) Value type INTEGER
6225
xparams<sup>2</sup>  = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6226
</p>
6227
<p class="label">Example 1</p>
6228
<p class="example">&lt;?php
6229
.. .
6230
$vevent-&gt;setProperty( &quot;sequence&quot;, 2 ); <span class="comment">// set sequence number to 2</span>
6231
.. .
6232
</p>
6233
<p class="label">Example 2</p>
6234
<p class="example">&lt;?php
6235
.. .
6236
$vevent-&gt;setProperty( &quot;sequence&quot; ); <span class="comment">// force sequence number to be set to 0
6237
                                                                        // or, if sequence exists, incremented by 1</span>
6238
.. .
6239
</p>
6240
<br>
6241
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6242

    
6243

    
6244
<a name="STATUS"></a><h3>3.2.37 STATUS</h3>
6245
<p>
6246
This property defines the overall status or confirmation for the <strong>calendar</strong> component.
6247
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
6248
and <a href="#VJOURNAL">VJOURNAL</a> components.
6249
</p>
6250
<h5>Create STATUS</h5>
6251
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6252
<p class="label">Format</p>
6253
<p class="format">calendarComponent::createStatus()</p>
6254
<p class="label">Example</p>
6255
<p class="example">&lt;?php
6256
.. .
6257
$str = $component-&gt;createStatus();
6258
.. .
6259
</p>
6260
<h5>Delete STATUS</h5>
6261
<p>Remove STATUS from component.</p>
6262
<p class="label">Format</p>
6263
<p class="format">calendarComponent::deleteProperty( &quot;STATUS&quot; )</p>
6264
<p class="label">Example</p>
6265
<p class="example">&lt;?php
6266
.. .
6267
$vtodo-&gt;deleteProperty( &quot;STATUS&quot; );
6268
.. .
6269
</p>
6270
<h5>Get STATUS</h5>
6271
<p>If set, returns property value, otherwise FALSE.</p>
6272
<p class="label">Format 1</p>
6273
<p class="format">calendarComponent::getProperty( &quot;STATUS&quot; )</p>
6274
<p class="comment">output = status<sup>1</sup></p>
6275
<p class="label">Format 2</p>
6276
<p class="format">calendarComponent::getProperty( &quot;STATUS&quot;, FALSE , TRUE )</p>
6277
<p class="comment">output = array( &quot;value&quot;  =&gt; status<sup>1</sup>
6278
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6279
<p class="label">Example</p>
6280
<p class="example">&lt;?php
6281
.. .
6282
$status = $vtodo-&gt;getProperty( &quot;STATUS&quot; );
6283
.. .
6284
</p>
6285
<h5>Set STATUS</h5>
6286
<p>Insert property value.</p>
6287
<p class="label">Format</p>
6288
<p class="format">calendarComponent::setProperty( &quot;status&quot;, status [, xparams ] )</p>
6289
<p class="comment">                          // <span class="comment">Status values for a <a href="#vevent">VEVENT</a></span>
6290
status<sup>1</sup>  = &quot;TENTATIVE&quot;    // <span class="comment">Indicates event is tentative</span>
6291
         / &quot;CONFIRMED&quot;    // <span class="comment">Indicates event is definite</span>
6292
         / &quot;CANCELLED&quot;    // <span class="comment">Indicates event was cancelled</span>
6293
                          // <span class="comment">Status values for <a href="#VTODO">VTODO</a></span>
6294
status<sup>1</sup>  = &quot;NEEDS-ACTION&quot; // <span class="comment">Indicates to-do needs action</span>
6295
         / &quot;COMPLETED&quot;    // <span class="comment">Indicates to-do completed</span>
6296
         / &quot;IN-PROCESS&quot;   // <span class="comment">Indicates to-do in process of</span>
6297
         / &quot;CANCELLED&quot;    // <span class="comment">Indicates to-do was cancelled</span>
6298
                          // <span class="commsnt">Status values for <a href="#VJOURNAL">VJOURNAL</a></span>
6299
status<sup>1</sup>  = &quot;DRAFT&quot;        // <span class="comment">Indicates journal is draft</span>
6300
         / &quot;FINAL&quot;        // <span class="comment">Indicates journal is final</span>
6301
         / &quot;CANCELLED&quot;    // <span class="comment">Indicates journal is removed</span>
6302
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6303
</p>
6304
<p class="label">Example</p>
6305
<p class="example">&lt;?php
6306
.. .
6307
$vevent-&gt;setProperty( &quot;Status&quot;, &quot;COMPLETED&quot; );
6308
.. .
6309
</p>
6310
<br>
6311
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6312

    
6313

    
6314
<a name="SUMMARY"></a><h3>3.2.38 SUMMARY</h3>
6315
<p>
6316
This property defines a short (&quot;one line&quot;) summary or subject for the <strong>calendar</strong> component.
6317
(In &quot;[RFC5545], Recommended Practices&quot;, up to 255 characters) (, analogous to a mail SUBJECT).
6318
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
6319
and <a href="#VJOURNAL">VJOURNAL</a> components. The property is REQUIRED and MUST occur once in
6320
<a href="#VALARM">VALARM</a> (EMAIL) <strong>calendar</strong> component.
6321
</p>
6322
<p>The value type for SUMMARY is TEXT.</p>
6323
<h5>Create SUMMARY</h5>
6324
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6325
<p class="label">Format</p>
6326
<p class="format">calendarComponent::createSummary()</p>
6327
<p class="label">Example</p>
6328
<p class="example">&lt;?php
6329
.. .
6330
$str = $component-&gt;createSummary();
6331
.. .
6332
</p>
6333
<h5>Delete SUMMARY</h5>
6334
<p>Remove SUMMARY from component.</p>
6335
<p class="label">Format</p>
6336
<p class="format">calendarComponent::deleteProperty( &quot;SUMMARY&quot; )</p>
6337
<p class="label">Example</p>
6338
<p class="example">&lt;?php
6339
.. .
6340
$vevent-&gt;deleteProperty( &quot;SUMMARY&quot; );
6341
.. .
6342
</p>
6343
<h5>Get SUMMARY</h5>
6344
<p>If set, returns property value, otherwise FALSE.</p>
6345
<p class="label">Format 1</p>
6346
<p class="format">calendarComponent::getProperty( &quot;SUMMARY&quot; )</p>
6347
<p class="comment">output = summary<sup>1</sup></p>
6348
<p class="label">Format 2</p>
6349
<p class="format">calendarComponent::getProperty( &quot;SUMMARY&quot;, FALSE , TRUE )</p>
6350
<p class="comment">output = array( &quot;value&quot;  =&gt; summary<sup>1</sup>
6351
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
6352
<p class="label">Example</p>
6353
<p class="example">&lt;?php
6354
.. .
6355
$summary = $vtodo-&gt;getProperty( &quot;SUMMARY&quot; );
6356
.. .
6357
</p>
6358
<h5>Set SUMMARY</h5>
6359
<p>Insert property value.</p>
6360
<p>Parameters, if any, will be ordered as prescribed in [RFC5545].</p>
6361
<p class="label">Format</p>
6362
<p class="format">calendarComponent::setProperty( &quot;summary&quot;, summary [, params ] )</p>
6363
<p CLASS="comment">summary<span class="comment">1</span> = (string) Value type TEXT,
6364
           a short, one line summary about the activity or journal entry.
6365
params<sup>2</sup>  = array( [&quot;ALTREP&quot;   =&gt; (string) &quot;&lt;an alternate text representation, URI&gt;&quot;]
6366
                [, &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;]
6367
               *[, xparams ] )
6368
xparams  = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6369
lang<sup>*</sup>    = as defined in [RFC5646]</p>
6370
<p class="label">Example</p>
6371
<p class="example">&lt;?php
6372
.. .
6373
$vevent-&gt;setProperty( &quot;summary&quot;, &quot;This is a summary&quot; );
6374
.. .
6375
</p>
6376
<br>
6377
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6378

    
6379

    
6380
<a name="TRANSP"></a><h3>3.2.39 TRANSP</h3>
6381
<p>
6382
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.
6383
</p>
6384
<h5>Create TRANSP</h5>
6385
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6386
<p class="label">Format</p>
6387
<p class="format">calendarComponent::createTransp()</p>
6388
<p class="label">Example</p>
6389
<p class="example">&lt;?php
6390
.. .
6391
$str = $component-&gt;createTransp();
6392
.. .
6393
</p>
6394
<h5>Delete TRANSP</h5>
6395
<p>Remove TRANSP from component.</p>
6396
<p class="label">Format</p>
6397
<p class="format">calendarComponent::deleteProperty( &quot;TRANSP&quot; )</p>
6398
<p class="label">Example</p>
6399
<p class="example">&lt;?php
6400
.. .
6401
$vevent-&gt;deleteProperty( &quot;TRANSP&quot; );
6402
.. .
6403
</p>
6404
<h5>Get TRANSP</h5>
6405
<p>If set, returns property value, otherwise FALSE.</p>
6406
<p class="label">Format 1</p>
6407
<p class="format">calendarComponent::getProperty( &quot;TRANSP&quot; )</p>
6408
<p class="comment">output = transp<sup>1</sup></p>
6409
<p class="label">Format 2</p>
6410
<p class="format">calendarComponent::getProperty( &quot;TRANSP&quot;, FALSE , TRUE )</p>
6411
<p class="comment">output = array( &quot;value&quot;  =&gt; transp<sup>1</sup>
6412
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6413
<p class="label">Example</p>
6414
<p class="example">&lt;?php
6415
.. .
6416
$transp = $vtodo-&gt;getProperty( &quot;TRANSP&quot; );
6417
.. .
6418
</p>
6419
<h5>Set TRANSP</h5>
6420
<p>Insert property value.</p>
6421
<p class="label">Format</p>
6422
<p class="format">calendarComponent::setProperty( &quot;transp&quot;, transp [, xparams ] )</p>
6423
<p class="comment">transp<span class="comment">1</span>  = &quot;OPAQUE&quot; / &quot;TRANSPARENT&quot;
6424
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6425
</p>
6426
<p class="label">Example</p>
6427
<p class="example">&lt;?php
6428
.. .
6429
$vevent-&gt;setProperty( &quot;transp&quot;, &quot;TRANSPARENT&quot; );
6430
.. .
6431
</p>
6432
<br>
6433
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6434

    
6435

    
6436
<a name="TRIGGER"></a><h3>3.2.40 TRIGGER</h3>
6437
<p>
6438
This property specifies when an <a href="#VALARM">ALARM</a> will trigger and is REQUIRED and MUST NOT occur more than once.
6439
</p>
6440
<p>
6441
The default value type is DURATION. The value type can be set to a DATE-TIME value type,
6442
in which case the value MUST specify an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value.
6443
</p>
6444
<h5>Create TRIGGER</h5>
6445
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6446
<p class="label">Format</p>
6447
<p class="format">valarm::createTrigger()</p>
6448
<p class="label">Example</p>
6449
<p class="example">&lt;?php
6450
.. .
6451
$str = $component-&gt;createTrigger();
6452
.. .
6453
</p>
6454
<h5>Delete TRIGGER</h5>
6455
<p>Remove TRIGGER from component.</p>
6456
<p class="label">Format</p>
6457
<p class="format">valarm::deleteProperty( &quot;TRIGGER&quot; )</p>
6458
<p class="label">Example</p>
6459
<p class="example">&lt;?php
6460
.. .
6461
$valarm-&gt;deleteProperty( &quot;TRIGGER&quot; );
6462
.. .
6463
</p>
6464
<h5>Get TRIGGER</h5>
6465
<p>If set, returns property value, otherwise FALSE.</p>
6466
<p class="label">Format 1</p>
6467
<p class="format">valarm::getProperty( &quot;TRIGGER&quot; )</p>
6468
<p class="comment">output = duration/date</p>
6469
<p class="label">Format 2</p>
6470
<p class="format">valarm::getProperty( &quot;TRIGGER&quot;, FALSE , TRUE )</p>
6471
<p class="comment">output   = array( &quot;value&quot;        =&gt; duration<sup>1</sup>/date<sup>3</sup> )
6472
                , &quot;params&quot;       =&gt; params<sup>4</sup> )
6473
<p class="label">Example</p>
6474
<p class="example">&lt;?php
6475
.. .
6476
$trigger = $vtodo-&gt;getProperty( &quot;TRIGGER&quot; );
6477
.. .
6478
</p>
6479
<h5>Set TRIGGER</h5>
6480
<p>Insert property value.</p>
6481
<p>Note, use function <a href="#transformDateTime">transformDateTime</a> to change a (local) datetime to UTC time zone.</p>
6482
<p class="label">Format 1</p>
6483
<p class="format">valarm::setProperty( &quot;trigger&quot;, duration<sup>1</sup> [, params<sup>4</sup> ] )</p>
6484
<p class="label">Format 2</p>
6485
<p class="format">valarm::setProperty( &quot;trigger&quot;, duration<sup>2</sup> [, params<sup>4</sup> ] )</p>
6486
<p class="label">Format 3</p>
6487
<p class="format">valqarm::setProperty( &quot;trigger&quot;, date<sup>3</sup> [, params<sup>4</sup> ] )</p>
6488
<p class="label">Format</p>
6489
<p class="format">valarm::setProperty( &quot;trigger&quot;, (int) year / FALSE
6490
                      , (int) month / FALSE
6491
                      , (int) day / FALSE
6492
                     [, (int) week / FALSE
6493
                     [, (int) hour / FALSE
6494
                      , (int) min / FALSE
6495
                      , (int) sec / FALSE
6496
                     [, relatedStart
6497
                     [, before
6498
                     [, params<sup>4</sup> ]]]]] )</p>
6499
<p class="comment">duration<sup>1</sup> = (array) ( &quot;week&quot;     =&gt; (int) week
6500
                , &quot;relatedStart&quot; =&gt; relatedStart
6501
                , &quot;before&quot;       =&gt; before )
6502
duration<sup>1</sup> = (array) ( &quot;day&quot;  =&gt; (int) day
6503
                , &quot;hour&quot; =&gt; (int) hour
6504
                , &quot;min&quot;  =&gt; (int) min
6505
                , &quot;sec&quot;  =&gt; (int) sec
6506
                , &quot;relatedStart&quot; =&gt; relatedStart
6507
                , &quot;before&quot;       =&gt; before )
6508
relatedStart = (bool) TRUE  : related start (default),
6509
                      FALSE : related end
6510
before       = (booL) TRUE  : before relatedStart (default),
6511
                      FALSE : after relatedStart
6512
duration<sup>2</sup> = (string) dur-value = ([&quot;+&quot;]/&quot;-&quot;)&quot;P&quot;(dur-date/dur-time/dur-week)
6513
dur-date     = dur-day [dur-time]
6514
dur-time     = &quot;T&quot; (dur-hour / dur-minute / dur-second)
6515
dur-week     = 1*DIGIT &quot;W&quot;
6516
dur-day      = 1*DIGIT &quot;D&quot;
6517
dur-hour     = 1*DIGIT &quot;H&quot; [dur-minute]
6518
dur-minute   = 1*DIGIT &quot;M&quot; [dur-second]
6519
dur-second   = 1*DIGIT &quot;S&quot;
6520
date<sup>3</sup>        = (array) ( &quot;year&quot;  =&gt; (int) year // <span class="comment"><a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
6521
                       , &quot;month&quot; =&gt; (int) month
6522
                       , &quot;day&quot;   =&gt; (int) day
6523
                      [, &quot;hour&quot;  =&gt; (int) hour
6524
                       , &quot;min&quot;   =&gt; (int) min
6525
                       , &quot;sec&quot;   =&gt; (int) sec ])
6526
date<sup>3</sup>        = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment"><a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
6527
date<sup>3</sup>        = (string) datetime string<sup>*</sup>
6528
params<sup>4</sup>      = (array) ( [[ reltype [, trigRelparam ]] / datetimeparam ] *[, xparams ] )
6529
reltyp       = &quot;RELATED&quot; =&gt; &quot;START&quot; (default) / &quot;END&quot;
6530
trigRelparam = &quot;VALUE&quot; =&gt; &quot;DURATION&quot;
6531
datetimeparam= &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; // <span class="comment">mandatory if DATE-TIME</span>
6532
xparams      = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6533
<br>datetime string<sup>*</sup> recommended formats
6534
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
6535
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
6536
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
6537
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
6538
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
6539
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
6540
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
6541
<p class="label">Example 1</p>
6542
<p>A duration, 1 hour 2 min 3 sec, before start</p>
6543
<p class="example">&lt;?php
6544
.. .
6545
$valarm-&gt;setProperty( &quot;trigger&quot;
6546
                    , FALSE, FALSE, FALSE, FALSE, 1, 2, 3 );
6547
.. .
6548
</p>
6549
<p class="label">Example 2</p>
6550
<p>A duration, 1 hour 2 min 3 sec, before start</p>
6551
<p class="example">&lt;?php
6552
.. .
6553
$valarm-&gt;setProperty( &quot;trigger&quot;
6554
                    , array (&quot;hour&quot;=&gt;1,&quot;min&quot;=&gt;2,&quot;sec&quot;=&gt;3 );
6555
.. .
6556
</p>
6557
<p class="label">Example 3</p>
6558
<p>A duration, 1 hour 2 min 3 sec, before start</p>
6559
<p class="example">&lt;?php
6560
.. .
6561
$valarm-&gt;setProperty( &quot;trigger&quot;
6562
                    , &quot;PT1H2M3S&quot; );
6563
.. .
6564
</p>
6565
<p class="label">Example 4</p>
6566
<p>A duration, 1 week after end.</p>
6567
<p class="example">&lt;?php
6568
.. .
6569
$valarm-&gt;setProperty( &quot;trigger&quot;
6570
                    , FALSE, FALSE, FALSE, 1
6571
                    , FALSE, FALSE, FALSE, FALSE, FALSE );
6572
.. .
6573
</p>
6574
<p class="label">Example 5</p>
6575
<p>A duration, 1 week after end.</p>
6576
<p class="example">&lt;?php
6577
.. .
6578
$valarm-&gt;setProperty( &quot;trigger&quot;
6579
                    , array ( &quot;week&quot; =&gt; 1
6580
                            , &quot;relatedStart&quot; =&gt; FALSE
6581
                            , &quot;before&quot;       =&gt; FALSE ));
6582
.. .
6583
</p>
6584
<p class="label">Example 6</p>
6585
<p>A duration, 1 week after end.</p>
6586
<p class="example">&lt;?php
6587
.. .
6588
$valarm-&gt;setProperty( &quot;trigger&quot;
6589
                    , &quot;P1W&quot;
6590
                    , array( &quot;related&quot; =&gt; &quot;END&quot; ));
6591
.. .
6592
</p>
6593
<p class="label">Example 7</p>
6594
<p class="example">&lt;?php
6595
.. .
6596
$valarm-&gt;setProperty( &quot;trigger&quot;
6597
                    , array( &quot;year&quot; =&gt; 2007
6598
                           , &quot;month&quot; =&gt; 6
6599
                           , &quot;day&quot;   =&gt; 5,
6600
                           , &quot;hour&quot;  =&gt; 2
6601
                           , &quot;min&quot;   =&gt; 2
6602
                           , &quot;sec&quot;   =&gt; 3 )
6603
                    , array( &quot;VALUE&quot; =&gt; &quot;DATE-TIME&quot; ));
6604
.. .
6605
</p>
6606
<br>
6607
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6608

    
6609

    
6610
<a name="TZID"></a><h3>3.2.41 TZID</h3>
6611
<p>
6612
This property specifies the text value that uniquely identifies the <a href="#VTIMEZONE">VTIMEZONE</a>
6613
<strong>calendar</strong> component and is REQUIRED, but MUST NOT occur more than once.
6614
</p>
6615
<p>The value type for TZID is TEXT.</p>
6616
<h5>Create TZID</h5>
6617
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6618
<p class="label">Format</p>
6619
<p class="format">vtimezone::createTzid()</p>
6620
<p class="label">Example</p>
6621
<p class="example">&lt;?php
6622
.. .
6623
$str = $component-&gt;createTzid();
6624
.. .
6625
</p>
6626
<h5>Delete TZID</h5>
6627
<p>Remove TZID from component.</p>
6628
<p class="label">Format</p>
6629
<p class="format">vtimezone::deleteProperty( &quot;TZID&quot; )</p>
6630
<p class="label">Example</p>
6631
<p class="example">&lt;?php
6632
.. .
6633
$vtimezone-&gt;deleteProperty( &quot;TZID&quot; );
6634
.. .
6635
</p>
6636
<h5>Get TZID</h5>
6637
<p>If set, returns property value, otherwise FALSE.</p>
6638
<p class="label">Format 1</p>
6639
<p class="format">vtimezone::getProperty( &quot;TZID&quot; )</p>
6640
<p class="comment">output = tzid<sup>1</sup></p>
6641
<p class="label">Format 2</p>
6642
<p class="format">vtimezone::getProperty( &quot;TZID&quot;, FALSE , TRUE )</p>
6643
<p class="comment">output = array( &quot;value&quot;  =&gt; tzid<sup>1</sup>
6644
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6645
<p class="label">Example</p>
6646
<p class="example">&lt;?php
6647
.. .
6648
$tzid = $vtimezone-&gt;getProperty( &quot;TZID&quot; );
6649
.. .
6650
</p>
6651
<h5>Set TZID</h5>
6652
<p>Insert property value.</p>
6653
<p class="label">Format</p>
6654
<p class="format">vtimezone::setProperty( &quot;tzid&quot;, tzid [, xparams ] )</p>
6655
<p class="comment">tzid<sup>1</sup>    = (string) Value type TEXT
6656
xparams<sup>2</sup> = (array)( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6657
</p>
6658
<p class="label">Example</p>
6659
<p class="example">&lt;?php
6660
.. .
6661
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6662
$vcalendar = new vcalendar( $config );
6663
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6664
$vtimezone-&gt;setProperty( &quot;tzid&quot;, &quot;US-Eastern&quot; );
6665
.. .
6666
</p>
6667
<br>
6668
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6669

    
6670

    
6671
<a name="TZNAME"></a><h3>3.2.42 TZNAME</h3>
6672
<p>
6673
This property specifies the customary designation for a <a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> description
6674
and is OPTIONAL and MAY occur more than once.
6675
</p>
6676
<p>The value type for TZNAME is TEXT.</p>
6677
<h5>Create TZNAME</h5>
6678
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6679
<p class="label">Format</p>
6680
<p class="format">vtimezone::createTzname()</p>
6681
<p class="label">Example</p>
6682
<p class="example">&lt;?php
6683
.. .
6684
$str = $component-&gt;createTzname();
6685
.. .
6686
</p>
6687
<h5>Delete TZNAME</h5>
6688
<p>Remove TZNAME from component.</p>
6689
<p class="label">Format</p>
6690
<p class="format">vtimezone::deleteProperty( &quot;TZNAME&quot; )</p>
6691
<p class="label">Example 1</p>
6692
<p>Delete (single/first) TZNAME property.</p>
6693
<p class="example">&lt;?php
6694
.. .
6695
$vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot; );
6696
.. .
6697
</p>
6698
<p class="label">Example 2</p>
6699
<p>Delete TZNAME property no 2.</p>
6700
<p class="example">&lt;?php
6701
.. .
6702
$vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot;, 2 );
6703
.. .
6704
</p>
6705
<p class="label">Example 3</p>
6706
<p>Deleting all TZNAME properties.</p>
6707
<p class="example">&lt;?php
6708
.. .
6709
while( $vtimezonestd-&gt;deleteProperty( &quot;TZNAME&quot; ))
6710
  continue;
6711
.. .
6712
</p>
6713
<h5>Get TZNAME</h5>
6714
<p>If set, returns property value, otherwise FALSE.</p>
6715
<p class="label">Format 1</p>
6716
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot; )</p>
6717
<p class="comment">output = tzname<sup>1</sup></p>
6718
<p class="label">Format 2</p>
6719
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot;, propOrderNo/FALSE, TRUE )</p>
6720
<p class="comment">propOrderNo = (int) specific property value</p>
6721
<p class="comment">output = array( &quot;value&quot;  =&gt; tzname<sup>1</sup>
6722
              , &quot;params&quot; =&gt; params<sup>2</sup> )</p>
6723
<p class="label">Format 3</p>
6724
<p class="format">vtimezone::getProperty( &quot;TZNAME&quot;, propOrderNo )</p>
6725
<p class="comment">propOrderNo = (int) specific property value</p>
6726
<p class="comment">Get propOrderNo TZNAME</p>
6727
<p class="label">Example</p>
6728
<p class="example">&lt;?php
6729
.. .
6730
$tzname = $timezonestandard-&gt;getProperty( &quot;TZNAME&quot; );
6731
.. .
6732
</p>
6733
<h5>Set TZNAME</h5>
6734
<p>Insert property value.</p>
6735
<p class="label">Format</p>
6736
<p class="format">vtimezone::setProperty( &quot;tzname&quot;, tzname [, params [, propOrderNo ]] )</p>
6737
<p class="comment">tzname<sup>1</sup>     = (string) Value type TEXT
6738
params<sup>2</sup>     = (array) ( [ &quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot; ]*[, xparams ] )
6739
xparams     = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
6740
propOrderNo = (int) order number             // <span class="comment">1=1st, 2=2nd etc</span>
6741
lang<sup>*</sup>       = as defined in [RFC5646]</p>
6742
<p class="label">Example</p>
6743
<p class="example">&lt;?php
6744
.. .
6745
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6746
$vcalendar = new vcalendar( $config );
6747
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6748
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
6749
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
6750
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
6751
$standard-&gt;setProperty( &quot;tzname&quot;, &quot;EST&quot; );
6752
.. .
6753
</p>
6754
<br>
6755
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6756

    
6757

    
6758
<a name="TZOFFSETFROM"></a><h3>3.2.43 TZOFFSETFROM</h3>
6759
<p>
6760
This property specifies the offset which is in use prior to this <a href="#VTIMEZONE">TIMEZONE</a> observance.
6761
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
6762
</p>
6763
<p>The value type is UTC-OFFSET, &quot;+&quot; / &quot;-&quot; time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
6764
<h5>Create TZOFFSETFROM</h5>
6765
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6766
<p class="label">Format</p>
6767
<p class="format">vtimezone::createTzoffsetfrom()</p>
6768
<p class="label">Example</p>
6769
<p class="example">&lt;?php
6770
.. .
6771
$str = $component-&gt;createTzoffsetfrom();
6772
.. .
6773
</p>
6774
<h5>Delete TZOFFSETFROM</h5>
6775
<p>Remove TZOFFSETFROM from component.</p>
6776
<p class="label">Format</p>
6777
<p class="format">vtimezone::deleteProperty( &quot;TZOFFSETFROM&quot; )</p>
6778
<p class="label">Example</p>
6779
<p class="example">&lt;?php
6780
.. .
6781
$vtimezonestd-&gt;deleteProperty( &quot;TZOFFSETFROM&quot; );
6782
.. .
6783
</p>
6784
<h5>Get TZOFFSETFROM</h5>
6785
<p>If set, returns property value, otherwise FALSE.</p>
6786
<p class="label">Format 1</p>
6787
<p class="format">vtimezone::getProperty( &quot;TZOFFSETFROM&quot; )</p>
6788
<p class="comment">output = tzoffsetfrom<sup>1</sup></p>
6789
<p class="label">Format 2</p>
6790
<p class="format">vtimezone::getProperty( &quot;TZOFFSETFROM&quot;, FALSE , TRUE )</p>
6791
<p class="comment">output = array( &quot;value&quot;  =&gt; tzoffsetfrom<sup>1</sup>
6792
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6793
<p class="label">Example</p>
6794
<p class="example">&lt;?php
6795
.. .
6796
$tzoffsetfrom = $timezonestandard-&gt;getProperty( &quot;TZOFFSETFROM&quot; );
6797
.. .
6798
</p>
6799
<h5>Set TZOFFSETFROM</h5>
6800
<p>Insert property value.</p>
6801
<p class="label">Format</p>
6802
<p class="format">vtimezone::setProperty( &quot;tzoffsetfrom&quot;, tzoffsetfrom [, xparams ] )</p>
6803
<p class="comment">tzoffsetfrom<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
6804
xparams<sup>2</sup>      = (array) ( *[ /string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6805
</p>
6806
<p class="label">Example</p>
6807
<p class="example">&lt;?php
6808
.. .
6809
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6810
$vcalendar = new vcalendar( $config );
6811
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6812
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
6813
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
6814
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
6815
$standard-&gt;setProperty( &quot;tzname&quot;, &quot;EST&quot; );
6816
$standard-&gt;setProperty( &quot;tzoffsetfrom&quot;, &quot;-0500&quot; );
6817
.. .
6818
</p>
6819
<br>
6820
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6821

    
6822

    
6823
<a name="TZOFFSETTO"></a><h3>3.2.44 TZOFFSETTO</h3>
6824
<p>
6825
This property specifies the offset which is in use in this <a href="#VTIMEZONE">TIMEZONE</a> observance.
6826
The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
6827
</p>
6828
<p>The value type is UTC-OFFSET, &quot;+&quot; / &quot;-&quot; time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
6829
<h5>Create TZOFFSETTO</h5>
6830
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6831
<p class="label">Format</p>
6832
<p class="format">vtimezone::createTzoffsetto()</p>
6833
<p class="label">Example</p>
6834
<p class="example">&lt;?php
6835
.. .
6836
$str = $component-&gt;createTzoffsetto();
6837
.. .
6838
</p>
6839
<h5>Delete TZOFFSETTO</h5>
6840
<p>Remove TZOFFSETTO from component.</p>
6841
<p class="label">Format</p>
6842
<p class="format">vtimezone::deleteProperty( &quot;TZOFFSETTO&quot; )</p>
6843
<p class="label">Example</p>
6844
<p class="example">&lt;?php
6845
.. .
6846
$daylight-&gt;deleteProperty( &quot;TZOFFSETTO&quot; );
6847
.. .
6848
</p>
6849
<h5>Get TZOFFSETTO</h5>
6850
<p>If set, returns property value, otherwise FALSE.</p>
6851
<p class="label">Format 1</p>
6852
<p class="format">vtimezone::getProperty( &quot;TZOFFSETTO&quot; )</p>
6853
<p class="comment">output = tzoffsetto<sup>1</sup></p>
6854
<p class="label">Format 2</p>
6855
<p class="format">vtimezone::getProperty( &quot;TZOFFSETTO&quot;, FALSE , TRUE )</p>
6856
<p class="comment">output = array( &quot;value&quot;  =&gt; tzoffsetto<sup>1</sup>
6857
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6858
<p class="label">Example</p>
6859
<p class="example">&lt;?php
6860
.. .
6861
$tzoffsetto = $timezonestandard-&gt;getProperty( &quot;TZOFFSETTO&quot; );
6862
.. .
6863
</p>
6864
<h5>Set TZOFFSETTO</h5>
6865
<p>Insert property value.</p>
6866
<p class="label">Format</p>
6867
<p class="format">vtimezone::setProperty( &quot;tzoffsetto&quot;, tzoffsetto [, xparams ] )</p>
6868
<p class="comment">tzoffsetto<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
6869
xparams<sup>2</sup>    = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6870
</p>
6871
<p class="label">Example</p>
6872
<p class="example">&lt;?php
6873
.. .
6874
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6875
$vcalendar = new vcalendar( $config );
6876
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6877
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
6878
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101&quot; );
6879
$standard  = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
6880
.. .
6881
$daylight  = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
6882
$daylight-&gt;setProperty( &quot;tzoffsetto&quot;, &quot;1345&quot; );
6883
.. .
6884
</p>
6885
<br>
6886
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6887

    
6888

    
6889
<a name="TZURL"></a><h3>3.2.45 TZURL</h3>
6890
<p>
6891
The TZURL provides a means for a <a href="#VTIMEZONE">VTIMEZONE</a> component to point to
6892
a network location that can be used to retrieve an up-to-date version of itself. The property
6893
is OPTIONAL and MUST NOT occur more than once.
6894
</p>
6895
<p> The value type is URI.</p>
6896
<h5>Create TZURL</h5>
6897
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6898
<p class="label">Format</p>
6899
<p class="format">vtimezone::createTzurl()</p>
6900
<p class="label">Example</p>
6901
<p class="example">&lt;?php
6902
.. .
6903
$str = $component-&gt;createTzurl();
6904
.. .
6905
</p>
6906
<h5>Delete TZURL</h5>
6907
<p>Remove TZURL from component.</p>
6908
<p class="label">Format</p>
6909
<p class="format">vtimezone::deleteProperty( &quot;TZURL&quot; )</p>
6910
<p class="label">Example</p>
6911
<p class="example">&lt;?php
6912
.. .
6913
$vtimezone-&gt;deleteProperty( &quot;TZURL&quot; );
6914
.. .
6915
</p>
6916
<h5>Get TZURL</h5>
6917
<p>If set, returns property value, otherwise FALSE.</p>.
6918
<p class="label">Format 1</p>
6919
<p class="format">vtimezone::getProperty( &quot;TZURL&quot; )</p>
6920
<p class="comment">output = tzurl<sup>1</sup></p>
6921
<p class="label">Format 2</p>
6922
<p class="format">vtimezone::getProperty( &quot;TZURL&quot;, FALSE , TRUE )</p>
6923
<p class="comment">output = array( &quot;value&quot;  =&gt; tzurl<sup>1</sup>
6924
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
6925
<p class="label">Example</p>
6926
<p class="example">&lt;?php
6927
.. .
6928
$tzurl = $timezonestandard-&gt;getProperty( &quot;TZURL&quot; );
6929
.. .
6930
</p>
6931
<h5>Set TZURL</h5>
6932
<p>Insert property value.</p>
6933
<p class="label">Format</p>
6934
<p class="format">vtimezone::setProperty( &quot;tzurl&quot;, tzurl [, xparams ] )</p>
6935
<p class="comment">tzurl<sup>1</sup>   = (string) Value type URI
6936
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
6937
</p>
6938
<p class="label">Example</p>
6939
<p class="example">&lt;?php
6940
.. .
6941
$tz        = &quot;http://zones.stds_r_us.net/tz/US-Eastern&quot; );
6942
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot; );
6943
$vcalendar = new vcalendar( $config );
6944
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
6945
$vtimezone-&gt;setProperty( &quot;Tzid&quot;, &quot;US-Eastern&quot; );
6946
$vtimezone-&gt;setProperty( &quot;Last-Modified&quot;, &quot;19870101T000000&quot; );
6947
$vtimezone-&gt;setProperty( &quot;tzurl&quot;, $tz );
6948
.. .
6949
</p>
6950
<br>
6951
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
6952

    
6953

    
6954
<a name="UID"></a><h3>3.2.46 UID</h3>
6955
<p>
6956
The persistent, globally <b>U</b>nique <b>ID</b>entifier for the <strong>calendar</strong> component.
6957
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
6958
<a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.<br>
6959
However, UID is <b>AUTOMATICALLY</b> generated in iCalcreator and configuration <a href="#Unique_id">unique_id</a>
6960
is used when auto-creating component UID.
6961
</p>
6962
<p>UID generated format :</p>
6963
<p class="format">date(&quot;Ymd\THisT&quot;).&quot;-&quot;.[microSec][random].&quot;@&quot;.<a href="#Unique_id">unique_id</a></p>
6964
<p>
6965
microSec = microseconds, 4 pos<br>
6966
random    = 6 characters aA-zZ, 0-9
6967
</p>
6968
<p class="label">Example</p>
6969
<p class="example">&quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;</p>
6970
<p>
6971
UID may be required when importing iCal files into some <strong>calendar</strong> software (MS etc.),
6972
as well as (<strong>calendar</strong>) properties <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE",
6973
<a href="#METHOD">METHOD</a> (value PUBLISH etc.) and the (also automatically created) <a href="#DTSTAMP">DTSTAMP</a> property.
6974
</p>
6975
<p>The value type for UID is TEXT.</p>
6976
<h5>Create UID</h5>
6977
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
6978
<p class="label">Format</p>
6979
<p class="format">calendarComponent::createUid()</p>
6980
<p class="label">Example</p>
6981
<p class="example">&lt;?php
6982
.. .
6983
$str = $component-&gt;createUid();
6984
.. .
6985
</p>
6986
<h5>Delete UID</h5>
6987
<p>
6988
If UID is remove from a component, UID will automatically be recreated when iCalcreator object output methods
6989
like <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a>
6990
or <a href="#saveCalendar">saveCalendar</a> is executed.
6991
</p>
6992
<p class="label">Format</p>
6993
<p class="format">calendarComponent::deleteProperty( &quot;UID&quot; )</p>
6994
<p class="label">Example</p>
6995
<p class="example">&lt;?php
6996
.. .
6997
$vevent-&gt;deleteProperty( &quot;UID&quot; );
6998
.. .
6999
</p>
7000
<h5>Get UID</h5>
7001
<p>If set, returns property, otherwise FALSE.</p>
7002
<p class="label">Format 1</p>
7003
<p class="format">calendarComponent::getProperty( &quot;UID&quot; )</p>
7004
<p class="comment">output = uid<sup>1</sup></p>
7005
<p class="label">Format 2</p>
7006
<p class="format">calendarComponent::getProperty( &quot;UID&quot;, FALSE , TRUE )</p>
7007
<p class="comment">output = array( &quot;value&quot;  =&gt; uid<sup>1</sup>
7008
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
7009
<p class="label">Example</p>
7010
<p class="example">&lt;?php
7011
.. .
7012
$uid = $vevent-&gt;getProperty( &quot;UID&quot; );
7013
.. .
7014
</p>
7015
<h5>Set UID</h5>
7016
<p>Insert property value, overrides any previously set or auto-created UID.</p>
7017
<p>
7018
Do <b>NOT</b> use an integer UID or only a component name in UID (ex. &quot;vevent&quot;),
7019
this may cause malfunction in iCalcreator object method <a href="#setComponent">setComponent</a> with index or UID argument.
7020
</p>
7021
<p class="label">Format</p>
7022
<p class="format">calendarComponent::setProperty( &quot;uid&quot;, uid [, xparams ] )</p>
7023
<p class="comment">uid<sup>1</sup>     = (string) Value type TEXT
7024
xparams<sup>2</sup> = array( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
7025
</p>
7026
<p class="label">Example</p>
7027
<p class="example">&lt;?php
7028
.. .
7029
$vevent-&gt;setProperty(&quot;uid&quot;,&quot;20070803T194810CEST-0123U3PXiX@kigkonsult.se&quot;);
7030
.. .
7031
</p>
7032
<br>
7033
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7034

    
7035

    
7036
<a name="URL"></a><h3>3.2.47 URL</h3>
7037
<p>
7038
This property defines a Uniform Resource Locator (URL) associated with the <strong>iCalendar</strong> object.
7039
The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
7040
<a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
7041
</p>
7042
<p> The value type is URI.</p>
7043
<h5>Create URL</h5>
7044
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
7045
<p class="label">Format</p>
7046
<p class="format">calendarComponent::createUrl()</p>
7047
<p class="label">Example</p>
7048
<p class="example">&lt;?php
7049
.. .
7050
$str = $component-&gt;createUrl();
7051
.. .
7052
</p>
7053
<h5>Delete URL</h5>
7054
<p>Remove URL from component.</p>
7055
<p class="label">Format</p>
7056
<p class="format">calendarComponent::deleteProperty( &quot;URL&quot; )</p>
7057
<p class="label">Example</p>
7058
<p class="example">&lt;?php
7059
.. .
7060
$vevent-&gt;deleteProperty( &quot;URL&quot; );
7061
.. .
7062
</p>
7063
<h5>Get URL</h5>
7064
<p>If set, returns property value, otherwise FALSE.</p>
7065
<p class="label">Format 1</p>
7066
<p class="format">calendarComponent::getProperty( &quot;URL&quot; )</p>
7067
<p class="comment">output = url<sup>1</sup></p>
7068
<p class="label">Format 2</p>
7069
<p class="format">calendarComponent::getProperty( &quot;URL&quot;, FALSE , TRUE )</p>
7070
<p class="comment">output = array &quot;value&quot;   =&gt; url<sup>1</sup>
7071
              , &quot;params&quot; =&gt; xparams<sup>2</sup> )</p>
7072
<p class="label">Example</p>
7073
<p class="example">&lt;?php
7074
.. .
7075
$url = $vevent-&gt;getProperty( &quot;URL&quot; );
7076
.. .
7077
</p>
7078
<h5>Set URL</h5>
7079
<p>Insert property value.</p>
7080
<p class="label">Format</p>
7081
<p class="format">calendarComponent::setProperty( &quot;url&quot;, url [, xparams ] )</p>
7082
<p class="comment">url<sup>1</sup>     = (string) Value type URI
7083
xparams<sup>2</sup> = (array) ( *[ (string) key =&gt; (string) value ] ) // <span class="comment">key prefix &quot;X-&quot;</span>
7084
</p>
7085
<p class="label">Example</p>
7086
<p class="example">&lt;?php
7087
.. .
7088
$vtodo-&gt;setProperty( &quot;url&quot;, &quot;http://www.icaldomain.net&quot; );
7089
.. .
7090
</p>
7091
<br>
7092
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7093

    
7094

    
7095
<a name="X-PROPERTY_PROP"></a><h3>3.2.48 X-PROPERTY</h3>
7096
<p>
7097
A component, non-standard property with a TEXT value and a name with an &quot;X-&quot; prefix. In a component,
7098
an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
7099
</p>
7100
<p>The value type is TEXT.</p>
7101
<h5>Create X-PROPERTY</h5>
7102
<p>If set, returns [RFC5545] formatted string, otherwise FALSE.</p>
7103
<p class="label">Format</p>
7104
<p class="format">calendarComponent::createXprop()</p>
7105
<p class="label">Example</p>
7106
<p class="example">&lt;?php
7107
.. .
7108
$str = $component-&gt;createxProp();
7109
.. .
7110
</p>
7111
<h5>Delete X-PROPERTY</h5>
7112
<p>Remove X-PROPERTY from component.</p>
7113
<p class="label">Format</p>
7114
<p class="format">calendarComponent::deleteProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
7115
<p class="label">Example 1</p>
7116
<p>Deleting x-property named &quot;X-PROPERTY&quot;.</p>
7117
<p class="example">&lt;?php
7118
.. .
7119
$vevent-&gt;deleteProperty( &quot;X-PROPERTY&quot; );
7120
.. .
7121
</p>
7122
<p class="label">Example 2</p>
7123
<p>Deleting all x-properties.</p>
7124
<p class="example">&lt;?php
7125
.. .
7126
while( $vevent-&gt;deleteProperty())
7127
  continue;
7128
.. .
7129
</p>
7130
<h5>Get X-property</h5>
7131
<p>If set, returns property value, otherwise FALSE.</p>
7132
<p class="label">Format 1</p>
7133
<p class="format">calendarComponent::getProperty( &quot;&lt;X-PROPERTY&gt;&quot; )</p>
7134
<p class="comment">output = array( propertyName<sup>1</sup>
7135
              , propertyData<sup>2</sup> )</p>
7136
<p class="label">Format 2</p>
7137
<p class="format">calendarComponent::getProperty()</p>
7138
<p class="comment">output = array( propertyName<sup>1</sup>
7139
              , propertyData<sup>2</sup> )</p>
7140
<p class="label">Format 3</p>
7141
<p class="format">calendarComponent::getProperty( FALSE, propOrderNo/FALSE, TRUE )</p>
7142
<p class="comment">propOrderNo = (int) specific property value</p>
7143
<p class="comment">output = array( propertyName<sup>1</sup>
7144
              , array ( &quot;value&quot;  =&gt; propertyData<sup>2</sup> )
7145
                      , &quot;params&quot; =&gt; params<sup>3</sup>))</p>
7146
<p class="label">Format 4</p>
7147
<p class="format">calendarComponent::getProperty( FALSE, propOrderNo )</p>
7148
<p class="comment">propOrderNo = (int) specific property value</p>
7149
<p class="comment">Get propOrderNo X-property</p>
7150

    
7151
<p class="label">Example 1</p>
7152
<p class="example">&lt;?php
7153
.. .
7154
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7155
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7156
$vcalendar = new vcalendar( $config );
7157
$vcalendar-&gt;parse();
7158
if( FALSE !== ( $d = $vcalendar-&gt;getProperty( &quot;X-WR-TIMEZONE&quot; )))
7159
   echo $d[1]; <span class="comment">// $d = array( &quot;X-WR-TIMEZONE&quot;, propertyData<sup>2</sup> )</span>
7160
.. .
7161
</p>
7162

    
7163
<p class="label">Example 2</p>
7164
<p class="example">&lt;?php
7165
.. .
7166
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7167
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7168
$vcalendar = new vcalendar( $config );
7169
$vcalendar-&gt;parse();
7170
while( $xprop = $vcalendar-&gt;getProperty( )) {<span class="comment">// $xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
7171
.. .
7172
</p>
7173

    
7174

    
7175
<p class="label">Example 3</p>
7176
<p class="example">&lt;?php
7177
.. .
7178
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7179
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7180
$vcalendar = new vcalendar( $config );
7181
$vcalendar-&gt;parse();
7182
while( $xprop = $vcalendar-&gt;getProperty( &quot;X-ABC-MMSUBJ&quot; )) {
7183
.. .     <span class="comment">// $xprop = array( &quot;X-ABC-MMSUBJ&quot;, propertyData<sup>2</sup> )</span>
7184
.. .
7185
</p>
7186

    
7187
<p class="label">Example 4</p>
7188
<p class="example">&lt;?php
7189
.. .
7190
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7191
                    &quot;filename&quot;, &quot;file.ics&quot; ); );
7192
$vcalendar = new vcalendar( $config );
7193
$vcalendar-&gt;parse();
7194
while( $xprop = $vcalendar-&gt;getProperty( FALSE, FALSE, TRUE )) {
7195
       /*<span class="comment"> $xprop = array( propertyName<sup>1</sup>
7196
                                      , array( &quot;value&quot;    =&gt; propertyData<sup>2</sup> )
7197
                                                , &quot;params&quot; =&gt; params<sup>3</sup> )</span>
7198
       */
7199
.. .
7200
</p>
7201
<h5>Set X-property</h5>
7202
<p>Insert property name and value. If an x-prop with the same name already exists, it will be replaced.</p>
7203
<p class="label">Format</p>
7204
<p class="format">calendarComponent::setProperty( propertyName, propertyData [, params ] )</p>
7205
<p class="comment">propertyName<sup>1</sup> = (string) Any property name with a &quot;X-&quot; prefix
7206
propertyData<sup>2</sup> = (string) Value type TEXT
7207
params<sup>3</sup>       = (array) ( [&quot;LANGUAGE&quot; =&gt; (string) &quot;lang<sup>*</sup>&quot;] *[, xparams] )
7208
xparams       = (string) key =&gt; (string) value // <span class="comment">key prefix &quot;X-&quot;</span>
7209
lang<sup>*</sup>         = as defined in [RFC5646]</p>
7210
<p class="label">Example</p>
7211
<p class="example">&lt;?php
7212
.. .
7213
$component-&gt;setProperty(&quot;X-ABC-MMSUBJ&quot;,&quot;http://load.noise.org/mysubj.wav&quot;);
7214
.. .
7215
</p>
7216
<br>
7217
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
7218

    
7219

    
7220
<a NAME="iCalcreator_component_configuration_methods"></a><h2>3.3 iCalcreator Component configuration methods</h2>
7221

    
7222
<a name="Language_PROP"></a><h3>3.3.1 Language</h3>
7223
Language for specific <strong>calendar</strong> component as defined in [RFC5646].<br>
7224
Language set at component level can be overridden by specific component property parameter.<br>
7225
A successful &quot;setConfig&quot; returns TRUE.
7226
<h5>Get language</h5>
7227
Language for <strong>calendar</strong> (only if language is set at component level).
7228
<p class="label">Format</p>
7229
<p class="format">calendarComponent::getConfig( &quot;language&quot; )</p>
7230
<p class="label">Example</p>
7231
<p class="example">&lt;?php
7232
.. .
7233
$lang = $vevent-&gt;getConfig( &quot;language&quot; );
7234
.. .
7235
</p>
7236
<h5>Set LANGUAGE</h5>
7237
<p class="label">Format</p>
7238
<p class="format">calendarComponent::setConfig( &quot;language&quot;, lang )</p>
7239
<p class="comment">lang = (string) language</p>
7240
<p class="label">Example</p>
7241
<p class="example">&lt;?php
7242
.. .
7243
$vevent-&gt;setConfig( &quot;language&quot;, &quot;en&quot; );
7244
.. .
7245
</p>
7246
<br>
7247
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7248

    
7249

    
7250
<a name="iCalcreator_component_object_misc_methods"></a><h2>3.4 iCalcreator component object misc. methods</h2>
7251
<p>Calendar component subcomponent functions.</p>
7252

    
7253
<a name="deleteComponent_PROP"></a><h4>3.4.1 deleteComponent</h4>
7254
Remove subcomponent from component.
7255
<p class="label">Format</p>
7256
<p class="format">calendarComponent::deleteComponent( orderNumber )</p>
7257
<p class="comment">orderNumber = (int) component order Number</p>
7258
<p class="comment">Remove component with order number (1st=1, 2nd=2.. .).</p>
7259
<p class="format">calendarComponent::deleteComponent( componentType [, componentSuborderNumber])</p>
7260
<p class="comment">componentType = (string) component type
7261
componentSuborderNumber = (int) component suborder number</p>
7262
<p class="comment">Remove component with component type (ex. &quot;vevent&quot;)
7263
and order 1 alt. suborder number.</p>
7264
<p class="format">calendarComponent::deleteComponent( <a href="#UID">UID</a> )</p>
7265
<p class="comment">Remove component with <a href="#UID">UID</a>.
7266
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timezone</a> components.</p>
7267
<p class="label">Example 1</p>
7268
<p>Delete first subcomponent.</p>
7269
<p class="example">&lt;?php
7270
.. .
7271
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7272
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
7273
$vcalendar = new vcalendar( $config );
7274
$vcalendar-&gt;parse();
7275
$comp1     = $vcalendar-&gt;getComponent();
7276
$comp1-&gt;deleteComponent( 1 );
7277
.. .
7278
</p>
7279
<p class="label">Example 2</p>
7280
<p>Delete all subcomponents.</p>
7281
<p class="example">&lt;?php
7282
.. .
7283
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7284
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
7285
$vcalendar = new vcalendar( $config );
7286
$vcalendar-&gt;parse();
7287
$comp1     = $vcalendar-&gt;getComponent();
7288
while( $comp1-&gt;deleteComponent( &quot;valarm&quot; )
7289
  continue;
7290
.. .
7291
</p>
7292
<br>
7293
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7294

    
7295

    
7296
<a name="getComponent_PROP"></a><h4>3.4.2 getComponent</h4>
7297
Get subComponent from component.
7298
<p class="label">Format 1</p>
7299
<p class="format">calendarComponent::getComponent()</p>
7300
<p class="comment">Get next component until end-of-components.</p>
7301
<p class="label">Format 2</p>
7302
<p class="format">calendarComponent::getComponent( int orderNumber )</p>
7303
<p class="comment">orderNumber = (int) component order number</p>
7304
<p class="comment">Get component with order number (1st=1, 2nd=2.. .).</p>
7305
<p class="label">Format 3</p>
7306
<p class="format">calendarComponent::getComponent( string componentType [, int componentSuborderNumber])</p>
7307
<p class="comment">componentType = (string) component type
7308
componentSuborderNumber = (int) component suborder number</p>
7309
<p class="comment">Get (next) component with component type (until end-of-components)
7310
alt. component with component type and suborder number (1st=1, 2nd=2..).</p>
7311
<p class="label">Format 4</p>
7312
<p class="format">calendarComponent::getComponent( <a href="#UID">UID</a> )</p>
7313
<p class="comment">Get component with <a href="#UID">UID</a>.
7314
N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timezone</a> components.</p>
7315
<p class="label">Example</p>
7316
<p class="example">&lt;?php
7317
.. .
7318
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;,
7319
                    &quot;filename&quot;  =&gt; &quot;file.ics&quot; );
7320
$vcalendar = new vcalendar( $config );
7321
$vcalendar-&gt;parse();
7322
$comp1     = $vcalendar-&gt;getComponent());
7323
while( $subComp = $comp1-&gt;getComponent()) {
7324
.. .
7325
</p>
7326
<br>
7327
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7328

    
7329

    
7330
<a name="newComponent_PROP"></a><h4>3.4.3 newComponent</h4>
7331
Create subcomponent (<a href="#VALARM">ALARN</a> / <a href="#VTIMEZONE">VTIMEZONE STANDARD</a> / <a href="#VTIMEZONE">VTIMEZONE DAYLIGHT</a>)
7332
using a component factory-method, returning a reference to the new component.
7333
<p class="label">Format</p>
7334
<p class="format">calendarComponent::newComponent( componentType )</p>
7335
<p class="comment">componentType = (string) component type</p>
7336
<p class="label">Example 1</p>
7337
<p class="example">&lt;?php
7338
.. .
7339
$config    = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
7340
$vcalendar = new vcalendar( $config );
7341
...
7342
$vevent    = &amp; $vcalendar-&gt;newComponent( &quot;vevent&quot; );
7343
             // <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
7344
$vevent-&gt;setProperty( &quot;dtstart&quot;, 2006, 12, 24, 19, 30, 00 );
7345
$vevent-&gt;setProperty(.. .
7346
...
7347
$valarm    = &amp; $vevent-&gt;newComponent( &quot;valarm&quot; );
7348
$valarm-&gt;setProperty( &quot;trigger&quot;, .. .
7349
...
7350
</p>
7351
<p class="label">Example 2</p>
7352
<p class="example">&lt;?php
7353
.. .
7354
$config = array( &quot;unique_id&quot; => &quot;kigkonsult.se&quot; );
7355
$vcalendar = new vcalendar( $config );
7356
...
7357
$vtimezone = &amp; $vcalendar-&gt;newComponent( &quot;vtimezone&quot; );
7358
$vtimezone-&gt;setProperty(.. .
7359
...
7360
$standard = &amp; $vtimezone-&gt;newComponent( &quot;standard&quot; );
7361
$standard-&gt;setProperty(.. .
7362
...
7363
$daylight = &amp; $vtimezone-&gt;newComponent( &quot;daylight&quot; );
7364
$daylight-&gt;setProperty(.. .
7365
...
7366
</p>
7367

    
7368
<br>
7369
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7370

    
7371

    
7372
<a name="setComponent_PROP"></a><h4>3.4.4 setComponent</h4>
7373
Add <strong>calendar</strong> component to the iCalcreator object instance or replace/update component in the iCalcreator object instance.
7374
<p class="label">Format 1</p>
7375
<p class="format">calendarComponent::setComponent( component )
7376
addSubComponent( component ) // <span class="comment">alias</span></p>
7377
<p class="comment">Insert last in component chain.</p>
7378
<p class="label">Format 2</p>
7379
<p class="format">calendarComponent::setComponent( component, int orderNumber )</p>
7380
<p class="comment">orderNumber = (int) component order number</p>
7381
<p class="comment">Replace component with order number(1st=1, 2nd=2.. .).
7382
If orderNumber is not found, component is inserted last in chain.</p>
7383
<p class="label">Format 3</p>
7384
<p class="format">calendarComponent::setComponent( component, componentType [,componentSuborderNumber])</p>
7385
<p class="comment">componentType = (string) component type
7386
componentSuborderNumber = (int) component suborder number</p>
7387
<p class="comment">Replace component with component type and component order number.
7388
if orderNumber is not found, component is inserted last in chain. </p>
7389
<p class="label">Example</p>
7390
<p class="example">&lt;?php
7391
.. .
7392
$config    = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; &quot;Europe/Stockholm&quot; );
7393
$vcalendar = new vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
7394
.. .
7395
$vevent    = new vevent();
7396
            // <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
7397
$vevent-&gt;setProperty( &quot;dtstart&quot;, 2006, 12, 24, 19, 30, 00 );
7398
$vevent-&gt;setProperty(.. .
7399
.. .
7400
$valarm    = new valarm();
7401
$valarm-&gt;setProperty( &quot;trigger&quot;, .. .
7402
.. .
7403
$vevent-&gt;setComponent( $valarm );
7404
$vcalendar-&gt;setComponent( $vevent );
7405
.. .
7406
</p>
7407
<br>
7408
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
7409

    
7410

    
7411
<a name="iCalUtilityFunctions"></a><h1>4 iCalUtilityFunctions</h1>
7412
<p>
7413
iCalUtilityFunctions class contains static functions used by iCalcreator,
7414
also usable outside the iCalcreator class.
7415
</p>
7416
<dl>
7417
<dt>&quot;External&quot; functions
7418
<dd><a href="#convEolChar">4.1 convEolChar</a>
7419
<dd><a href="#createTimezone">4.2 createTimezone</a>
7420
<dd><a href="#ms2phpTZ">4.3 ms2phpTZ</a>
7421
<dd><a href="#transformDateTime">4.4 transformDateTime</a>
7422
<dt>&quot;Internal&quot; functions
7423
<dd><a href="#mddtuf">4.5 Misc. date/duration/timestamp util. functions</a>
7424
</dl>
7425

    
7426

    
7427
<a name="convEolChar"></a><h4>4.1 convEolChar</h4>
7428
<p>Removes any line-endings that may include spaces or tabs (\t)
7429
and convert all line endings (iCal default &quot;\r\n&quot;),
7430
takes care of &quot;\r\n&quot;, &quot;\r&quot; and &quot;\n&quot; and mixed &quot;\r\n&quot;+&quot;\r&quot;, &quot;\r\n&quot;+&quot;\n&quot;.
7431
</p>
7432
<p>Returns string with controlled and corrected line endings.</p>
7433
<p class="label">Format</p>
7434
<p class="format">iCalUtilityFunctions::convEolChar( str, nl )</p>
7435
<p class="comment">str = (string) string to adjust
7436
nl  = line ending to convert to
7437
</p>
7438
<br>
7439
<br>
7440
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7441

    
7442

    
7443
<a name="createTimezone"></a><h4>4.2 createTimezone</h4>
7444
<p>
7445
The function, applied on a iCalcrator object instance and using a <em>PHP</em> valid timezone (as argument)
7446
creates <a href="#VTIMEZONE">vtimezone</a>, <a href="#STANDARD">standard</a> and <a href="#DAYLIGHT">daylight</a> components,
7447
based on <em>PHP</em> DateTimeZone class and the time zone transition dates.
7448
(<em>PHP</em> 5 >= 5.2.0)
7449
</p>
7450
<p>
7451
Recommendation is to call the function <b>after</b> editing components (and without (period) from/to arguments, below),
7452
 it will automatically create timezone components to fit.
7453
</p>
7454
<p>
7455
If no time zone transition exists within date arguments or within the &quot;<a href="#DTSTART">DTSTART</a>&quot;s span,
7456
then the time zone transition with the highest transistion date before &quot;from&quot; date is used as base.
7457
If still missing,a timezone standard component are created, using current date.
7458
</p>
7459
<p>
7460
Note, only when timezone NOT is UTC.
7461
For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
7462
</p>
7463
<p>
7464
FALSE is returned if not using a <em>PHP</em> valid timezone.
7465
</p>
7466
<p class="label">Format</p>
7467
<p class="format">iCalUtilityFunctions::createTimezone( calendar, timezone [, xprops, [, from [, to ]]] )</p>
7468
<p class="comment">calendar = (object) iCalcreator instance
7469
timezone = (string) an <em>PHP</em> (DateTimeZone) valid timezone
7470
xprops   = (array) ( *[ x-propName =&gt; value ] ), timezone non-standard properties
7471
from     = (int) timestamp, period start date
7472
to       = (int) timestamp, period end date
7473
           if the &quot;from&quot; and &quot;to&quot; arguments are missing,
7474
             the calendar <a href="#getProperty2">getProperty</a> method (with &quot;<a href="#DTSTART">DTSTART</a>&quot; as argument)
7475
             is used to get the lowest (modified, minus one month) and highest (modified, plus one year) DTSTART dates.
7476
</p>
7477
<p class="label">Example</p>
7478
<p class="example">&lt;?php
7479
.. .
7480
$tz     = &quot;Europe/Stockholm&quot;;
7481
$config = array( &quot;unique_id&quot; =&gt; &quot;kigkonsult.se&quot;, &quot;TZID&quot; =&gt; $tz );
7482
$c      = new vcalendar( $config );
7483
$c-&gt;setProperty( "X-WR-TIMEZONE", $tz );
7484
.. .
7485
.. .  // <span class="comment">insert components or parse an iCal file</span>
7486
.. .
7487
$xprops = array( &quot;X-LIC-LOCATION&quot; => $tz );
7488
iCalUtilityFunctions::createTimezone( $c, $tz, $xprops );
7489
.. .
7490
</p>
7491
<p>
7492
Output example (when using iCalcreator object createCalendar or returnCalendar methods):
7493
</p>
7494
<p class="example">BEGIN:VTIMEZONE
7495
TZID:Europe/Stockholm
7496
X-LIC-LOCATION:Europe/Stockholm
7497
BEGIN:STANDARD
7498
DTSTART:20111030T003000
7499
TZOFFSETFROM:+0200
7500
TZOFFSETTO:+0100
7501
TZNAME:CET
7502
END:STANDARD
7503
BEGIN:DAYLIGHT
7504
DTSTART:20110327T002000
7505
TZOFFSETFROM:+0100
7506
TZOFFSETTO:+0200
7507
TZNAME:CEST
7508
END:DAYLIGHT
7509
END:VTIMEZONE
7510
</p>
7511
<br>
7512
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7513

    
7514

    
7515
<a name="ms2phpTZ"></a><h4>4.3 ms2phpTZ</h4>
7516
<p>
7517
Conversion (very simple) of a MS timezone to a <em>PHP</em>5 valid (Date-)timezone,<br>
7518
matching (MS) UTC offset and time zone descriptors, based on <em>PHP</em> DateTimeZone class.
7519
(<em>PHP</em> 5 >= 5.2.0)
7520
</p>
7521
<p>If TRUE is returned, the MS timezone argument (below) is converted to a <em>PHP</em>5 time zone, otherwise unaltered.</p>
7522
<p class="label">Format</p>
7523
<p class="format">iCalUtilityFunctions::ms2phpTZ( timezone )</p>
7524
<p class="comment">timezone = (string) MS timezone (input), PHP5 timezone (output)</p>
7525
<p class="label">Example</p>
7526
<p class="example">&lt;?php
7527
.. .
7528
$search = '"(UTC-06:00) Central Time (US & Canada)"';
7529
echo "MS  tz:'$search'&lt;br&gt;\n";
7530
if( FALSE !== iCalUtilityFunctions::ms2phpTZ( $search ))
7531
  echo "PHP tz:'$search'&lt;br&gt;\n";
7532
.. .
7533
</p>
7534
<br>
7535
<br>
7536
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7537

    
7538

    
7539
<a name="transformDateTime"></a><h4>4.4 transformDateTime</h4>
7540
<p>
7541
Transforms a datetime from a time zone to another. (Requires <em>PHP</em> >= 5.2.0 and <em>PHP</em> DateTimeZone acceptable time zones).
7542
</p>
7543
<p>
7544
FALSE is returned if not using a &quot;strtotime&quot; acceptable datetime string or unacceptable <em>PHP</em> time zones.
7545
If TRUE, the dateTime argument (below) is converted to the new time zone, otherwise unaltered.
7546
</p>
7547
<p>
7548
A DATE input (&lt;year&gt;&lt;month&gt;&lt;day&gt;) will be expanded to a DATETIME (&lt;year&gt;&lt;month&gt;&lt;day&gt;000000) before transform.
7549
</p>
7550
<p class="label">Format</p>
7551
<p class="format">iCalUtilityFunctions::transformDateTime( dateTime, timezoneFrom [, timezoneTo [, format ]] )</p>
7552
<p class="comment">
7553
dateTime     = (array) ( &quot;year&quot;  =&gt; (int) year            // <span class="comment">input</span>
7554
                        , &quot;month&quot; =&gt; (int) month
7555
                        , &quot;day&quot;   =&gt; (int) day
7556
                       [, &quot;hour&quot;  =&gt; (int) hour
7557
                        , &quot;min&quot;   =&gt; (int) min
7558
                        , &quot;sec&quot;   =&gt; (int) sec ] )
7559
dateTime     = (array) ( (int) year                       // <span class="comment">input</span>
7560
                        , (int) month
7561
                        , (int) day
7562
                       [, (int) hour
7563
                        , (int) min
7564
                        , (int) sec ] )
7565
dateTime     = (array) ( &quot;timestamp&quot; =&gt; (int) timestamp ) // <span class="comment">input</span>
7566
dateTime     = (string) datetime string<sup>*</sup>                  // <span class="comment">input</span>
7567
dateTime     = (string) datetime string                   // <span class="comment">on successful output</span>
7568
timezoneFrom = (string) a <em>PHP</em> (DateTimeZone) valid time zone
7569
timezoneTo   = (string) a <em>PHP</em> (DateTimeZone) valid time zone, default &quot;UTC&quot;
7570
format       = (string) output format (any date formatting, default &quot;Ymd\THis&quot;)
7571
<br>datetime string<sup>*</sup> recommended formats
7572
    &quot;20110625&quot;,            &quot;2011-06-25&quot;,          &quot;2011/06/26&quot;
7573
    &quot;20110625051015&quot;,      &quot;20110625 051015&quot;
7574
    &quot;20110625T051015&quot;,     &quot;20110625t051015&quot;
7575
    &quot;2011-06-25 05:10:15&quot;, &quot;2011-06-25T05:10:15&quot;, &quot;2011-06-25t05:10:15&quot;
7576
    &quot;2011/06/25 05:10:15&quot;, &quot;2011/06/25T05:10:15&quot;, &quot;2011/06/25t05:10:15&quot;
7577
    other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
7578
    <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
7579
<p class="label">Example</p>
7580
<p>Convert from time zone &quot;Europe/Stockholm&quot; to &quot;UTC&quot;</p>
7581
<p class="example">&lt;?php
7582
.. .
7583
$d          = date( &quot;Y-m-d H:i:s&quot; );
7584
$tzFr       = &quot;Europe/Stockholm&quot;;
7585
if( FALSE !== iCalUtilityFunctions::transformDateTime( $d, $tzFr ))
7586
  $event-&gt;setProperty( &quot;dtstart&quot;, $d.&quot;Z&quot; );
7587
else
7588
  $event-&gt;setProperty( &quot;dtstart&quot;, $d, array( &quot;TZID&quot; => $tzFr ));
7589
.. .
7590
</p>
7591
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7592

    
7593

    
7594
<a name="mddtuf"></a><h4>4.5 Misc. date/duration/timestamp util. functions</h4>
7595
<p>
7596
iCalUtilityFunctions static date(-time)/timestamp functions.
7597
Please examine the class file for more information about arguments and output.
7598
</p>
7599
<dl>
7600
<dt>iCalUtilityFunctions::_chkDateArr( $datetime, $parno=FALSE )
7601
<dd>Returns internal date-time/date formatted (keyed) array for an input date-time/date array (keyed or unkeyed)
7602
<dd>name changed from _date_time_array (exists as alias, may be removed in future versions)
7603
<dt>iCalUtilityFunctions::_chkdatecfg( $theDate, & $parno, & $params )
7604
<dd>Check date(-time) and params arrays for an opt. timezone and if it is a DATE-TIME or DATE (updates $parno and (opt) $params)
7605
<dt>iCalUtilityFunctions::_date2strdate( $datetime, $parno=6 )
7606
<dd>Returns formatted output (string) for calendar component property data value type date/date-time
7607
<dd>name changed from _format_date_time (exists as alias, may be removed in future versions)
7608
<dt>iCalUtilityFunctions::_date2timestamp( $datetime, $wtz=null )
7609
<dd>Returns a timestamp (int) for a date/datetime (array)
7610
<dt>iCalUtilityFunctions::_duration2arr( $duration )
7611
<dd>Returns internal duration formatted (keyed) array for input in array format
7612
<dd>name changed from _duration_array (exists as alias, may be removed in future versions)
7613
<dt>iCalUtilityFunctions::_duration2date( $startdate, $duration )
7614
<dd>Returns a datetime (keyed) array for a startdate+duration
7615
<dt>iCalUtilityFunctions::_durationStr2arr( $duration )
7616
<dd>Returns internal duration formatted (keyed)  array for an input string (iCal) formatted duration
7617
<dd>name changed from _duration_string (exists as alias, may be removed in future versions)
7618
<dt>iCalUtilityFunctions::_duration2str( $duration )
7619
<dd>Returns a formatted string for a calendar component property data value type duration
7620
<dd>name changed from _format_duration (exists as alias, may be removed in future versions)
7621
<dt>iCalUtilityFunctions::_isArrayDate( $input )
7622
<dd>Returns bool TRUE if input contains a (array formatted) date/time
7623
<dt>iCalUtilityFunctions::_isArrayTimestampDate( $input )
7624
<dd>Returns bool TRUE if input array contains a timestamp date
7625
<dt>iCalUtilityFunctions::_isOffset( $input )
7626
<dd>Returns bool TRUE if input string contains (trailing) UTC/iCal offset
7627
<dt>iCalUtilityFunctions::offsetSec2His( $seconds )
7628
<dd>Returns iCal offset [-/+]hhmm[ss] (string) from UTC offset seconds
7629
<dt>iCalUtilityFunctions::_strDate2arr( & $input )
7630
<dd>Convert a date from specific string to (keyed) array format, returns TRUE on success
7631
<dt>iCalUtilityFunctions::_strdate2date( $datetime, $parno=FALSE, $wtz=null )
7632
<dd>Returns internal date-time/date formatted (keyed) array for input date-time/date in string fromat
7633
<dd>name changed from _date_time_string (exists as alias, may be removed in future versions)
7634
<dt>iCalUtilityFunctions::_timestamp2date( $timestamp, $parno=6, $wtz=null )
7635
<dd>Returns internal date-time/date formatted (keyed) array, based on a timestamp, default UTC or adjusted for offset/timezone
7636
<dt>iCalUtilityFunctions::_timestamp2duration( $timestamp )
7637
<dd>Returns internal duration formatted (keyed) array for a timestamp (i.e. seconds)
7638
<dt>iCalUtilityFunctions::_tz2offset( $tz )
7639
<dd>Returns seconds (int) from an offset, [+/-]HHmm[ss], used when correcting UTC to localtime or v.v.
7640
</dl>
7641
<br>
7642
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalUtilityFunctions">[up]</a>
7643

    
7644

    
7645
<a name="helperFunctions"></a><h1>5 Helper functions</h1>
7646
<p>The helper functions extend the utility of iCalcreator.</p>
7647

    
7648
<a name="XMLhelpers"></a><h3>5.1 iCal and XML helper functions</h3>
7649
<p>
7650
The XML helper functions convert iCal into XML and parse XML into iCal.
7651
XML is defined by rfc6321, &quot;xCal: The XML Format for <strong>iCalendar</strong>&quot;.
7652
</p>
7653
<a name="iCal2XML"></a><h4>5.1.1 iCal2XML</h4>
7654
<p>The iCal2XML function converts an iCalcreator object instance to XML.</p>
7655
<p>
7656
Requires <em>PHP</em> 5 and &quot;libxml&quot; <em>PHP</em> extension (--enable-libxml) and utilizes the SimpleXML extension.
7657
Before <em>PHP</em> 5.1.2, &quot;--enable-simplexml&quot; (at compile time) is required to enable this extension, after <em>PHP</em> 5.1.2 enabled by default.
7658
</p>
7659
<p>An rfc6321 XML string is returned.</p>
7660
<p class="label">Format</p>
7661
<p class="format">iCal2XML( iCalobj )</p>
7662
<p class="comment">iCalobj = (object) iCalcreator instance</p>
7663
<br>
7664
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7665

    
7666
<a name="XML2iCal"></a><h4>5.1.2 XML2iCal</h4>
7667
<p>
7668
The XML2iCal function, with the two entry functions: XMLstr2iCal and XMLfile2iCal, parse an XML string/file to an iCalcreator instance.
7669
The function is <b>not</b> using the <em>PHP</em> SimpleXML extension.
7670
</p>
7671
<p>
7672
On success, an iCalcreator instance is returned.
7673
</p>
7674
<p>
7675
On XML parse error, FALSE is returned.
7676
</p>
7677
<h5>XMLstr2iCal</h5>
7678
<p>
7679
The function accepts a well-formed (rfc6321) XML string as argument.
7680
</p>
7681
<p class="label">Format</p>
7682
<p class="format">XMLstr2iCal( xmlstr [, config] )</p>
7683
<p class="comment">xmlstr  = (string) rfc6321 XML
7684
config  = (array) iCalcreator config array (opt)</p>
7685
<h5>XMLfile2iCal</h5>
7686
<p>
7687
The function accepts an XML (rfc6321) local file or a remote URI, as argument.
7688
</p>
7689
<p class="label">Format</p>
7690
<p class="format">XMLfile2iCal( xmlfile [, config] )</p>
7691
<p class="comment">xmlfile = (string) rfc6321 XML file name or resource
7692
config  = (array) iCalcreator config array (opt)</p>
7693
<h5>XML2iCal</h5>
7694
<p>
7695
This function is doing the hard work in XMLstr2iCal/XMLfile2iCal functions.
7696
</p>
7697
<p class="label">Format</p>
7698
<p class="format">XML2iCal( xmlstr [, config] )</p>
7699
<p class="comment">xmlstr  = (string) rfc6321 XML
7700
config  = (array)  iCalcreator config array (opt)</p>
7701
<br>
7702

    
7703
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7704

    
7705

    
7706
<a name="vCardhelpers"></a><h3>5.2 vCard helper functions</h3>
7707
<p>
7708
The purpose of the vCard helper functions are to produce simplified vCard output.
7709
</p>
7710
<a name="iCal2vCard"></a><h4>5.2.1 iCal2vCard</h4>
7711
<p>
7712
Convert single <a href="#ATTENDEE">ATTENDEE</a>, <a href="#CONTACT">CONTACT</a> or
7713
<a href="#ORGANIZER">ORGANIZER</a> URI (in email format) to simplified vCard output or saved in vCard file.
7714
</p>
7715
<p>
7716
If argument directory is set, vCards are saved in (directory/) files, named like &lt;firstName&gt;.&lt;familyName&gt;.&quot;ext&quot;.
7717
</p>
7718
<p>
7719
Returns vCard string or TRUE if a valid directory is used as argument (and file write ok)
7720
otherwise FALSE.
7721
</p>
7722
<p class="label">Format</p>
7723
<p class="format">iCal2vCard( email [ ,version [ ,directory [ ,ext ]]] )</p>
7724
<p class="comment">
7725
email     = (string) ATTENDEE, CONTACT or ORGANIZER URI in email format
7726
version   = (string) vCard version, default &quot;2.1&quot;, opt. &quot;3.0&quot;/&quot;4.0&quot;
7727
directory = (string) if and where to save vCards files (write rights required), default FALSE
7728
ext       = (string) vCard file extension, default &quot;vcf&quot;
7729
</p>
7730
<br>
7731
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7732

    
7733
<a name="iCal2vCards"></a><h4>5.2.2 iCal2vCards</h4>
7734
<p>
7735
Collect and convert all <a href="#ATTENDEE">ATTENDEE</a>s, <a href="#CONTACT">CONTACT</a>s and
7736
<a href="#ORGANIZER">ORGANIZER</a>s (URI, in email format) to simplified vCard (string) output or
7737
saved in vCard files, using <a href="#iCal2vCard">iCal2vCard</a> function (above).
7738
</p>
7739
<p>
7740
The file name formatting and return values are described above in <a href="#iCal2vCard">iCal2vCard</a> function.
7741
</p>
7742
<p class="label">Format</p>
7743
<p class="format">iCal2vCards( vcalendar [ ,version [ ,directory [ ,ext ]]] )</p>
7744
<p class="comment">
7745
vcalendar = (object) iCalcreator object instance
7746
version   = (string) vCard version, default &quot;2.1&quot;, opt. &quot;3.0&quot;/&quot;4.0&quot;
7747
directory = (string) if and where to save vCards files (write rights required), default FALSE
7748
ext       = (string) vCard file extension, default &quot;vcf&quot;
7749
</p>
7750
<br>
7751
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7752

    
7753

    
7754
<a name="TZhelpers"></a><h3>5.3 time zone helper functions</h3>
7755
<p>
7756
Additional functions to use with vtimezone components.
7757
</p>
7758
<p>
7759
The <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function
7760
creates time zone transition information, based on vtimezone components contents in a iCalcreator calendar instance.
7761
</p>
7762
<p>
7763
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.
7764
</p>
7765
<p>
7766
Before calling the functions <a href="#getTzOffsetForDate">getTzOffsetForDate</a> and <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a>,
7767
set time zone 'GMT' ('date_default_timezone_set')!
7768
</p>
7769

    
7770
<a name="getTzOffsetForDate"></a><h4>5.3.1 getTzOffsetForDate</h4>
7771
<p>
7772
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.
7773
</p>
7774
<p>
7775
Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
7776
</p>
7777
<p>
7778
Returns array, time zone data for specific date (timestamp) with keys for
7779
</p>
7780
<ul>
7781
<li>&quot;offsetHis&quot; (+/-Hi[s])
7782
<li>&quot;offsetSec&quot;( UTC offset in seconds)
7783
<li>&quot;tzname&quot; (standard/daylight time zone name)
7784
</ul>
7785
<p class="label">Format</p>
7786
<p class="format">getTzOffsetForDate( timezonesarray, tzid, timestamp )</p>
7787
<p class="comment">timezonesarray = (array)  output from getTimezonesAsDateArrays, below
7788
tzid           = (string) time zone identifier
7789
timestamp      = (mixed)  the date in question (timestamp)
7790
                          or UTC datetime (array) ( &quot;year&quot;  =&gt; (int) year
7791
                                                  , &quot;month&quot; =&gt; (int) month
7792
                                                  , &quot;day&quot;   =&gt; (int) day
7793
                                                  , &quot;hour&quot;  =&gt; (int) hour
7794
                                                  , &quot;min&quot;   =&gt; (int) min
7795
                                                  , &quot;sec&quot;   =&gt; (int) sec )</p>
7796
<br>
7797
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7798

    
7799
<a name="getTimezonesAsDateArrays"></a><h4>5.3.2 getTimezonesAsDateArrays</h4>
7800
<p>
7801
The function creates time zone transition information,
7802
based on vtimezone component contents in a iCalcreator calendar instance,
7803
using sub-function expandTimezoneDates.
7804
</p>
7805
<p>
7806
Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
7807
</p>
7808
<p>
7809
Returns an array containing time zone data from vtimezone standard/daylight instances (input to <a href="#getTzOffsetForDate">getTzOffsetForDate</a>, above).
7810
</p>
7811
<p class="label">Format</p>
7812
<p class="format">getTimezonesAsDateArrays( iCalobj )</p>
7813
<p class="comment">iCalobj= (object) iCalcreator calendar instance</p>
7814
<br>
7815
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#helperFunctions">[up]</a>
7816

    
7817

    
7818
<a name="Copyright_and_Licence"></a><h1>6 COPYRIGHT AND LICENSE</h1>
7819

    
7820
<a name="Copyright"></a><h4>6.1 Copyright</h4>
7821
<p>
7822
iCalcreator v2.18<br>
7823
Copyright (c) 2007-2013 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
7824
<a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
7825
<a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
7826
</p>
7827

    
7828
<a name="Licence"></a><h4>6.2 License</h4>
7829
<p>
7830
This library is free software; you can redistribute it and/or
7831
modify it under the terms of the GNU Lesser General Public
7832
License as published by the Free Software Foundation; either
7833
version 2.1 of the License, or (at your option) any later version.
7834
</p>
7835
<p>
7836
This library is distributed in the hope that it will be useful,
7837
but WITHOUT ANY WARRANTY; without even the implied warranty of
7838
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7839
Lesser General Public License for more details.
7840
</p>
7841
<p>
7842
You should have received a copy of the GNU Lesser General Public
7843
License along with this library; if not, write to the Free Software
7844
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
7845
or download it <a href="http://kigkonsult.se/downloads/dl.php?f=LGPL" target="_blank">here</a>.
7846
</p>
7847
<br>
7848
<a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Copyright_and_Licence">[up]</a>
7849
</body>
7850
</html>