Mark iCal event as "all day" with Perl module Data::ICal
There is a huge Perl module Data::ICal that makes it possible to create
iCal files that can be added to Calendar app on mac (they also can be
added to a lot of other programmes).
I've used Data::ICal and I have written a simple script that creates iCal
file. I've added it the Calendar app and it works fine.
Here is the listing:
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use Data::ICal;
use Data::ICal::Entry::Event;
use Date::ICal;
use File::Slurp;
my $calendar = Data::ICal->new();
my $ical_date = Date::ICal->new(
year => 2013,
month => 9,
day => 6,
);
my $event = Data::ICal::Entry::Event->new();
$event->add_properties(
summary => "my party",
description => "I'll cry if I want to",
dtstart => $ical_date->ical(),
);
$calendar->add_entry($event);
write_file('sample.ics', $calendar->as_string);
But now I want to mark this event as lasting for the whole day. I've
grepped throw the module source docs and code, but I havn't found the way
to do it.
How can I mark this event as lasting for the whole day?
No comments:
Post a Comment