Subject: | Ical date bug(?); feature request |
Date: | Thu, 7 Mar 2019 16:31:01 -0700 |
To: | bug-data-ical [...] rt.cpan.org |
From: | Charles Curley <charlescurley [...] charlescurley.com> |
I am no ical expert, but may have hit on a bug in Data::ICal.
I want to make a series of events as "all day". As near as I can tell,
to do that, you provide a day only as DTSTART and DTEND. So I figured
out that you have to force those two values to be of data type DATE,
like so:
my $event = Data::ICal::Entry::Event->new();
$event->add_properties(
...
dtstart => [ $dt, { VALUE => 'DATE' } ],
dtstart => $dt,
dtend => $dt,
);
So far so good. The output is,
DTEND:VALUE=DATE:20190116
DTSTART:VALUE=DATE:20190116
Unfortunately that fails the icalendar validator at
https://icalendar.org/validator.html. Also, nextcloud
(https://nextcloud.com/) refuses to import it, which is one of my
requirements.
The validator and nextcloud accepts these:
DTEND;VALUE=DATE:20190116
DTSTART;VALUE=DATE:20190116
The difference is that for the first punctuation mark the validator
requires a semicolon (;), not a colon (:).
It would also be nice if the code could figure out on its own to make
the value a DATE.
Thank you.
--
"When we talk of civilization, we are too apt to limit the meaning of
the word to its mere embellishments, such as arts and sciences; but
the true distinction between it and barbarism is, that the one
presents a state of society under the protection of just and
well-administered law, and the other is left to the chance government
of brute force."
- The Rev. James White, Eighteen Christian Centuries, 1889
Key fingerprint = CE5C 6645 A45A 64E4 94C0 809C FFF6 4C48 4ECD DFDB
https://charlescurley.com