Palm::Datebook - Handler for Palm DateBook databases. |
Palm::Datebook - Handler for Palm DateBook databases.
use Palm::Datebook;
The Datebook PDB handler is a helper class for the Palm::PDB package. It parses DateBook databases.
The AppInfo block begins with standard category support. See the Palm::StdAppInfo manpage for details.
$pdb->{sort}
This is a scalar, the raw data of the sort block.
$record = $pdb->{records}[N]
$record->{day} $record->{month} $record->{year}
The day, month and year of the event. For repeating events, this is the first date at which the event occurs.
$record->{start_hour} $record->{start_minute} $record->{end_hour} $record->{end_minute}
The start and end times of the event. For untimed events, all of these are 0xff.
$record->{when_changed}
This is defined and true iff the ``when info'' for the record has changed. I don't know what this means.
$record->{alarm}{advance} $record->{alarm}{unit}
If the record has an alarm associated with it, the %{$record->{alarm}} hash exists. The ``unit'' subfield is an integer: 0 for minutes, 1 for hours, 2 for days. The ``advance'' subfield specifies how many units before the event the alarm should ring. e.g., if ``unit'' is 1 and ``advance'' is 5, then the alarm will sound 5 hours before the event.
If ``advance'' is -1, then there is no alarm associated with this event.
%{$record->{repeat}}
This has exists iff this is a repeating event.
$record->{repeat}{type}
An integer which specifies the type of repeat:
For weekly events, the following fields are defined:
@{$record->{repeat}{repeat_days}}
This is an array of 7 elements; each element is true iff the event occurs on the corresponding day. I don't know whether the array begins with Sunday, or with the start-of-week day as defined in the preferences.
$record->{repeat}{start_of_week}
I'm not sure what this is, but the Datebook app appears to perform some hairy calculations involving this.
For ``monthly by day'' events, the following fields are defined:
$record->{repeat}{weeknum}
The number of the week on which the event occurs. A value of 5 means that the event occurs on the last week of the month.
$record->{repeat}{daynum}
An integer, the day of the week on which the event occurs. Again, I don't know whether 0 means Sunday, or the start-of-week day as defined in the preferences.
$record->{repeat}{frequency}
Specifies the frequency of the repeat. For instance, if the event is a daily one, and $record->{repeat}{frequency} is 3, then the event occurs every 3 days.
$record->{repeat}{unknown}
I don't know what this is.
$record->{repeat}{end_day} $record->{repeat}{end_month} $record->{repeat}{end_year}
The last day, month and year on which the event occurs.
@{$record->{exceptions}} $day = $record->{exceptions}[N][0] $month = $record->{exceptions}[N][0] $year = $record->{exceptions}[N][0]
If there are any exceptions to a repeating event, e.g. a weekly meeting that was cancelled one time, then the @{$record->{exceptions}} array is defined.
Each element in this array is a reference to an anonymous array with three elements: the day, month, and year of the exception.
$record->{description}
A text string, the description of the event.
$record->{note}
A text string, the note (if any) attached to the event.
$pdb = new Palm::Datebook;
Create a new PDB, initialized with the various Palm::Datebook fields and an empty record list.
$record = $pdb->new_Record;
Creates a new Datebook record, with blank values for all of the fields.
Andrew Arensburger <arensb@ooblick.com>
Palm::PDB(3)
Palm::StdAppInfo(3)
Palm::Datebook - Handler for Palm DateBook databases. |