[microformats-discuss] Repeating cal events?
Tantek Ç elik
tantek at cs.stanford.edu
Sun Jul 31 19:55:08 PDT 2005
Ryan wrote:
>> I believe this has been figured out and implemented on the squid list
>> calendar [http://laughingsquid.com/squidlist/calendar/], though I
>> can't seem to find any clues in the source of the their html.
/me digs through his Sent Mail for the answer given to Laughing Squid a few
moons ago.
...
Ok, here is a particularly complex example which I figured out almost three
months ago.
Note, this is an illustrative example for an event that has multiple
occurrences (RDATE), which is different from an event that occurs regularly
(RRULE), like Ernie's example.
=====================
Here are the event times shown on the web page:
http://laughingsquid.com/squidlist/calendar/9584/2005/4/7
Thu, Apr 7 : Tu/Wed: 12-4pm Th/Fr/Sat 12-7pm Sun 12-6pm
In addition, later on in the description, it says:
April 7-21, 2005
So for the sake of this example, I'm going to use that information in the
markup for the event times even though the submitter of the event failed to
explicitly list the end date at the top.
This is actually quite a non-trivial example, because the event lasts for
different durations on different days (4 hours, 7 hours, 6 hours).
Because of the differing durations, the specification requires that *each*
instance of this recurring event be explicitly specified.
But first we markup the starting date and time explicitly:
<abbr class="dtstart" title="20050407T1200-0700">Thu, Apr 7</abbr> :
Then we put in the quite lengthy explicit specification of every other time
the event occurs, marked up around the human readable description.
<abbr class="rdate" title="value=period:20050407T1200-0700/PT7H,
20050408T1200-0700/PT7H, 20050409T1200-0700/PT7H, 20050410T1200-0700/PT6H,
20050412T1200-0700/PT4H, 20050413T1200-0700/PT4H, 200504014T1200-0700/PT7H,
20050415T1200-0700/PT7H, 20050416T1200-0700/PT7H, 20050417T1200-0700/PT6H,
20050419T1200-0700/PT4H, 20050420T1200-0700/PT4H, 20050421T1200-0700/PT7H"
>Tu/Wed: 12-4pm Th/Fr/Sat 12-7pm Sun 12-6pm</abbr>
The RDATE "PERIOD" format is fairly straightforward. You simply list *each*
occurrence of the event, separated by commas. Each occurrence consists of
the ISO8601 datetime of the start of the event, followed by a slash "/",
followed by *either* the duration of the event (e.g. 7 hours = PT7H), *or* a
complete ISO8601 datetime of the end of the event. I chose to use the
duration of the event for this example for reason of brevity.
============
Thanks,
Tantek
/me goes off to code Ernie's example now...
More information about the microformats-discuss
mailing list