[microformats-discuss] Date design pattern (was re: Microformat for timestamp of updated content)

Robert Bachmann rbach at rbach.priv.at
Fri Aug 19 15:07:32 PDT 2005


[Subject changed because this discussion about date representations
isn't specific to '(page-)last-modfied'.]

Joe Gregorio wrote:
> RFC 3339 is, as Ted pointed out, a subset of ISO 8601.
> But I think it's important to realize how varied ISO 8601 
> dates can be.
> 
> The following are all valid ISO 8601 dates:
> 
> 1997
> 1997-07
> 19970716
> 1997-07-16 19:20+01:00
> 1997-07-16T19:20+01:00
> 2003-W14-2
> 2003W142
> 12:30:01
> 19
> 
> Care to guess what that last one represents?

2019?

> OTOH, RFC 3339 is strict, only the following forms are allowed
> 
> \d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d*)?Z
> 
> or 
> 
> \d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d*)?(\+|-)\d\d:\d\d
> 
I think that using a subset of ISO8601 makes 'things' (parsing,
validating, etc.) easier but I don't think that RFC 3339 is expedient
because it requires to include a TIME portion.

Althought all wiki pages I've seen included a TIME portion, I've also
seen web pages which did not include a TIME portion within their 'Last
modfied on ' phrases.

There are also use cases for hCard and hCalendar elements which do not
require to have a TIME portion.

Brian Suda on http://microformats.org/wiki/datetime-design-pattern:
 The RFC3339 has a mandatory TIME portion of the DATE-TIME. Some
 vCard/iCalendar DATE-TIME stamps can omit the TIME. For instance,
 DTSTART, if that is a full day event, then you can omit the time. BDAY
 in vCard can be respresented by only a DATE. I like the idea of
 restricting the possible date formats, but i think that TIME should be
 optional, which it isn't in RFC3339. - brian suda


IMO the notations from
http://www.w3.org/TR/1998/NOTE-datetime-19980827
should be enough for (almost) every use case.

Robert
-- 
Robert Bachmann <rbach at rbach.priv.at> (OpenPGP KeyID: 0x4A5CCF10)


More information about the microformats-discuss mailing list