I tried this to create an iCalendar entry that Outlook could read:
use Data::ICal;
use Data::ICal::Entry::Event;
use Date::ICal;
use strict;
my $calendar = Data::ICal->new();
my $vtodo = Data::ICal::Entry::Event->new();
$vtodo->add_properties(
summary => "some fun",
description => "a fun thing to do",
dtstart => Date::ICal->new ( day => 29,
month => 6,
year => 2006,
hour => 7,
min => 15,
sec => 00
)->ical,
dtend => Date::ICal->new(day => 29,
month => 6,
year => 2006,
hour => 7,
min => 45,
sec => 00
)->ical,
);
$calendar->add_entry($vtodo);
print $calendar->as_string;
The entry looks like this:
BEGIN:VCALENDAR
PRODID:Data::ICal 0.07
VERSION:2.0
BEGIN:VEVENT
DESCRIPTION:a fun thing to do
DTEND:20060629T134500Z
DTSTART:20060629T131500Z
SUMMARY:some fun
END:VEVENT
END:VCALENDAR
Which looks reasonable to me. Outlook says "The operation failed." when I put the output into an ics file and import it.
Ideas?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.