Difference between revisions of "Template:ISO end date/doc"
imported>Nsaa |
imported>FrescoBot m (Bot: links syntax and spacing) |
||
| Line 27: | Line 27: | ||
== Use in microformats == | == Use in microformats == | ||
| − | This template also wraps the date in the <code>dtend</code> classes needed by the [[ | + | This template also wraps the date in the <code>dtend</code> classes needed by the [[hCalendar]] [[microformat]] - usually, but not always, within infobox or similar templates, or tables. |
'''Note: due to the requirement exclusive "dtend" in [[hCalendar]], and the accessibility problems that presents when a date is rendered (as seen without CSS) as <tt>28 March 1999 (1999-03-29)</tt> or even <tt>28 February 1999 (1999-03-01)</tt> or <tt>31 December 1999 (2000-01-01)</tt>, this template should '''not''' be used for whole-day dates.''' | '''Note: due to the requirement exclusive "dtend" in [[hCalendar]], and the accessibility problems that presents when a date is rendered (as seen without CSS) as <tt>28 March 1999 (1999-03-29)</tt> or even <tt>28 February 1999 (1999-03-01)</tt> or <tt>31 December 1999 (2000-01-01)</tt>, this template should '''not''' be used for whole-day dates.''' | ||
Revision as of 17:51, 24 April 2010
| 40px | This is a documentation subpage for Template:ISO end date. It contains usage information, categories and other content that is not part of the original template page. |
This template converts dates to YYYY-MM-DD or YYYY-MM or YYYY as appropriate - see below for restrictions on input formats accepted.
Usage
This template only converts dates formatted in one of the formats below to an ISO date
The template accepts one parameter - which must be unnamed. For example:
- {{ISO date|15 January 2001}} returns 2001-01-15
- {{ISO date|March 2003}} returns 2003-03
The date parameter must be in one of the following formats:
- 15 January 2001
- 15 Jan 2001
- January 15, 2001
- Jan 15, 2001
- 15-01-2001
- January 2001
- Jan 2001
- 2001
Formats for which it can not work because #time returns an error:
- 01-15-2001
- 1/2001
Use in microformats
This template also wraps the date in the dtend classes needed by the hCalendar microformat - usually, but not always, within infobox or similar templates, or tables.
Note: due to the requirement exclusive "dtend" in hCalendar, and the accessibility problems that presents when a date is rendered (as seen without CSS) as 28 March 1999 (1999-03-29) or even 28 February 1999 (1999-03-01) or 31 December 1999 (2000-01-01), this template should not be used for whole-day dates.
See also
- {{ISO date}}
- {{Birth date}}
- {{Birth date and age}}
- {{Start date}}