hcalendar: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(Comment out NON FUNCTIONING example (was not working, even before my preceding edit) - needs attention)
m (Replace <entry-title> with {{DISPLAYTITLE:}})
(79 intermediate revisions by 28 users not shown)
Line 1: Line 1:
<(削除) h1 (削除ここまで)>hCalendar</(削除) h1 (削除ここまで)>
(追記) {{DISPLAYTITLE:hCalendar 1.0}} (追記ここまで)
(追記) {{latest|h-event}} (追記ここまで)
(追記) <span class="vcard"><span class="fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="role">Editor</span>, <span class="role">Author</span>)</span>, <span class="vcard"><span class="fn">[[User:Brian|Brian Suda]]</span> (<span class="role">Author</span>)</span> (追記ここまで)
(追記) ---- (追記ここまで)
<(追記) dfn style="font-style:normal;font-weight:bold" (追記ここまで)>hCalendar</(追記) dfn (追記ここまで)> (追記) is a simple, open format for publishing events on the web, using a 1:1 representation of iCalendar ([[rfc-2445|RFC2445]]) VEVENT properties and values in HTML. hCalendar is one of several open [[microformats|microformat]] standards suitable for embedding data in HTML/HTML5, and Atom/RSS/XHTML or other XML. (追記ここまで)


(削除) hCalendar (削除ここまで)is a simple(削除) , open, distributed calendaring and events format, based on the iCalendar standard ([http (削除ここまで):(削除) //www.ietf (削除ここまで).org(削除) /rfc/rfc2445.txt RFC2445]), suitable for embedding (削除ここまで)in (削除) (X)HTML, Atom (削除ここまで), (削除) RSS (削除ここまで), (削除) and arbitrary XML. hCalendar is one of several open [[microformats|microformat]] standards (削除ここまで).
(追記) [[hcalendar#Copyright|Copyright]] and [[hcalendar#Patents|patents]] statements apply. See [[hcalendar#Inspiration_and_Acknowledgments|acknowledgments]]. (追記ここまで)
(追記) == Example == (追記ここまで)
(追記) Here (追記ここまで)is a simple (追記) prose event (追記ここまで):
(追記) <blockquote><p>The microformats (追記ここまで).org (追記) site was launched on 2005年06月20日 at the Supernova Conference (追記ここまで)in (追記) San Francisco (追記ここまで), (追記) CA (追記ここまで), (追記) USA (追記ここまで).(追記) </p></blockquote> (追記ここまで)


(削除) Want to get started (削除ここまで)with (削除) writing an [[hcalendar| (削除ここまで)hCalendar(削除) ]] event? Use the [http:// (削除ここまで)microformats.org/(削除) code/hcalendar (削除ここまで)/(削除) creator hCalendar creator] to write up an event and publish it, or follow (削除ここまで)the (削除) [[hcalendar-authoring|hCalendar authoring tips]] to add hCalendar markup to your page of upcoming events or events you mention (削除ここまで)in (削除) blog posts (削除ここまで), (削除) wikis (削除ここまで), (削除) etc (削除ここまで).
(追記) marked up (追記ここまで)with hCalendar
(追記) <source lang=html4strict> (追記ここまで)
(追記) <span class="vevent"> (追記ここまで)
(追記) <span class="summary">The (追記ここまで)microformats.org (追記) site was launched< (追記ここまで)/(追記) span> (追記ここまで)
(追記) on <span class="dtstart">2005年06月20日< (追記ここまで)/(追記) span> (追記ここまで)
(追記) at (追記ここまで)the (追記) Supernova Conference (追記ここまで)
(追記) (追記ここまで)in (追記) <span class="location">San Francisco (追記ここまで), (追記) CA (追記ここまで), (追記) USA</span> (追記ここまで).
(追記) </span> (追記ここまで)
(追記) </source> (追記ここまで)


(削除) __TOC__ (削除ここまで)
(追記) '''Want to get started with writing an [[hcalendar|hCalendar]] event?''' Use the [http://microformats.org/code/hcalendar/creator hCalendar creator] to write up an event and publish it, or follow the [[hcalendar-authoring|hCalendar authoring tips]] to add hCalendar markup to your page of upcoming events or events you mention in blog posts, wikis, etc. (追記ここまで)


== (削除) Specification (削除ここまで)==
== (追記) Status (追記ここまで)==
(追記) hCalendar 1.0 is a microformats.org specification. Public discussion on hCalendar takes place on [[hcalendar-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-discuss/ microformats-discuss mailing list]. (追記ここまで)


(削除) ; Editor : [http://tantek (削除ここまで).(削除) com/ Tantek Çelik] ( (削除ここまで)[(削除) http://technorati.com Technorati, Inc]) (削除ここまで)
(追記) === Available languages === (追記ここまで)
(削除) ; Authors : (削除ここまで)[(削除) http://tantek.com/ Tantek Çelik (削除ここまで)](削除) , [http://technorati.com Technorati, Inc (削除ここまで)]
(追記) The English version of this specification is the only normative version (追記ここまで). (追記) For translations of this document see the (追記ここまで)[[(追記) #translations (追記ここまで)]] (追記) section (追記ここまで).
(削除) : [http://suda (削除ここまで).(削除) co.uk/ Brian Suda] (削除ここまで)


=== (削除) Copyright (削除ここまで)===
=== (追記) Errata and Updates (追記ここまで)===
(削除) {{MicroFormatCopyrightStatement2004}} (削除ここまで)
(追記) Known errors and issues in this specification are corrected in [[hcalendar-issues-resolved|resolved]] and [[hcalendar-issues-closed|closed]] issues. Please check there before reporting [[hcalendar-issues|issues]]. (追記ここまで)


(削除) === Patents === (削除ここまで)
(追記) Note in particular the [[dtend-issue]] which affects end dates. Implementations (追記ここまで){{(追記) should (追記ここまで)}} (追記) implement the issue resolution ASAP and [http://ufxtract.com/testsuite/hcalendar/hcalendar1.htm test it]. (追記ここまで)
{{(削除) MicroFormatPatentStatement (削除ここまで)}}


(削除) === Inspiration (削除ここまで)and (削除) Acknowledgments === (削除ここまで)
(追記) The hCalendar 1.0.1 update is currently under development (追記ここまで)and (追記) incorporates known errata corrections as well as (追記ここまで)the [(追記) [value-class-pattern] (追記ここまで)].
(削除) Thanks to: (削除ここまで)
(削除) * Adam Bosworth for leading (削除ここまで)the [(削除) http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOO Camp 2004 HTML For Calendars presentation (削除ここまで)] (削除) which brought together a critical mass of interested parties (削除ここまで).


== Introduction ==
== Introduction ==
Line 28: Line 41:
In addition, bloggers often discuss events on their blogs -- upcoming events, writeups of past events, etc. With just a tad bit of structure, bloggers can discuss events in their blog(s) in such a way that spiders and other aggregators can retrieve such events, automatically convert them to iCalendar, and use them in any iCalendar application or service.
In addition, bloggers often discuss events on their blogs -- upcoming events, writeups of past events, etc. With just a tad bit of structure, bloggers can discuss events in their blog(s) in such a way that spiders and other aggregators can retrieve such events, automatically convert them to iCalendar, and use them in any iCalendar application or service.


This specification introduces the '''hCalendar''' format, which is a 1:1 representation of the aforementioned iCalendar standard, in semantic (削除) XHTML (削除ここまで). Bloggers can both embed hCalendar events directly in their web pages, and style them with CSS to make them appear as desired. In addition, hCalendar enables applications to retrieve information about such events directly from web pages without having to reference a separate file.
This specification introduces the '''hCalendar''' format, which is a 1:1 representation of the aforementioned iCalendar standard, in semantic (追記) HTML (追記ここまで). Bloggers can both embed hCalendar events directly in their web pages, and style them with CSS to make them appear as desired. In addition, hCalendar enables applications to retrieve information about such events directly from web pages without having to reference a separate file.
(追記) {{rfc-2119-intro}} (追記ここまで)


== Semantic XHTML Design Principles ==
== Semantic XHTML Design Principles ==
Line 34: Line 49:
{{semantic-xhtml-design-principles}}
{{semantic-xhtml-design-principles}}


For practical implementations, it should be noted that Internet Explorer's support for styling <abbr> elements is poor, and may require wrapper elements.
For practical implementations, it should be noted that Internet Explorer's support for styling (追記) <code><nowiki> (追記ここまで)<abbr(追記) ></nowiki></code (追記ここまで)> elements is poor, and may require wrapper elements.


== Format ==
== Format ==
(削除) (削除ここまで)
=== In General ===
=== In General ===
(削除) (削除ここまで)
The iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]) forms the basis of hCalendar.
The iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]) forms the basis of hCalendar.


Note: the editor and authors of this specification are tracking the [http://lists.osafoundation.org/pipermail/ietf-calsify/ "iCal-Basic" effort] and intend to base the core hCalendar profile on iCal-Basic. See references for a link to the current draft.
Note: the editor and authors of this specification are tracking the [http://lists.osafoundation.org/pipermail/ietf-calsify/ "iCal-Basic" effort] and intend to base the core hCalendar profile on iCal-Basic. See references for a link to the current draft.


The basic format of hCalendar is to use iCalendar object/property names in lower-case for class names, and to map the nesting of iCalendar objects directly into nested XHTML.
The basic format of hCalendar is to use iCalendar object/property names in lower-case for class names, and to map the nesting of iCalendar objects directly into nested XHTML (追記) elements. (追記ここまで)
(追記) === Root Class Name === (追記ここまで)
(追記) The root class name for hCalendar is "vcalendar". An element with a class name of "vcalendar" is itself called an ''hCalendar''. (追記ここまで)
(追記) The root class name for events is "vevent". An element with a class name of "vevent" is itself called an ''hCalendar event''. (追記ここまで)
(追記) For authoring convenience, both "vevent" and "vcalendar" are treated as root class names for parsing purposes. If a document contains elements with class name "vevent" but not "vcalendar", the entire document has an implied "vcalendar" context. (追記ここまで)
(追記) '''vevent''' should be considered required for each event listing. (追記ここまで)
(追記) === Properties and Sub-properties === (追記ここまで)
(追記) The properties of an hCalendar are represented by elements inside the hCalendar. Elements with class names of the listed properties represent the values of those properties. Some properties have sub-properties, and those are represented by elements inside the elements for properties. (追記ここまで)
(追記) === Property List === (追記ここまで)
(追記) hCalendar properties (sub-properties in parentheses like this) (追記ここまで)
(追記) '''Required:''' (追記ここまで)
(追記) * '''dtstart''' ([[iso-8601|ISO date]]) (追記ここまで)
(追記) * '''summary''' (追記ここまで)
(追記) Optional: (追記ここまで)
(追記) * location (追記ここまで)
(追記) * url (追記ここまで)
(追記) * dtend (ISO date), duration (ISO date duration) (追記ここまで)
(追記) * rdate, rrule (追記ここまで)
(追記) * category, description (追記ここまで)
(追記) * uid (追記ここまで)
(追記) * geo (latitude, longitude) (追記ここまで)
(追記) * attendee (partstat, role), contact, organizer (追記ここまで)
(追記) * attach (追記ここまで)
(追記) * status (追記ここまで)
(追記) * ... editor's note: this list is incomplete (an incomplete list is better than no list) and is being currently edited from RFC2445 to here. The above list of properties are those that are often used in hCalendar on the web. (追記ここまで)
(追記) === Profile === (追記ここまで)
(追記) The hCalendar XMDP profile is at http://microformats.org/profile/hcalendar (追記ここまで)
(追記) Content that uses hCalendar {{should}} reference this profile, e.g. (追記ここまで)
(追記) <source lang=html4strict> (追記ここまで)
(追記) <head profile="http://microformats.org/profile/hcalendar"> (追記ここまで)
(追記) </source> (追記ここまで)
(追記) or (追記ここまで)
(追記) <source lang=html4strict> (追記ここまで)
(追記) <link rel="profile" href="http://microformats.org/profile/hcalendar"> (追記ここまで)
(追記) </source> (追記ここまで)
(追記) or (追記ここまで)
(追記) <source lang=html4strict> (追記ここまで)
(追記) This content uses <a rel="profile" href="http://microformats.org/profile/hcalendar">hCalendar</a>. (追記ここまで)
(追記) </source> (追記ここまで)
(追記) Content may combine the above methods as well (追記ここまで).


=== More Semantic Equivalents ===
=== More Semantic Equivalents ===
(追記) For (追記ここまで)some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:
(削除) However, for (削除ここまで)some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:
* <code>URL</code> in iCalendar becomes <code>(追記) &lt; (追記ここまで)a class="url" href="..."(追記) &gt; (追記ここまで)...(追記) &lt; (追記ここまで)/a(追記) &gt; (追記ここまで)</code> inside the element with <code>class="vevent"</code> in hCalendar.
* <code>URL</code> in iCalendar becomes <code>(削除) < (削除ここまで)a class="url" href="..."(削除) > (削除ここまで)...(削除) < (削除ここまで)/a(削除) > (削除ここまで)</code> inside the element with <code>class="vevent"</code> in hCalendar.
* <code>ATTENDEE</code>, <code>CONTACT</code>, and <code>ORGANIZER</code> in iCalendar (追記) {{ (追記ここまで)may(追記) }} (追記ここまで)be represented by an [[hcard|hCard]] in hCalendar .
* <code>ATTENDEE</code>, <code>CONTACT</code>, and <code>ORGANIZER</code> in iCalendar may be represented by an [[hcard|hCard]] in hCalendar .
* A named <code>LOCATION</code> (potentially with an address and/or geo) in iCalendar (追記) {{ (追記ここまで)may(追記) }} (追記ここまで)be represented by a nested [[hcard|hCard]] in hCalendar. Similarly, an address <code>LOCATION</code> (追記) {{ (追記ここまで)may(追記) }} (追記ここまで)be represented by an [[adr]], and a geo (latitude and longitude) <code>LOCATION</code> may be represented by a [[geo]].
* A named <code>LOCATION</code> (potentially with an address and/or geo) in iCalendar may be represented by a nested [[hcard|hCard]] in hCalendar. (削除) (削除ここまで)Similarly, an address <code>LOCATION</code> may be represented by an [[adr]], and a geo (latitude and longitude) <code>LOCATION</code> may be represented by a [[geo]].
* <code>UID</code> in iCalendar simply becomes another semantic applied to a specific URL for an hCalendar event.
* <code>UID</code> in iCalendar simply becomes another semantic applied to a specific URL for an hCalendar event.
(追記) * <code>ATTACH</code> in iCalendar becomes an img or object element (where the value is stored ito / retrieved from the 'src' or 'data' attributes respectively). An <code>&lt;a class="attach" href="..."&gt;...&lt;/a&gt;</code> may also be used, in which case the 'href' attribute is used for the property value. (追記ここまで)


=== Singular vs. Plural Properties ===
=== Singular vs. Plural Properties ===


For properties which are singular (e.g. "N" and "FN" from vCard), the first descendant element with that class should take effect, any others being ignored.
For properties which are singular (e.g. "N" and "FN" from vCard), the first descendant element with that class (追記) {{ (追記ここまで)should(追記) }} (追記ここまで)take effect, any others being ignored.


For properties which can be plural (e.g. "TEL" from vCard), each class instance should create a instance of that property. (削除) (削除ここまで)Plural properties with subtypes (e.g. TEL with WORK, HOME, CELL from vCard) can be optimized to share a common element for the property itself, with each instance of subtype being an appropriately classed descendant of the property element.
For properties which can be plural (e.g. "TEL" from vCard), each class instance (追記) {{ (追記ここまで)should(追記) }} (追記ここまで)create a instance of that property. Plural properties with subtypes (e.g. TEL with WORK, HOME, CELL from vCard) can be optimized to share a common element for the property itself, with each instance of subtype being an appropriately classed descendant of the property element.


==== Plural Properties Singularized ====
==== Plural Properties Singularized ====
Line 68: Line 129:
* DTSTART, DTEND, DURATION, RDATE, RRULE
* DTSTART, DTEND, DURATION, RDATE, RRULE


== (削除) Example (削除ここまで)==
== (追記) Examples (追記ここまで)==


Here is a sample event in an iCalendar:
Here is a sample (追記) multiple-day (追記ここまで)event in an iCalendar:
<(削除) pre><nowiki (削除ここまで)>
<(追記) source lang=text (追記ここまで)>
BEGIN:VCALENDAR
BEGIN:VCALENDAR
PRODID:-//XYZproduct//EN
PRODID:-//XYZproduct//EN
VERSION:2.0
VERSION:2.0
BEGIN:VEVENT
BEGIN:VEVENT
URL:http://(削除) www (削除ここまで).(削除) web2con (削除ここまで).com/
URL:http://(追記) conferences (追記ここまで).(追記) oreillynet (追記ここまで).com/(追記) pub/w/40/program.html (追記ここまで)
DTSTART:(削除) 20071017 (削除ここまで)
DTSTART:(追記) 20051005 (追記ここまで)
DTEND:(削除) 20071020 (削除ここまで)
DTEND:(追記) 20051008 (追記ここまで)
SUMMARY:Web 2.0 Conference
SUMMARY:Web 2.0 Conference
LOCATION:Argent Hotel,円 San Francisco,円 CA
LOCATION:Argent Hotel,円 San Francisco,円 CA
END:VEVENT
END:VEVENT
END:VCALENDAR
END:VCALENDAR
</(削除) nowiki></pre (削除ここまで)>
</(追記) source (追記ここまで)>


and an equivalent event in hCalendar format with various elements optimized appropriately. See [[hcalendar-example1-steps]] for the derivation.
and an equivalent event in hCalendar format with various elements optimized appropriately. See [[hcalendar-example1-steps]] for the derivation.


<(削除) pre><nowiki (削除ここまで)>
<(追記) source lang=html4strict (追記ここまで)>
<div class="vevent">
<div class="vevent">
<a class="url" href="http://(削除) www (削除ここまで).(削除) web2con (削除ここまで).com/">http://(削除) www (削除ここまで).(削除) web2con (削除ここまで).com/</a>
<a class="url" href="http://(追記) conferences (追記ここまで).(追記) oreillynet (追記ここまで).com/(追記) pub/w/40/program.html (追記ここまで)">
(削除) (削除ここまで)<span class="summary">Web 2.0 Conference</span>:
(追記) (追記ここまで)http://(追記) conferences (追記ここまで).(追記) oreillynet (追記ここまで).com/(追記) pub/w/40/program.html (追記ここまで)
(削除) (削除ここまで)<abbr class="dtstart" title="(削除) 2007 (削除ここまで)-(削除) 12 (削除ここまで)-(削除) 17 (削除ここまで)">October 5</abbr>-
(追記) (追記ここまで)</a>
(削除) (削除ここまで)<abbr class="dtend" title="(削除) 2007 (削除ここまで)-(削除) 12 (削除ここまで)-(削除) 20 (削除ここまで)">(削除) 19 (削除ここまで)</abbr>,
(追記) (追記ここまで)<span class="summary">Web 2.0 Conference</span>:
(追記) (追記ここまで)<abbr class="dtstart" title="(追記) 2005 (追記ここまで)-(追記) 10 (追記ここまで)-(追記) 05 (追記ここまで)">October 5</abbr>-
(追記) (追記ここまで)<abbr class="dtend" title="(追記) 2005 (追記ここまで)-(追記) 10 (追記ここまで)-(追記) 07 (追記ここまで)">(追記) 7 (追記ここまで)</abbr>,
at the <span class="location">Argent Hotel, San Francisco, CA</span>
at the <span class="location">Argent Hotel, San Francisco, CA</span>
(削除) (削除ここまで)</div>
</div>
</(削除) nowiki></pre (削除ここまで)>
</(追記) source (追記ここまで)>


which could be displayed as:
which could be displayed as:


<div class="vevent">
<div class="vevent">
<span class="url">http://(削除) www (削除ここまで).(削除) web2con (削除ここまで).com/</span>&nbsp;<!-- note modified to account for idiosyncrasy of wiki software -->
<span class="url">http://(追記) conferences (追記ここまで).(追記) oreillynet (追記ここまで).com/(追記) pub/w/40/program.html (追記ここまで)</span>&nbsp;<!-- note modified to account for idiosyncrasy of wiki software -->
<span class="summary">Web 2.0 Conference</span>:
<span class="summary">Web 2.0 Conference</span>:
<abbr class="dtstart" title="(削除) 2007 (削除ここまで)-(削除) 12 (削除ここまで)-(削除) 17 (削除ここまで)">October (削除) 17 (削除ここまで)</abbr>-
<abbr class="dtstart" title="(追記) 2005 (追記ここまで)-(追記) 10 (追記ここまで)-(追記) 05 (追記ここまで)">October (追記) 5 (追記ここまで)</abbr>-
<abbr class="dtend" title="(削除) 2007 (削除ここまで)-(削除) 12 (削除ここまで)-(削除) 20 (削除ここまで)">(削除) 19 (削除ここまで)</abbr>,
<abbr class="dtend" title="(追記) 2005 (追記ここまで)-(追記) 10 (追記ここまで)-(追記) 07 (追記ここまで)">(追記) 7 (追記ここまで)</abbr>,
at the <span class="location">Argent Hotel, San Francisco, CA</span>
at the <span class="location">Argent Hotel, San Francisco, CA</span>
</div>
</div>


Note that this is a '''live''' hCalendar microformat, which will be found on this page by parsers.
Note (追記) 1: (追記ここまで)that this is a '''live''' hCalendar microformat, which will be found on this page by parsers.


(削除) <! (削除ここまで)-- (削除) THIS EXAMPLE IS NOT DISPLAYING CORRECTLY (削除ここまで)- (削除) teh abbrs are ebnig shown as though (削除ここまで)"(削除) nowiki (削除ここまで)" (削除) applies (削除ここまで)
(追記) Note 2: This example used to have "2005 (追記ここまで)-(追記) 10 (追記ここまで)-(追記) 08" as the value of the dtend, but per the resolution to the [[dtend (追記ここまで)-(追記) issue]], has been changed to (追記ここまで)"(追記) 2005年10月07日 (追記ここまで)" (追記) in order to encourage publishers/implementers to update their markup/code immediately and [http://ufxtract.com/testsuite/hcalendar/hcalendar1.htm test it]. (追記ここまで)


(削除) === Example 2=== (削除ここまで)
(追記) Note 3: Note that the iCalendar in the first part of the example has the code <code>DTEND:20051008</code>. That "8" is not a typo. iCalendar uses <em>exclusive</em> whole end dates (DTEND values) and thus requires that the DTEND value be set to a whole day <em>after</em> what content publishers visibly display as the ending date of an event. iCalendar's exclusive end dates convention has shown to be [[dtend-issue|problematic and confusing]] for content authors and publishers. Thus per the resolution to the [[dtend-issue]], in hCalendar, the end date is stated exactly as existing events publish visible end dates to humans, with an <em>inclusive</em> end date (dtend property value), in this example, 2005年10月07日. (追記ここまで)


The following example specifies a scheduled meeting that begins
(追記) === Meeting Example === (追記ここまで)
The following (追記) <span id="Example_2"> (追記ここまで)example(追記) </span> (追記ここまで)specifies a scheduled meeting that begins
at 8:30 AM EST on March 12, 1998 and ends at 9:30 AM EST on March 12,
at 8:30 AM EST on March 12, 1998 and ends at 9:30 AM EST on March 12,
1998.
1998.


<(削除) pre><nowiki (削除ここまで)>
<(追記) source lang=text (追記ここまで)>
(削除) (削除ここまで)BEGIN:VCALENDAR
BEGIN:VCALENDAR
(削除) (削除ここまで)BEGIN:VEVENT
BEGIN:VEVENT
(削除) (削除ここまで)UID:guid-1.host1.com
UID:guid-1.host1.com
(削除) (削除ここまで)DTSTAMP:19980309T231000Z
DTSTAMP:19980309T231000Z
(削除) (削除ここまで)DESCRIPTION:Project XYZ Review Meeting
DESCRIPTION:Project XYZ Review Meeting
(削除) (削除ここまで)SUMMARY:XYZ Project Review
SUMMARY:XYZ Project Review
(削除) (削除ここまで)DTSTART:19980312T133000Z
DTSTART:19980312T133000Z
(削除) (削除ここまで)DTEND:19980312T143000Z
DTEND:19980312T143000Z
(削除) (削除ここまで)LOCATION:1CP Conference Room 4350
LOCATION:1CP Conference Room 4350
(削除) (削除ここまで)END:VEVENT
END:VEVENT
(削除) (削除ここまで)END:VCALENDAR
END:VCALENDAR
</(削除) nowiki></pre (削除ここまで)>
</(追記) source (追記ここまで)>


The equivalent in hCalendar:
The equivalent in hCalendar:


<(削除) pre><nowiki (削除ここまで)>
<(追記) source lang=html4strict (追記ここまで)>
<div class="vevent">
<div class="vevent">
<h3 class="summary">XYZ Project Review</h3>
<h3 class="summary">XYZ Project Review</h3>
<p class="description">Project XYZ Review Meeting</p>
<p class="description">Project XYZ Review Meeting</p>
<p>To held on <abbr class="(削除) dtstart (削除ここまで)" title="1998-03-(削除) 12T08:30:00-05:00 (削除ここまで)">(削除) 12 (削除ここまで)March (削除) 1998 (削除ここまで)from 8:30am EST</abbr>
<p>To (追記) be (追記ここまで)held on
until <(削除) abbr (削除ここまで)class="dtend" (削除) title (削除ここまで)="(削除) 1998年03月12日T09:30:00-05:00 (削除ここまで)">9:30am EST</abbr></p>
(追記) <span class="dtstart"> (追記ここまで)
(追記) (追記ここまで)<abbr class="(追記) value (追記ここまで)" title="1998-03-(追記) 12 (追記ここまで)">(追記) the 12th of (追記ここまで)March(追記) </abbr> (追記ここまで)
(追記) (追記ここまで)from (追記) <span class="value"> (追記ここまで)8:30am(追記) </span> <abbr class="value" title="-0500"> (追記ここまで)EST</abbr>
(追記) </span> (追記ここまで)until
(追記) (追記ここまで)<(追記) span (追記ここまで)class="dtend"(追記) > (追記ここまで)
(追記) <span class (追記ここまで)="(追記) value (追記ここまで)">9:30am(追記) </span> <abbr class="value" title="-0500"> (追記ここまで)EST</abbr>
(追記) </span> (追記ここまで)
</p>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<small>Booked by: <span class="uid">guid-1.host1.com</span> on
<small>Booked by: <span class="uid">guid-1.host1.com</span> on
<abbr class="(削除) dtstamp (削除ここまで)" title="(削除) 19980309T231000Z (削除ここまで)">(削除) 9 Mar 1998 (削除ここまで)6:00pm</(削除) abbr (削除ここまで)></small>
(追記) <span class="dtstamp"> (追記ここまで)
(追記) (追記ここまで)<abbr class="(追記) value (追記ここまで)" title="(追記) 1998年03月09日">the 9th</abbr> at <span class="value (追記ここまで)">6:00pm</(追記) span> (追記ここまで)
(追記) </span (追記ここまで)>
</small>
</div>
</div>
</(削除) nowiki></pre (削除ここまで)>
</(追記) source (追記ここまで)>


This could be displayed as:
This could be displayed as:
Line 153: Line 227:
<h3 class="summary">XYZ Project Review</h3>
<h3 class="summary">XYZ Project Review</h3>
<p class="description">Project XYZ Review Meeting</p>
<p class="description">Project XYZ Review Meeting</p>
<p>To held on <(削除) abbr (削除ここまで)class="dtstart" (削除) title (削除ここまで)="1998-03-(削除) 12T08 (削除ここまで):30:00-05:00">(削除) 12 (削除ここまで)March (削除) 1998 (削除ここまで)from 8:30am EST</(削除) abbr (削除ここまで)>
<p>To (追記) be (追記ここまで)held on <(追記) time (追記ここまで)class="dtstart" (追記) datetime (追記ここまで)="1998-03-(追記) 12 08 (追記ここまで):30:00-05:00">(追記) the 12th of (追記ここまで)March from 8:30am EST</(追記) time (追記ここまで)>
until <(削除) abbr (削除ここまで)class="dtend" (削除) title (削除ここまで)="1998-03-(削除) 12T09 (削除ここまで):30:00-05:00">9:30am EST</(削除) abbr (削除ここまで)></p>
until <(追記) time (追記ここまで)class="dtend" (追記) datetime (追記ここまで)="1998-03-(追記) 12 09 (追記ここまで):30:00-05:00">9:30am EST</(追記) time (追記ここまで)></p>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<small>Booked by: <span class="uid">guid-1.host1.com</span> on
<small>Booked by: <span class="uid">guid-1.host1.com</span> on <(追記) time (追記ここまで)class="dtstamp" (追記) datetime (追記ここまで)="(追記) 1998年03月09日 18:00 (追記ここまで)">(追記) the 9th at (追記ここまで)6:00pm</(追記) time (追記ここまで)></small></div>
<(削除) abbr (削除ここまで)class="dtstamp" (削除) title (削除ここまで)="(削除) 19980309T231000Z (削除ここまで)">(削除) 9 Mar 1998 (削除ここまで)6:00pm</(削除) abbr (削除ここまで)></small></div>


----
----
Line 167: Line 240:
Note 3: The version information is unnecessary in hCalendar markup directly since the version will be defined by the profile of hCalendar that is used/referred to in the 'profile' attribute of the <head> element.
Note 3: The version information is unnecessary in hCalendar markup directly since the version will be defined by the profile of hCalendar that is used/referred to in the 'profile' attribute of the <head> element.


Note 4: ISO8601 (削除) dates (削除ここまで)(required by iCalendar) are not very human friendly. In addition, the year is often understood implicitly by humans from the context. Thus <code><nowiki><abbr></nowiki></code> elements are used to simultaneously provide (削除) a (削除ここまで)human friendly (削除) date (削除ここまで)and/or (削除) time (削除ここまで)in the visible contents of the element, while placing the respective machine parsable comprehensive ISO8601 (削除) datetime (削除ここまで)in the 'title' attribute.
Note 4: (追記) [[iso-8601| (追記ここまで)ISO8601(追記) ]] datetimes (追記ここまで)(required by iCalendar) are not very human friendly. In addition, the year is often understood implicitly by humans from the context. Thus (追記) the [[value-class-pattern]] and (追記ここまで)<code><nowiki><abbr></nowiki></code> elements are used to simultaneously provide human friendly (追記) dates (追記ここまで)and/or (追記) times (追記ここまで)in the visible contents of the element, while placing the respective machine parsable comprehensive ISO8601 (追記) dates and times (追記ここまで)in the 'title' attribute (追記) when necessary (追記ここまで). (追記) Per the [[value (追記ここまで)-(追記) class (追記ここまで)-(追記) pattern]], separate dates and times {{ (追記ここまで)should(追記) }} (追記ここまで)be used (追記) by authors rather than a full ISO8601 datetime, (追記ここまで)for better readability (追記) and listenability (追記ここまで).
(削除) The notation <code>YYYY (削除ここまで)-(削除) MM (削除ここまで)-(削除) DDThh:mm:ss</code> (削除ここまで)should be used for better readability(削除) , following the format of RFC 3339 (削除ここまで).


Note 5: (削除) The difference between (削除ここまで)the DTEND (削除) ISO8601 date (削除ここまで)((削除) 2005年10月08日 (削除ここまで)) (削除) and (削除ここまで)the (削除) human readable date (7 (削除ここまで)) is (削除) NOT (削除ここまで)a (削除) mistake. (削除ここまで)[http://lists.osafoundation.org/pipermail/ietf-calsify/2005-September/000769.html DTEND (削除) is exclusive (削除ここまで)](削除) , meaning, that the event ends just before the DTEND. Thus for events which start on one day and (削除ここまで)end (削除) on another day, the DTEND (削除ここまで)date (削除) must be specified as the day after the day that a human would say is the last day of the event (削除ここまで).
Note 5: (追記) Per (追記ここまで)the (追記) [[dtend-issue]] resolution, (追記ここまで)DTEND (追記) dates are provided as humans expecte them to be (追記ここまで)((追記) consistent with what day an event ends on (追記ここまで))(追記) , rather than iCalendar's confusing definition ( (追記ここまで)the (追記) day after (追記ここまで))(追記) . Thus hCalendar processors which produce iCalendar must make the transformation, which (追記ここまで)is (追記) to treat (追記ここまで)a (追記) whole hCalendar <code>dtend</code> end date as *inclusive*, and convert it to an * (追記ここまで)[http://lists.osafoundation.org/pipermail/ietf-calsify/2005-September/000769.html (追記) exclusive (追記ここまで)DTEND](追記) * (追記ここまで)end date (追記) when producing iCalendar (追記ここまで).


Note 6: The location in this example contains implicit structure (venue name, city, state) which could be marked up explicitly as an [[hcard|hCard]]. See [http://microformats.org/wiki/hcalendar-brainstorming#hCard_locations hCalendar brainstorming: hCard locations] for a informative explanation of how to do this.
Note 6: The location in this example contains implicit structure (venue name, city, state) which could be marked up explicitly as an [[hcard|hCard]]. See [http://microformats.org/wiki/hcalendar-brainstorming#hCard_locations hCalendar brainstorming: hCard locations] for a informative explanation of how to do this.
(削除) (削除ここまで)
(削除) --> (削除ここまで)
(削除) (削除ここまで)
(削除) ==Buttons== (削除ここまで)
(削除) Don't forget that you can add one of our [[buttons#hCalendar|buttons]] to the page, to indicate the presence of hCalendar microformats. For example: http://www.boogdesign.com/images/buttons/microformat_hcalendar.png. If you can link it back to this page (or even page on your website, about your use of the microformat), so much the better! (削除ここまで)


=== More Examples ===
=== More Examples ===
Line 191: Line 258:


See [[hcalendar-implementations|hCalendar Implementations]].
See [[hcalendar-implementations|hCalendar Implementations]].
(追記) (追記ここまで)
(追記) == Articles == (追記ここまで)
(追記) This section is <strong>informative</strong>. (追記ここまで)
(追記) (追記ここまで)
(追記) See: [[hcalendar-articles]]. (追記ここまで)
(追記) (追記ここまで)
(追記) ==Buttons== (追記ここまで)
(追記) This section is <strong>informative</strong>. Don't forget that you can add one of our [[buttons#hCalendar|buttons]] to the page, to indicate the presence of hCalendar microformats. For example: http://www.boogdesign.com/images/buttons/microformat_hcalendar.png. If you can link it back to this page (or even page on your website, about your use of the microformat), so much the better! (追記ここまで)
(追記) (追記ここまで)
(追記) == Copyright == (追記ここまで)
(追記) Per the public domain release on the authors' user pages ([[User:Tantek|Tantek Çelik]], [[User:Brian|Brian Suda]]) this specification is released into the public domain. (追記ここまで)
(追記) (追記ここまで)
(追記) {{MicroFormatPublicDomainContributionStatement}} (追記ここまで)
(追記) (追記ここまで)
(追記) == Patents == (追記ここまで)
(追記) {{MicroFormatPatentStatement}} (追記ここまで)


== References ==
== References ==
Line 197: Line 280:
* [[hcard|hCard]]
* [[hcard|hCard]]
* [http://www.ietf.org/rfc/rfc2445.txt iCalendar RFC2445]
* [http://www.ietf.org/rfc/rfc2445.txt iCalendar RFC2445]
(追記) * [[rfc-2119| RFC 2119]] (追記ここまで)
(追記) * [[iso-8601|ISO8601]] (追記ここまで)


=== Informative References ===
=== Informative References ===
(追記) This section is <strong>informative</strong>. (追記ここまで)
* [http://w3.org/TR/REC-CSS1 CSS1]
* [http://w3.org/TR/REC-CSS1 CSS1]
* [http://tantek.com/log/2004/09.html#hcalendar hCalendar term introduced and defined on the Web, 20040930]
* [http://tantek.com/log/2004/09.html#hcalendar hCalendar term introduced and defined on the Web, 20040930]
Line 204: Line 290:
* [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 20040910]
* [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 20040910]
* [http://ietfreport.isoc.org/idref/draft-royer-ical-basic/ iCal-Basic (latest)] [http://www.faqs.org/ftp/pub/pub/internet-drafts/draft-royer-ical-basic-04.txt (draft 04)]
* [http://ietfreport.isoc.org/idref/draft-royer-ical-basic/ iCal-Basic (latest)] [http://www.faqs.org/ftp/pub/pub/internet-drafts/draft-royer-ical-basic-04.txt (draft 04)]
(追記) * [http://www.w3.org/TR/NOTE-datetime W3C Note on Date and Time Formats] (追記ここまで)
(追記) * [http://www.imc.org/pdi/ Internet Mail Consortium Personal Data Interchange vCard and vCalendar] (追記ここまで)
* Contributed from http://developers.technorati.com/wiki/hCalendar
* Contributed from http://developers.technorati.com/wiki/hCalendar
(削除) * [http://www.w3.org/TR/xhtml11 XHTML 1.1] (削除ここまで)
(削除) * [http://www.imc.org/pdi/ Internet Mail Consortium Personal Data Interchange vCard and vCalendar] (削除ここまで)


==== Specifications That Use hCalendar ====
==== Specifications That Use hCalendar ====
* [[hreview|hReview]]
* [[hreview|hReview]]


==== (削除) Similar (削除ここまで)Work ====
==== (追記) Related (追記ここまで)Work ====
* [http://lists.osafoundation.org/pipermail/ietf-calsify/ IETF-calsify archives]
* [http://lists.osafoundation.org/pipermail/ietf-calsify/ IETF-calsify archives]
* [http://www.softwarestudio.org/iCal/2445Issues.html RFC2445 Issues List]
* [http://www.softwarestudio.org/iCal/2445Issues.html RFC2445 Issues List]
* [http://ietf.webdav.org/calsify/ CALSIFY WG Links And Resources]
* [http://ietf.webdav.org/calsify/ CALSIFY WG Links And Resources]


== (削除) Further (削除ここまで)Reading ==
== (追記) Inspiration and Acknowledgments == (追記ここまで)
(追記) Thanks to: (追記ここまで)
(追記) * Adam Bosworth for leading the [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOO Camp 2004 HTML For Calendars presentation] which brought together a critical mass of interested parties. (追記ここまで)
(追記) == Related (追記ここまで)Reading ==
(追記) This section is <strong>informative</strong>. (追記ここまで)
(追記) Some <span id="Further_Reading">further reading</span> on the broader topic of calendars and calendaring formats. (追記ここまで)
* [http://www.livejournal.com/users/jwz/444651.html jwz - Hula] (required reading)
* [http://www.livejournal.com/users/jwz/444651.html jwz - Hula] (required reading)
* [http://www.jwz.org/doc/groupware.html Groupware Bad by Jamie Zawinski] crystalizes the reason for hCalendar ('''emphasis''' added):
* [http://www.jwz.org/doc/groupware.html Groupware Bad by Jamie Zawinski] crystalizes the reason for hCalendar ('''emphasis''' added):
<blockquote>Right now people can do that by publishing .ics files, but it's not trivial to do so, and it's work on the part of other people to look at them. '''If it's not HTML hanging off our friend's home page that can be viewed in any browser on a public terminal in a library, the bar to entry is too high and it's useless.'''</blockquote>
<blockquote>Right now people can do that by publishing .ics files, but it's not trivial to do so, and it's work on the part of other people to look at them. '''If it's not HTML hanging off our friend's home page that can be viewed in any browser on a public terminal in a library, the bar to entry is too high and it's useless.'''</blockquote>
(削除) (削除ここまで)
(削除) * [http://muddybranch.thejkgroup.com/ Jason Klemow's blog] (削除ここまで)
(削除) * [http://weblog.infoworld.com/udell/2006/01/11.html#a1368 Moving forward with microformats] by [http://weblog.infoworld.com/udell Jon Udell] provides an hCalendar example and some discussion. (削除ここまで)
(削除) * See also [http://www.technorati.com/cosmos/referer.html blogs discussing this page] and the [http://technorati.com/tags/hcalendar hCalendar tag] (削除ここまで)
(削除) * [http://en.wikipedia.org/wiki/HCalendar Wikipedia article on hCalendar] (requires expansion) (削除ここまで)


== Related Pages ==
== Related Pages ==
{{hcalendar-related-pages}}
{{hcalendar-related-pages}}
(追記) * [http://en.wikipedia.org/wiki/HCalendar Wikipedia article on hCalendar] (追記ここまで)
(追記) (追記ここまで)
(追記) [[Category:Specifications]] (追記ここまで)
(追記) [[Category:hCalendar]] (追記ここまで)
(追記) (追記ここまで)
(追記) == Translations == (追記ここまで)
(追記) Read the hCalendar specification in additional <span id="languages">languages</span>: (追記ここまで)
(追記) * [[hcalendar-fr|français]] (French) (追記ここまで)
(追記) * [[hcalendar-ja|日本語]] (Japanese) (追記ここまで)
(追記) * [[hcalendar-pl|Polski]] (Polish) (追記ここまで)
(追記) * [[hcalendar-ru|Русский]] (Russian) (追記ここまで)

Latest revision as of 16:24, 18 July 2020

See latest version: h-event

Tantek Çelik (Editor, Author), Brian Suda (Author)


hCalendar is a simple, open format for publishing events on the web, using a 1:1 representation of iCalendar (RFC2445) VEVENT properties and values in HTML. hCalendar is one of several open microformat standards suitable for embedding data in HTML/HTML5, and Atom/RSS/XHTML or other XML.

Copyright and patents statements apply. See acknowledgments.

Example

Here is a simple prose event:

The microformats.org site was launched on 2005年06月20日 at the Supernova Conference in San Francisco, CA, USA.

marked up with hCalendar

<span class="vevent">
 <span class="summary">The microformats.org site was launched</span>
 on <span class="dtstart">2005年06月20日</span> 
 at the Supernova Conference 
 in <span class="location">San Francisco, CA, USA</span>.
</span>

Want to get started with writing an hCalendar event? Use the hCalendar creator to write up an event and publish it, or follow the hCalendar authoring tips to add hCalendar markup to your page of upcoming events or events you mention in blog posts, wikis, etc.

Status

hCalendar 1.0 is a microformats.org specification. Public discussion on hCalendar takes place on hcalendar-feedback, the #microformats irc channel on irc.freenode.net, and microformats-discuss mailing list.

Available languages

The English version of this specification is the only normative version. For translations of this document see the #translations section.

Errata and Updates

Known errors and issues in this specification are corrected in resolved and closed issues. Please check there before reporting issues.

Note in particular the dtend-issue which affects end dates. Implementations SHOULD implement the issue resolution ASAP and test it.

The hCalendar 1.0.1 update is currently under development and incorporates known errata corrections as well as the value-class-pattern.

Introduction

The iCalendar standard (RFC2445), has been broadly interoperably implemented (e.g. Apple's "iCal" application built into MacOSX).

In addition, bloggers often discuss events on their blogs -- upcoming events, writeups of past events, etc. With just a tad bit of structure, bloggers can discuss events in their blog(s) in such a way that spiders and other aggregators can retrieve such events, automatically convert them to iCalendar, and use them in any iCalendar application or service.

This specification introduces the hCalendar format, which is a 1:1 representation of the aforementioned iCalendar standard, in semantic HTML. Bloggers can both embed hCalendar events directly in their web pages, and style them with CSS to make them appear as desired. In addition, hCalendar enables applications to retrieve information about such events directly from web pages without having to reference a separate file.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Semantic XHTML Design Principles

Note: the Semantic XHTML Design Principles were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles in the context of the hCard design methodology (i.e. read that first). Tantek

XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats, it helps to have a guiding set of principles.

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference. Avoid restating constraints expressed in the source standard. Informative mentions are ok.
    1. For types with multiple components, use nested elements with class names equivalent to the names of the components.
    2. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
  2. Use the most accurately precise semantic XHTML building block for each object etc.
  3. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>).
  4. Use class names based on names from the original schema, unless the semantic XHTML building block precisely represents that part of the original schema. If names in the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters.
  5. Finally, if the format of the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go), and the more brief and human readable equivalent into the element itself. Further informative explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved

For practical implementations, it should be noted that Internet Explorer's support for styling <abbr> elements is poor, and may require wrapper elements.

Format

In General

The iCalendar standard (RFC2445) forms the basis of hCalendar.

Note: the editor and authors of this specification are tracking the "iCal-Basic" effort and intend to base the core hCalendar profile on iCal-Basic. See references for a link to the current draft.

The basic format of hCalendar is to use iCalendar object/property names in lower-case for class names, and to map the nesting of iCalendar objects directly into nested XHTML elements.

Root Class Name

The root class name for hCalendar is "vcalendar". An element with a class name of "vcalendar" is itself called an hCalendar.

The root class name for events is "vevent". An element with a class name of "vevent" is itself called an hCalendar event.

For authoring convenience, both "vevent" and "vcalendar" are treated as root class names for parsing purposes. If a document contains elements with class name "vevent" but not "vcalendar", the entire document has an implied "vcalendar" context.

vevent should be considered required for each event listing.

Properties and Sub-properties

The properties of an hCalendar are represented by elements inside the hCalendar. Elements with class names of the listed properties represent the values of those properties. Some properties have sub-properties, and those are represented by elements inside the elements for properties.

Property List

hCalendar properties (sub-properties in parentheses like this)

Required:

Optional:

  • location
  • url
  • dtend (ISO date), duration (ISO date duration)
  • rdate, rrule
  • category, description
  • uid
  • geo (latitude, longitude)
  • attendee (partstat, role), contact, organizer
  • attach
  • status
  • ... editor's note: this list is incomplete (an incomplete list is better than no list) and is being currently edited from RFC2445 to here. The above list of properties are those that are often used in hCalendar on the web.

Profile

The hCalendar XMDP profile is at http://microformats.org/profile/hcalendar

Content that uses hCalendar SHOULD reference this profile, e.g.

<head profile="http://microformats.org/profile/hcalendar">

or

<link rel="profile" href="http://microformats.org/profile/hcalendar">

or

This content uses <a rel="profile" href="http://microformats.org/profile/hcalendar">hCalendar</a>.

Content may combine the above methods as well.

More Semantic Equivalents

For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:

  • URL in iCalendar becomes <a class="url" href="...">...</a> inside the element with class="vevent" in hCalendar.
  • ATTENDEE, CONTACT, and ORGANIZER in iCalendar MAY be represented by an hCard in hCalendar .
  • A named LOCATION (potentially with an address and/or geo) in iCalendar MAY be represented by a nested hCard in hCalendar. Similarly, an address LOCATION MAY be represented by an adr, and a geo (latitude and longitude) LOCATION may be represented by a geo.
  • UID in iCalendar simply becomes another semantic applied to a specific URL for an hCalendar event.
  • ATTACH in iCalendar becomes an img or object element (where the value is stored ito / retrieved from the 'src' or 'data' attributes respectively). An <a class="attach" href="...">...</a> may also be used, in which case the 'href' attribute is used for the property value.

Singular vs. Plural Properties

For properties which are singular (e.g. "N" and "FN" from vCard), the first descendant element with that class SHOULD take effect, any others being ignored.

For properties which can be plural (e.g. "TEL" from vCard), each class instance SHOULD create a instance of that property. Plural properties with subtypes (e.g. TEL with WORK, HOME, CELL from vCard) can be optimized to share a common element for the property itself, with each instance of subtype being an appropriately classed descendant of the property element.

Plural Properties Singularized

Since plural property names become their singular equivalents, even if the original plural property permitted only a single value with multiple components, those multiple components are represented each with their own singularly named property and the the property is effectively multivalued and subject to the above treatment of multivalued properties.

Human vs. Machine readable

If an <abbr> element is used for a property, then the 'title' attribute of the <abbr> element is the value of the property, instead of the contents of the element, which instead provide a human presentable version of the value. This specification recommends that such <abbr> elements be used for the following iCalendar properties:

  • DTSTART, DTEND, DURATION, RDATE, RRULE

Examples

Here is a sample multiple-day event in an iCalendar:

BEGIN:VCALENDAR
PRODID:-//XYZproduct//EN
VERSION:2.0
BEGIN:VEVENT
URL:http://conferences.oreillynet.com/pub/w/40/program.html
DTSTART:20051005
DTEND:20051008
SUMMARY:Web 2.0 Conference
LOCATION:Argent Hotel,円 San Francisco,円 CA
END:VEVENT
END:VCALENDAR

and an equivalent event in hCalendar format with various elements optimized appropriately. See hcalendar-example1-steps for the derivation.

<div class="vevent">
 <a class="url" href="http://conferences.oreillynet.com/pub/w/40/program.html">
 http://conferences.oreillynet.com/pub/w/40/program.html
 </a>
 <span class="summary">Web 2.0 Conference</span>: 
 <abbr class="dtstart" title="2005年10月05日">October 5</abbr>-
 <abbr class="dtend" title="2005年10月07日">7</abbr>,
 at the <span class="location">Argent Hotel, San Francisco, CA</span>
</div>

which could be displayed as:

http://conferences.oreillynet.com/pub/w/40/program.html   Web 2.0 Conference: October 5- 7, at the Argent Hotel, San Francisco, CA

Note 1: that this is a live hCalendar microformat, which will be found on this page by parsers.

Note 2: This example used to have "2005-10-08" as the value of the dtend, but per the resolution to the dtend-issue, has been changed to "2005-10-07" in order to encourage publishers/implementers to update their markup/code immediately and test it.

Note 3: Note that the iCalendar in the first part of the example has the code DTEND:20051008. That "8" is not a typo. iCalendar uses exclusive whole end dates (DTEND values) and thus requires that the DTEND value be set to a whole day after what content publishers visibly display as the ending date of an event. iCalendar's exclusive end dates convention has shown to be problematic and confusing for content authors and publishers. Thus per the resolution to the dtend-issue, in hCalendar, the end date is stated exactly as existing events publish visible end dates to humans, with an inclusive end date (dtend property value), in this example, 2005年10月07日.

Meeting Example

The following example specifies a scheduled meeting that begins at 8:30 AM EST on March 12, 1998 and ends at 9:30 AM EST on March 12, 1998.

BEGIN:VCALENDAR
BEGIN:VEVENT
UID:guid-1.host1.com
DTSTAMP:19980309T231000Z
DESCRIPTION:Project XYZ Review Meeting
SUMMARY:XYZ Project Review
DTSTART:19980312T133000Z
DTEND:19980312T143000Z
LOCATION:1CP Conference Room 4350
END:VEVENT
END:VCALENDAR

The equivalent in hCalendar:

<div class="vevent">
<h3 class="summary">XYZ Project Review</h3>
<p class="description">Project XYZ Review Meeting</p>
<p>To be held on 
 <span class="dtstart">
 <abbr class="value" title="1998年03月12日">the 12th of March</abbr> 
 from <span class="value">8:30am</span> <abbr class="value" title="-0500">EST</abbr>
 </span> until 
 <span class="dtend">
 <span class="value">9:30am</span> <abbr class="value" title="-0500">EST</abbr>
 </span>
</p>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<small>Booked by: <span class="uid">guid-1.host1.com</span> on 
 <span class="dtstamp">
 <abbr class="value" title="1998年03月09日">the 9th</abbr> at <span class="value">6:00pm</span>
 </span>
</small>
</div>

This could be displayed as:


XYZ Project Review

Project XYZ Review Meeting

To be held on until

Location: 1CP Conference Room 4350

Booked by: guid-1.host1.com on

Note 1: The product information is not necessary since hCalendar is an interchange format. When transforming hCalendar back into iCalendar, the transforming engine should add its own product ID.

Note 2: A surrounding <span class="vcalendar"> element is optional, and is left out as such. It is optional since the context of a vcalendar is implied when a vevent is encountered. The implied context/scope is that of the document. Authors may explicitly use elements with class="vcalendar" to wrap sets of vevents that all belong to the same calendar, e.g. when publishing multiple calendars on the same page.

Note 3: The version information is unnecessary in hCalendar markup directly since the version will be defined by the profile of hCalendar that is used/referred to in the 'profile' attribute of the <head> element.

Note 4: ISO8601 datetimes (required by iCalendar) are not very human friendly. In addition, the year is often understood implicitly by humans from the context. Thus the value-class-pattern and <abbr> elements are used to simultaneously provide human friendly dates and/or times in the visible contents of the element, while placing the respective machine parsable comprehensive ISO8601 dates and times in the 'title' attribute when necessary. Per the value-class-pattern, separate dates and times SHOULD be used by authors rather than a full ISO8601 datetime, for better readability and listenability.

Note 5: Per the dtend-issue resolution, DTEND dates are provided as humans expecte them to be (consistent with what day an event ends on), rather than iCalendar's confusing definition (the day after). Thus hCalendar processors which produce iCalendar must make the transformation, which is to treat a whole hCalendar dtend end date as *inclusive*, and convert it to an *exclusive DTEND* end date when producing iCalendar.

Note 6: The location in this example contains implicit structure (venue name, city, state) which could be marked up explicitly as an hCard. See hCalendar brainstorming: hCard locations for a informative explanation of how to do this.

More Examples

See hCalendar examples for more examples, including examples from iCalendar RFC 2445 converted into hCalendar.

Examples in the wild

This section is informative. The number of hCalendar examples in the wild has expanded far beyond the capacity of being kept inline in this specification. They have been moved to a separate page.

See hCalendar Examples in the wild.

Implementations

This section is informative. The number of hCalendar implementations has also expanded beyond the capacity of keeping them inline. They have been moved to a separate page.

See hCalendar Implementations.

Articles

This section is informative.

See: hcalendar-articles.

Buttons

This section is informative. Don't forget that you can add one of our buttons to the page, to indicate the presence of hCalendar microformats. For example: microformat_hcalendar.png. If you can link it back to this page (or even page on your website, about your use of the microformat), so much the better!

Copyright

Per the public domain release on the authors' user pages (Tantek Çelik, Brian Suda) this specification is released into the public domain.

Public Domain Contribution Requirement. Since the author(s) released this work into the public domain, in order to maintain this work's public domain status, all contributors to this page agree to release their contributions to this page to the public domain as well. Contributors may indicate their agreement by adding the public domain release template to their user page per the Voluntary Public Domain Declarations instructions. Unreleased contributions may be reverted/removed.

Patents

This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.

References

Normative References

Informative References

This section is informative.

Specifications That Use hCalendar

Related Work

Inspiration and Acknowledgments

Thanks to:

Related Reading

This section is informative. Some further reading on the broader topic of calendars and calendaring formats.

Right now people can do that by publishing .ics files, but it's not trivial to do so, and it's work on the part of other people to look at them. If it's not HTML hanging off our friend's home page that can be viewed in any browser on a public terminal in a library, the bar to entry is too high and it's useless.

Related Pages

This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. These thoughts, issues, and questions are kept in separate pages.

Translations

Read the hCalendar specification in additional languages:

Retrieved from "http://microformats.org/wiki/index.php?title=hcalendar&oldid=69798"