Date Design Pattern
This is a page describes a date 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 dates 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 unambiguous and is the best choice for accurate readability for the most people worldwide.
How to use it
The full ISO 8601 datetime format is as follows:
The date design pattern, uses only the year, month, and day of the month of that 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. ISO8601 also 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:
And in hAtom 0.1 for:
These concerns are both significantly lessened with the Date Design Pattern as only dates, rather than full datetimes, and in fact improved, as the ISO8601 YYYY-MM-DD format for dates is the best choice that is the most accurately readable (and listenable) for the most people worldwide, and thus the most accessible as well.
ISO 8601 and W3CDTF (but not RFC 3339) allow less specific dates, excluding the day and month. e.g. "2008-09" (September 2008) or "2008" (the year 2008). The vCard 4 RFC 6350 standard permits year only and year-month syntaxes , thus so does the date design pattern.
- All microformat design patterns
- Datetime Design Pattern
- abbr design pattern
- RFC 3339: Date and Time on the Internet: Timestamps
- W3C: Use international date format (ISO) - Quality Web Tips: "Albeit not perfect, ISO date format is, however, the best choice for a date representation that is universally (and accurately) understandable."
- W3C: Note on Datetimes
- Markus Kuhn: A summary of the international standard date and time notation
- Wikipedia: ISO 8601