Template:ISO end date/doc

This template converts dates to ISO dates (YYYY-MM-DD or YYYY-MM or YYYY as appropriate), see below for restrictions on input formats accepted.

Usage
The template mat be used without any parameters, in which case it displays the current date:


 * returns

The template accepts one unnamed parameter containing a date in one of the following formats:


 * returns
 * returns
 * returns


 * returns
 * returns
 * returns
 * returns


 * returns
 * returns


 * returns

Formats for which it can not work because #time returns an error or an incorrect ISO format:


 * returns (hyphens indicate DD-MM-YYYY and 15 is an invalid month number)
 * returns (slashes indicate MM/DD/YYYY and 15 is an invalid month number)
 * returns
 * returns
 * returns (expected: )

Use in microformats
This template also wraps the date in the  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  or even   or , this template should not be used for whole-day dates.