.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Palm::Datebook 3pm" .TH Palm::Datebook 3pm "2013-08-21" "perl v5.18.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Palm::Datebook \- Handler for Palm DateBook and Calendar databases. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Palm::Datebook; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Datebook \s-1PDB\s0 handler is a helper class for the Palm::PDB package. It parses DateBook and Calendar databases. .SS "AppInfo block" .IX Subsection "AppInfo block" The AppInfo block begins with standard category support. See Palm::StdAppInfo for details. .SS "Sort block" .IX Subsection "Sort block" .Vb 1 \& $pdb\->{sort} .Ve .PP This is a scalar, the raw data of the sort block. .SS "Records" .IX Subsection "Records" .Vb 1 \& $record = $pdb\->{records}[N] \& \& $record\->{day} \& $record\->{month} \& $record\->{year} .Ve .PP The day, month and year of the event. The day and month start at 1 (\fIi.e.\fR, for January, \f(CW\*(C`$record\->{month}\*(C'\fR is set to 1). The year is a four-digit number (for dates in 2001, \f(CW\*(C`$record\->{year}\*(C'\fR is \&\*(L"2001\*(R"). .PP For repeating events, these fields specify the first date at which the event occurs. .PP .Vb 4 \& $record\->{start_hour} \& $record\->{start_minute} \& $record\->{end_hour} \& $record\->{end_minute} .Ve .PP The start and end times of the event. For untimed events, all of these are 0xff. .PP .Vb 1 \& $record\->{when_changed} .Ve .PP This is defined and true iff the \*(L"when info\*(R" for the record has changed. I don't know what this means. .PP .Vb 2 \& $record\->{alarm}{advance} \& $record\->{alarm}{unit} .Ve .PP If the record has an alarm associated with it, the %{$record\->{alarm}} hash exists. The \*(L"unit\*(R" subfield is an integer: 0 for minutes, 1 for hours, 2 for days. The \*(L"advance\*(R" subfield specifies how many units before the event the alarm should ring. \&\fIe.g.\fR, if \*(L"unit\*(R" is 1 and \*(L"advance\*(R" is 5, then the alarm will sound 5 hours before the event. .PP If \f(CW\*(C`advance\*(C'\fR is \-1, then there is no alarm associated with this event. New records created via \f(CW\*(C`new_Record\*(C'\fR have a 10 minute alarm set by default. \f(CW\*(C`undef $record\->{alarm}\*(C'\fR to remove this alarm before writing. An alarm icon will still show up in the Datebook if the \f(CW\*(C`alarm\*(C'\fR field exists, even with \f(CW\*(C`advance\*(C'\fR set to \-1. .PP .Vb 1 \& %{$record\->{repeat}} .Ve .PP This exists iff this is a repeating event. .PP .Vb 1 \& $record\->{repeat}{type} .Ve .PP An integer which specifies the type of repeat: .IP "0" 4 no repeat. .IP "1" 4 .IX Item "1" a daily event, one that occurs every day. .IP "2" 4 .IX Item "2" a weekly event, one that occurs every week on the same day(s). An event may occur on several days every week, \fIe.g.\fR, every Monday, Wednesday and Friday. .Sp For weekly events, the following fields are defined: .Sp .Vb 1 \& @{$record\->{repeat}{repeat_days}} .Ve .Sp This is an array of 7 elements; each element is true iff the event occurs on the corresponding day. Element 0 is Sunday, element 1 is Monday, and so forth. .Sp .Vb 1 \& $record\->{repeat}{start_of_week} .Ve .Sp Day the week starts on (0 for Sunday, 1 for Monday). This affects the phase of events that repeat every 2nd (or more) Sunday. .IP "3" 4 .IX Item "3" a \*(L"monthly by day\*(R" event, \fIe.g.\fR, one that occurs on the second Friday of every month. .Sp For \*(L"monthly by day\*(R" events, the following fields are defined: .Sp .Vb 1 \& $record\->{repeat}{weeknum} .Ve .Sp The number of the week on which the event occurs. 0 means the first week of the month, 1 means the second week of the month, and so forth. A value of 5 means that the event occurs on the last week of the month. .Sp .Vb 1 \& $record\->{repeat}{daynum} .Ve .Sp An integer, the day of the week on which the event occurs. 0 means Sunday, 1 means Monday, and so forth. .IP "4" 4 .IX Item "4" a \*(L"monthly by date\*(R" event, \fIe.g.\fR, one that occurs on the 12th of every month. .IP "5" 4 .IX Item "5" a yearly event, \fIe.g.\fR, one that occurs every year on December 25th. .Sp .Vb 1 \& $record\->{repeat}{frequency} .Ve .Sp Specifies the frequency of the repeat. For instance, if the event is a daily one, and \f(CW$record\fR\->{repeat}{frequency} is 3, then the event occurs every 3 days. .PP .Vb 1 \& $record\->{repeat}{unknown} .Ve .PP I don't know what this is. .PP .Vb 3 \& $record\->{repeat}{end_day} \& $record\->{repeat}{end_month} \& $record\->{repeat}{end_year} .Ve .PP The last day, month and year on which the event occurs. .PP .Vb 4 \& @{$record\->{exceptions}} \& $day = $record\->{exceptions}[N][0] \& $month = $record\->{exceptions}[N][1] \& $year = $record\->{exceptions}[N][2] .Ve .PP If there are any exceptions to a repeating event, \fIe.g.\fR a weekly meeting that was cancelled one time, then the @{$record\->{exceptions}} array is defined. .PP Each element in this array is a reference to an anonymous array with three elements: the day, month, and year of the exception. .PP .Vb 1 \& $record\->{description} .Ve .PP A text string, the description of the event. .PP .Vb 1 \& $record\->{location} .Ve .PP A text string, the location (if any) of the event (Calendar database only). .PP .Vb 1 \& $record\->{note} .Ve .PP A text string, the note (if any) attached to the event. .PP .Vb 1 \& %{$record\->{timezone}} .Ve .PP This exists iff a time zone has been set for the event. .PP .Vb 1 \& $record\->{timezone}{name} .Ve .PP The time zone name, \fIe.g.\fR, \*(L"London\*(R" or \*(L"San Francisco\*(R". .PP .Vb 1 \& $record\->{timezone}{country} .Ve .PP The country the time zone is in. This is an integer defined in Core/System/PalmLocale.h. .PP .Vb 1 \& $record\->{timezone}{offset} .Ve .PP This gives the offset from \s-1UTC,\s0 in minutes, of the time zone. .PP .Vb 1 \& $record\->{timezone}{dst_adjustment} .Ve .PP This gives the additional offset while daylight savings time is in effect. The offset from \s-1UTC\s0 is \f(CW$record\fR\->{timezone}{offset} + \f(CW$record\fR\->{timezone}{dst_adjustment} (actually only 0 or 60 are used). .PP .Vb 1 \& $record\->{timezone}{custom} .Ve .PP Should indicate whether this location was created by the user, though this always seems to be true. .PP .Vb 1 \& $record\->{timezone}{flags} .Ve .PP Reserved flags. .PP .Vb 8 \& $record\->{timezone}{start_hour} \& $record\->{timezone}{start_daynum} \& $record\->{timezone}{start_weeknum} \& $record\->{timezone}{start_month} \& $record\->{timezone}{end_hour} \& $record\->{timezone}{end_daynum} \& $record\->{timezone}{end_weeknum} \& $record\->{timezone}{end_month} .Ve .PP These define the period during which daylight savings time is in effect if \f(CW$record\fR\->{timezone}{dst_adjustment} is non-zero. daynum specifies the day of week (0=Sunday, 6=Saturday) and weeknum specifies the week of month (0=1st, 3=4th, 4=last), analagously to the \*(L"monthly by day\*(R" repeating event. \&\fIe.g.\fR, The \*(L"London\*(R" time zone has \s-1DST\s0 starting on the last Sunday of March, which is indicated with start_daynum=0 (Sunday), start_weeknum=4 (last week of the month), and start_month=3 (March). .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" .Vb 2 \& $pdb = new Palm::Datebook; \& $pdb = new Palm::Datebook({app => \*(AqCalendar\*(Aq}); .Ve .PP Create a new \s-1PDB,\s0 initialized with the various Palm::Datebook fields and an empty record list. Creates a Datebook \s-1PDB\s0 by default. Specify the app parameter as 'Calendar' to create a Calendar \s-1PDB.\s0 .SS "new_Record" .IX Subsection "new_Record" .Vb 1 \& $record = $pdb\->new_Record; .Ve .PP Creates a new Datebook record, with blank values for all of the fields. .PP \&\f(CW\*(C`new_Record\*(C'\fR does \fBnot\fR add the new record to \f(CW$pdb\fR. For that, you want \f(CW\*(C`$pdb\->append_Record\*(C'\fR. .SH "SOURCE CONTROL" .IX Header "SOURCE CONTROL" The source is in Github: .PP .Vb 1 \& http://github.com/briandfoy/p5\-Palm/tree/master .Ve .SH "AUTHOR" .IX Header "AUTHOR" Alessandro Zummo, \f(CW\*(C`\*(C'\fR .PP Currently maintained by brian d foy, \f(CW\*(C`\*(C'\fR .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIPalm::PDB\fR\|(3) .PP \&\fIPalm::StdAppInfo\fR\|(3)