1Palm::Datebook(3) User Contributed Perl Documentation Palm::Datebook(3)
2
3
4
6 Palm::Datebook - Handler for Palm OS DateBook and Calendar databases
7
9 This document describes version 1.400 of Palm::Datebook, released March
10 14, 2015 as part of Palm version 1.400.
11
13 use Palm::Datebook;
14
16 The Datebook PDB handler is a helper class for the Palm::PDB package.
17 It parses DateBook and Calendar databases.
18
19 AppInfo block
20 The AppInfo block begins with standard category support. See
21 Palm::StdAppInfo for details.
22
23 Sort block
24 $pdb->{sort}
25
26 This is a scalar, the raw data of the sort block.
27
28 Records
29 $record = $pdb->{records}[N]
30
31 $record->{day}
32 $record->{month}
33 $record->{year}
34
35 The day, month and year of the event. The day and month start at 1
36 (i.e., for January, "$record->{month}" is set to 1). The year is a
37 four-digit number (for dates in 2001, "$record->{year}" is "2001").
38
39 For repeating events, these fields specify the first date at which the
40 event occurs.
41
42 $record->{start_hour}
43 $record->{start_minute}
44 $record->{end_hour}
45 $record->{end_minute}
46
47 The start and end times of the event. For untimed events, all of these
48 are 0xff.
49
50 $record->{when_changed}
51
52 This is defined and true iff the "when info" for the record has
53 changed. I don't know what this means.
54
55 $record->{alarm}{advance}
56 $record->{alarm}{unit}
57
58 If the record has an alarm associated with it, the %{$record->{alarm}}
59 hash exists. The "unit" subfield is an integer: 0 for minutes, 1 for
60 hours, 2 for days. The "advance" subfield specifies how many units
61 before the event the alarm should ring. e.g., if "unit" is 1 and
62 "advance" is 5, then the alarm will sound 5 hours before the event.
63
64 If "advance" is -1, then there is no alarm associated with this event.
65 New records created via "new_Record" have a 10 minute alarm set by
66 default. "undef $record->{alarm}" to remove this alarm before writing.
67 An alarm icon will still show up in the Datebook if the "alarm" field
68 exists, even with "advance" set to -1.
69
70 %{ $record->{repeat} }
71
72 This exists iff this is a repeating event.
73
74 $record->{repeat}{type}
75
76 An integer which specifies the type of repeat:
77
78 0 no repeat.
79
80 1 a daily event, one that occurs every day.
81
82 2 a weekly event, one that occurs every week on the same day(s). An
83 event may occur on several days every week, e.g., every Monday,
84 Wednesday and Friday.
85
86 For weekly events, the following fields are defined:
87
88 @{ $record->{repeat}{repeat_days} }
89
90 This is an array of 7 elements; each element is true iff the event
91 occurs on the corresponding day. Element 0 is Sunday, element 1 is
92 Monday, and so forth.
93
94 $record->{repeat}{start_of_week}
95
96 Day the week starts on (0 for Sunday, 1 for Monday). This affects
97 the phase of events that repeat every 2nd (or more) Sunday.
98
99 3 a "monthly by day" event, e.g., one that occurs on the second
100 Friday of every month.
101
102 For "monthly by day" events, the following fields are defined:
103
104 $record->{repeat}{weeknum}
105
106 The number of the week on which the event occurs. 0 means the first
107 week of the month, 1 means the second week of the month, and so
108 forth. A value of 5 means that the event occurs on the last week
109 of the month.
110
111 $record->{repeat}{daynum}
112
113 An integer, the day of the week on which the event occurs. 0 means
114 Sunday, 1 means Monday, and so forth.
115
116 4 a "monthly by date" event, e.g., one that occurs on the 12th of
117 every month.
118
119 5 a yearly event, e.g., one that occurs every year on December 25th.
120
121 $record->{repeat}{frequency}
122
123 Specifies the frequency of the repeat. For instance, if the event
124 is a daily one, and $record->{repeat}{frequency} is 3, then the
125 event occurs every 3 days.
126
127 $record->{repeat}{unknown}
128
129 I don't know what this is.
130
131 $record->{repeat}{end_day}
132 $record->{repeat}{end_month}
133 $record->{repeat}{end_year}
134
135 The last day, month and year on which the event occurs.
136
137 @{ $record->{exceptions} }
138 $day = $record->{exceptions}[N][0]
139 $month = $record->{exceptions}[N][1]
140 $year = $record->{exceptions}[N][2]
141
142 If there are any exceptions to a repeating event, e.g. a weekly meeting
143 that was cancelled one time, then the @{$record->{exceptions}} array is
144 defined.
145
146 Each element in this array is a reference to an anonymous array with
147 three elements: the day, month, and year of the exception.
148
149 $record->{description}
150
151 A text string, the description of the event.
152
153 $record->{location}
154
155 A text string, the location (if any) of the event (Calendar database
156 only).
157
158 $record->{note}
159
160 A text string, the note (if any) attached to the event.
161
162 %{ $record->{timezone} }
163
164 This exists iff a time zone has been set for the event.
165
166 $record->{timezone}{name}
167
168 The time zone name, e.g., "London" or "San Francisco".
169
170 $record->{timezone}{country}
171
172 The country the time zone is in. This is an integer defined in
173 Core/System/PalmLocale.h.
174
175 $record->{timezone}{offset}
176
177 This gives the offset from UTC, in minutes, of the time zone.
178
179 $record->{timezone}{dst_adjustment}
180
181 This gives the additional offset while daylight savings time is in
182 effect. The offset from UTC is $record->{timezone}{offset} +
183 $record->{timezone}{dst_adjustment} (actually only 0 or 60 are used).
184
185 $record->{timezone}{custom}
186
187 Should indicate whether this location was created by the user, though
188 this always seems to be true.
189
190 $record->{timezone}{flags}
191
192 Reserved flags.
193
194 $record->{timezone}{start_hour}
195 $record->{timezone}{start_daynum}
196 $record->{timezone}{start_weeknum}
197 $record->{timezone}{start_month}
198 $record->{timezone}{end_hour}
199 $record->{timezone}{end_daynum}
200 $record->{timezone}{end_weeknum}
201 $record->{timezone}{end_month}
202
203 These define the period during which daylight savings time is in effect
204 if $record->{timezone}{dst_adjustment} is non-zero. daynum specifies
205 the day of week (0=Sunday, 6=Saturday) and weeknum specifies the week
206 of month (0=1st, 3=4th, 4=last), analagously to the "monthly by day"
207 repeating event. e.g., The "London" time zone has DST starting on the
208 last Sunday of March, which is indicated with start_daynum=0 (Sunday),
209 start_weeknum=4 (last week of the month), and start_month=3 (March).
210
212 new
213 $pdb = new Palm::Datebook;
214 $pdb = new Palm::Datebook({app => 'Calendar'});
215
216 Create a new PDB, initialized with the various Palm::Datebook fields
217 and an empty record list. Creates a Datebook PDB by default. Specify
218 the app parameter as 'Calendar' to create a Calendar PDB.
219
220 new_Record
221 $record = $pdb->new_Record;
222
223 Creates a new Datebook record, with blank values for all of the fields.
224
225 "new_Record" does not add the new record to $pdb. For that, you want
226 "$pdb->append_Record".
227
229 Palm::PDB
230
231 Palm::StdAppInfo
232
234 Palm::Datebook requires no configuration files or environment
235 variables.
236
238 None reported.
239
241 No bugs have been reported.
242
244 Andrew Arensburger "<arensb AT ooblick.com>"
245
246 Currently maintained by Christopher J. Madsen "<perl AT cjmweb.net>"
247
248 Please report any bugs or feature requests to
249 "<bug-Palm AT rt.cpan.org>" or through the web interface at
250 <http://rt.cpan.org/Public/Bug/Report.html?Queue=Palm>.
251
252 You can follow or contribute to p5-Palm's development at
253 <https://github.com/madsen/p5-Palm>.
254
256 This software is copyright (c) 2003 by Andrew Arensburger & Alessandro
257 Zummo.
258
259 This is free software; you can redistribute it and/or modify it under
260 the same terms as the Perl 5 programming language system itself.
261
263 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
264 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
265 WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
266 PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
267 EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
268 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
269 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
270 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
271 NECESSARY SERVICING, REPAIR, OR CORRECTION.
272
273 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
274 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
275 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE
276 TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
277 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
278 SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
279 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
280 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
281 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
282 DAMAGES.
283
284
285
286perl v5.30.1 2020-01-30 Palm::Datebook(3)