[microformats-discuss] hCalendar - Proposal for "YYYY-MM-DD"

Robert Bachmann rbach at rbach.priv.at
Sun Jul 17 06:43:48 PDT 2005


The current date format for machine-readable dates
is YYYYMMDD.

Example:

<span class="vevent">
 <a class="url" href="http://www.web2con.com/">
  <span class="summary">Web 2.0 Conference</span>:
  <abbr class="dtstart" title="20051005">October 5</abbr>-
  <abbr class="dtend" title="20051007">7</abbr>,
 at the <span class="location">Argent Hotel, San Francisco, CA</span>
 </a>
</span>

hCalendar should also allow the YYYY-MM-DD format.
Even better hCalendar should recommend the YYYY-MM-DD format over
the YYYYMMDD format, i.e. authors and iCal-to-hCalendar converters
SHOULD produce YYYY-MM-DD.

Example:

<span class="vevent">
 <a class="url" href="http://www.web2con.com/">
  <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>
 </a>
</span>

Benefits:

 YYYY-MM-DD is easier to read for humans, than YYYYMMDD.

 Rationale: As some UAs disclose the contents of the title attribute
 (e.g. in form of a tooltip) the contents of the title attribute should
 also be easly readable by humans.

Drawbacks:

 Parsers MUST both recognize the YYYYMMDD format and the YYYY-MM-DD
 format. (When translating hCalendar to iCal, the dashes MUST be
 removed)
 That should not be too hard to implement.

Thanks in advance for your comments,
 Robert

P.S:
"SHOULD" and "MUST" are to be interpreted as described in
RFC 2119.
-- 
Robert Bachmann <rbach at rbach.priv.at> (OpenPGP KeyID: 0x4A5CCF10)


More information about the microformats-discuss mailing list