Difference between revisions of "date-design-pattern"
Revision as of 15:19, 28 April 2008
This page is a draft.
Date Design Pattern
This is a page for exploring a date design pattern. This pattern is a subset of the Datetime Design Pattern.
Use the Date Design Pattern to make dates that are human readable also formally machine readable.
The Datetime Design Pattern arose as a result of solving the practical need for human readable dates for hCalendar. While concerns have been raised about the readability of complete datetimes, those concerns don't apply for date stamps that do not include time or timezone information.
The date design pattern provides an internationalized way of representing dates. For example, the string 02/03/01 could represent February 3rd 2001, March 2nd 2001 or even March 1st 2002 depending on the cultural context. The string 2001-03-02 is less ambiguous.
How to use it
The full Datetime Design Pattern has the format:
The date design pattern, which is a subset of the datetime design pattern, has the format:
The date design pattern can be used like any other value that uses the class-design-pattern:
The date design pattern can also be used in combination with the abbr design pattern where authors want to provide an alternative representation of the date:
<abbr class="foo" title="YYYY-MM-DD">Date</abbr>
As with the datetime design pattern, the date design pattern is based on the ISO8601 standard. This standard allows for dates to be written without dashes (YYYYMMDD). This usage is strongly discouraged when publishing microformats as it significantly reduces the readability of the date.
This pattern can be used in hCalendar 1.0 for:
In hCard 1.0 the date design pattern can be used for:
This pattern can be used in hReview 0.4 (in progress) for:
Concerns have raised about accessibility issues  with the Datetime Design Pattern when it is used in conjunction with the abbr design pattern. These concerns are significantly lessened with the Date Design Pattern as only dates, rather than full datetimes, are represented
- All microformat design patterns
- The date design pattern is a subset of the Datetime Design Pattern
- The abbr design pattern can be used by Date Design Pattern
- RFC 3339: Date and Time on the Internet: Timestamps
- W3C: Note on Datetimes
- Markus Kuhn: A summary of the international standard date and time notation
- Wikipedia: ISO 8601