h-event: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(→‎See Also: mention rsvps on h-entry)
m (s/<source>/<syntaxhighlight>/)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<entry-title>h-event</entry-title>
{{DISPLAYTITLE:h-event}}
<dfn style="font-style:normal;font-weight:bold">h-event</dfn> is a simple, open format for events on the web. h-event is often used with both event listings and individual event pages. h-event is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5.
<dfn style="font-style:normal;font-weight:bold">h-event</dfn> is a simple, open format for events on the web. h-event is often used with both event listings and individual event pages. h-event is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML.


h-event is the [[microformats2]] update to [[hCalendar]].
h-event is the [[microformats2]] update to [[hCalendar]].


;<span id="Status">Status</span>
;<span id="status">Status</span>
:This is a '''Living Specification''' yet mature enough to encourage additional implementations and [[h-event-issues|feedback]].
:This is a '''Living Specification''' yet mature enough to encourage additional implementations and [https://github.com/microformats/h-event/issues feedback].
;Participate
;<span id="participate">Participate</span>
:[https://github.com/microformats/h-event/issues Open Issues]
:[https://github.com/microformats/h-event/issues Open Issues]
:[[IRC]]: [irc://irc.freenode.net/microformats #microformats on Freenode]
:[[IRC]]
:Advance the spec by contributing to a consensus in [https://github.com/microformats/h-event/issues/1 issue: adopt same change control as h-entry]
<div class="p-author h-card vcard">
<div class="p-author h-card vcard">
;<span class="p-role role">Editor</span>
;<span class="p-role role">Editor</span>
Line 15: Line 16:
;License
;License
: {{cc0-owfa-license}}
: {{cc0-owfa-license}}
__TOC__
<span style="float:right">__TOC__</span>


== Example ==
== Example ==
Here is a simple event example:
Here is a simple event example:


<source lang=html4strict>
<syntaxhighlight lang="html">
<div class="h-event">
<div class="h-event">
   <h1 class="p-name">Microformats Meetup</h1>
   <h1 class="p-name">Microformats Meetup</h1>
Line 29: Line 30:
   <p class="p-summary">Get together and discuss all things microformats-related.</p>
   <p class="p-summary">Get together and discuss all things microformats-related.</p>
</div>
</div>
</source>
</syntaxhighlight>


Parsed JSON:
Parsed JSON:
<source lang=javascript>
<syntaxhighlight lang="json">
{
{
   "items": [
   "items": [
Line 59: Line 60:
   ]
   ]
}
}
</source>
</syntaxhighlight>


=== Get started ===
=== Get started ===
Line 76: Line 77:
* '''<code>dt-duration</code>''' - duration of the event
* '''<code>dt-duration</code>''' - duration of the event
* '''<code>p-description</code>''' - more detailed description of the event
* '''<code>p-description</code>''' - more detailed description of the event
** '''WARNING:''' Proposed to be replaced by '''<code>e-content</code>''' (re-used from [[h-entry]])
** See and follow-up: https://github.com/microformats/h-event/issues/3
* '''<code>u-url</code>''' - permalink for the event
* '''<code>u-url</code>''' - permalink for the event
* '''<code>p-category</code>''' - event category(ies)/tag(s)
* '''<code>p-category</code>''' - event category(ies)/tag(s)
* '''<code>p-location</code>''' - where the event takes place, optionally embedded [[h-card]], [[h-adr]], or [[h-geo]]
* '''<code>p-location</code>''' - where the event takes place, optionally embedded [[h-card]], [[h-adr]], or [[h-geo]]
Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:
 
All properties are optional.
 
=== Experimental Properties ===
 
These properties are currently in use in the wild but not (yet) part of the draft h-event spec:
 
* '''<code>p-attendee</code>''' - a person attending the event, optionally embed [[h-card]]
* '''<code>p-attendee</code>''' - a person attending the event, optionally embed [[h-card]]
<div class="discussion">
<div class="discussion">
Line 87: Line 96:
** I don't understand this. p-attendee is supposed to represent a person, e.g. an [[h-card]]. How would it having that be an [[h-entry]] make sense and work (from a publishing and consuming code perspective)? This proposed extension to p-attendee may be worth its own issue as well. [[User:Tantek|Tantek]] 01:10, 28 February 2017 (UTC)
** I don't understand this. p-attendee is supposed to represent a person, e.g. an [[h-card]]. How would it having that be an [[h-entry]] make sense and work (from a publishing and consuming code perspective)? This proposed extension to p-attendee may be worth its own issue as well. [[User:Tantek|Tantek]] 01:10, 28 February 2017 (UTC)
</div>
</div>
 
* '''<code>p-organizer</code>''' - a person organizing an event, optionally embedded [[h-card]]. Used in Indieweb events, but not consumed. https://github.com/microformats/h-event/issues/10
All properties are optional.
* '''<code>u-rsvp</code>''' - similar to the proposed u-comment on h-entry, this would be the proposed property to mark up displayed RSVPs on an h-event. https://github.com/microformats/h-event/issues/9


== Status ==
== Status ==
'''h-event''' is a microformats.org draft specification. Public discussion on h-event takes place on [[h-event-feedback]] and the #microformats [[irc]] channel on irc.freenode.net.
'''h-event''' is a microformats.org draft specification. Public discussion on h-event takes place on the [[irc|#microformats channel on irc.freenode.net]] ([https://chat.indieweb.org/microformats view recent discussions]), and specific issues [https://github.com/microformats/h-event/issues may be filed on GitHub].


h-event is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-events up as classic [[hCalendar]] events.
h-event is ready to use and implemented in the wild. For backwards compatibility you should also mark up top-level h-events as classic [[hCalendar]] events.


== Property Details ==
== Property Details ==
Line 101: Line 110:
<code>p-location</code> is typically a physical address, optionally marked up with [[h-adr]], for example:
<code>p-location</code> is typically a physical address, optionally marked up with [[h-adr]], for example:


<source lang=html4strict>
<syntaxhighlight lang="html">
<p class="p-location h-adr">
<p class="p-location h-adr">
   <span class="p-street-address">17 Austerstræti</span>
   <span class="p-street-address">17 Austerstræti</span>
Line 107: Line 116:
   <span class="p-country-name">Iceland</span>
   <span class="p-country-name">Iceland</span>
</p>
</p>
</source>
</syntaxhighlight>


=== Reserved Properties ===
=== Reserved Properties ===
Line 127: Line 136:
* https://gregorlove.com/events has h-event markup, for example: https://gregorlove.com/2017/06/homebrew-website-club/
* https://gregorlove.com/events has h-event markup, for example: https://gregorlove.com/2017/06/homebrew-website-club/
** has additional property from [[h-entry]]: <code>dt-published</code>
** has additional property from [[h-entry]]: <code>dt-published</code>
* https://oauth.net/events/ has a list of h-event marked up events relating to OAuth, both future and past
* http://68middle.st/events has events marked up in h-event
* [https://www.gov.uk/government/publications/open-standards-for-government/exchange-of-calendar-events gov.uk] mentions that iCalendar can be translated into h-event microformats in their "Exchange of calendar events" guidance.
<blockquote>You can map events to and from iCalendar from other formats, such as h-event.</blockquote>


See [[microformats2#Examples_in_the_wild|microformats2 examples in the wild]] for more
See [[microformats2#Examples_in_the_wild|microformats2 examples in the wild]] for more
Line 132: Line 145:
== Validating ==
== Validating ==
{{h-spec-section-validating}}
{{h-spec-section-validating}}
== Implementations ==
Software implementations that publish or consume h-event, including themes, plugins, or extensions:
When adding an implementation, please provide and link to its home page and open source repo if any.
* [https://github.com/gRegorLove/mf2-to-iCalendar mf2 to iCalendar]: Convert microformats h-event to iCalendar. Example: https://gregorlove.com/calendar/


== Backward Compatibility ==
== Backward Compatibility ==
Line 137: Line 157:
For backward compatibility, you may wish to use classic [[hCalendar]] classnames in addition to the more future-proof h-event properties, for example:
For backward compatibility, you may wish to use classic [[hCalendar]] classnames in addition to the more future-proof h-event properties, for example:


<source lang=html4strict>
<syntaxhighlight lang="html">
<div class="h-event vevent">
<div class="h-event vevent">
   <h1 class="p-name summary">Some great event</h1>
   <h1 class="p-name summary">Some great event</h1>
</div>
</div>
</div>
</div>
</source>
</syntaxhighlight>


=== Parser Compatibility ===
=== Parser Compatibility ===
Line 172: Line 192:
== See Also ==
== See Also ==
* [[h-calendar-to-do]]
* [[h-calendar-to-do]]
* [[h-event-brainstorming]]
* [[microformats2]]
* [[microformats2]]
* [[microformats2-parsing]]
* [[microformats2-parsing]]

Latest revision as of 21:18, 26 July 2023

h-event is a simple, open format for events on the web. h-event is often used with both event listings and individual event pages. h-event is one of several open microformat draft standards suitable for embedding data in HTML.

h-event is the microformats2 update to hCalendar.

Status
This is a Living Specification yet mature enough to encourage additional implementations and feedback.
Participate
Open Issues
IRC
Advance the spec by contributing to a consensus in issue: adopt same change control as h-entry
Editor
Tantek Çelik
License
Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2024-11-25, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

Example

Here is a simple event example:

<div class="h-event">
  <h1 class="p-name">Microformats Meetup</h1>
  <p>From 
    <time class="dt-start" datetime="2013-06-30 12:00">30<sup>th</sup> June 2013, 12:00</time>
    to <time class="dt-end" datetime="2013-06-30 18:00">18:00</time>
    at <span class="p-location">Some bar in SF</span></p>
  <p class="p-summary">Get together and discuss all things microformats-related.</p>
</div>

Parsed JSON:

{
  "items": [
    {
      "type": [
        "h-event"
      ],
      "properties": {
        "name": [
          "Microformats Meetup"
        ],
        "start": [
          "2013-06-30 12:00:00"
        ],
        "end": [
          "2013-06-30 18:00:00"
        ],
        "location": [
          "Some bar in SF"
        ],
        "summary": [
          "Get together and discuss all things microformats-related."
        ]
      }
    }
  ]
}

Get started

The class h-event is a root class name that indicates the presence of an h-event.

p-name, dt-start, dt-end, p-location, p-summary, and the other h-event property class names listed below define properties of the h-event.

See microformats2-parsing to learn more about property class names.

Properties

h-event properties, inside an element with class h-event:

  • p-name - event name (or title)
  • p-summary - short summary of the event
  • dt-start - datetime the event starts
  • dt-end - datetime the event ends
  • dt-duration - duration of the event
  • p-description - more detailed description of the event
  • u-url - permalink for the event
  • p-category - event category(ies)/tag(s)
  • p-location - where the event takes place, optionally embedded h-card, h-adr, or h-geo

All properties are optional.

Experimental Properties

These properties are currently in use in the wild but not (yet) part of the draft h-event spec:

  • p-attendee - a person attending the event, optionally embed h-card
  • This draft has not been updated in almost 2 years. During this period, h-entry p-rsvp has been standardised, thus making it robust and mature enough for the addition. I guess it's about time to unlabel p-attendee as experimental.
    • I've filed https://github.com/microformats/h-event/issues/2 to track advancing this draft as a whole. Let's do that with the existing draft before discussing p-attendee in particular. And rather than guessing, take a look at the vocabulary maturity levels in h-entry and perhaps help evaluate (in another issue) p-attendee according to those criteria. Tantek 01:10, 28 February 2017 (UTC)
  • I would also suggest to extend expected value to h-entry, so that, while the personal info can be preserved, the attendee can also support p-rsvp property of h-entry.
    • I don't understand this. p-attendee is supposed to represent a person, e.g. an h-card. How would it having that be an h-entry make sense and work (from a publishing and consuming code perspective)? This proposed extension to p-attendee may be worth its own issue as well. Tantek 01:10, 28 February 2017 (UTC)

Status

h-event is a microformats.org draft specification. Public discussion on h-event takes place on the #microformats channel on irc.freenode.net (view recent discussions), and specific issues may be filed on GitHub.

h-event is ready to use and implemented in the wild. For backwards compatibility you should also mark up top-level h-events as classic hCalendar events.

Property Details

(stub, to be expanded)

p-location

p-location is typically a physical address, optionally marked up with h-adr, for example:

<p class="p-location h-adr">
  <span class="p-street-address">17 Austerstræti</span>
  <span class="p-locality">Reykjavík</span>
  <span class="p-country-name">Iceland</span>
</p>

Reserved Properties

Reserved properties:

Examples in the wild

Real world in the wild examples:

You can map events to and from iCalendar from other formats, such as h-event.

See microformats2 examples in the wild for more

Validating

Main article: validators

Test and validate microformats2 markup in general with:

Implementations

Software implementations that publish or consume h-event, including themes, plugins, or extensions:

When adding an implementation, please provide and link to its home page and open source repo if any.

Backward Compatibility

Publisher Compatibility

For backward compatibility, you may wish to use classic hCalendar classnames in addition to the more future-proof h-event properties, for example:

<div class="h-event vevent">
  <h1 class="p-name summary">Some great event</h1>
</div>
</div>

Parser Compatibility

Microformats parsers SHOULD detect classic properties only if a classic root class name is found and parse them as microformats2 properties.

If an "h-event" is found, don't look for a "vevent" on the same element.

Compat root class name: vevent
Properties: (parsed as p- plain text unless otherwise specified)

  • summary - parse as p-name
  • dtstart - parse as dt-start
  • dtend - parse as dt-end
  • duration - parse as dt-duration
  • description
  • url - parse as u-
  • category
  • location - including compat root vcard in the absence of h-card, and compat root adr in the absence of h-adr
  • geo - parse as p-location h-geo including compat root geo

iCalendar Compatibility

hCalendar-specific implementations that perform custom display or translation to iCalendar .ics SHOULD prefer p-name over p-summary, and use p-summary value(s) as a fallback if there is no p-name.

Background

This work is based on the existing hCalendar and iCalendar specifications.

Design Principles

(stub, expand)

See Also