Difference between revisions of "Template:ISO date/doc"

From blackwiki
Jump to navigation Jump to search
imported>Pigsonthewing
imported>John of Reading
m (→‎Usage: Typo fixing, replaced: formated → formatted using AWB (8853))
Line 3: Line 3:
 
This template converts dates to YYYY-MM-DD or YYYY-MM or YYYY as appropriate - see below for restrictions on input formats accepted.
 
This template converts dates to YYYY-MM-DD or YYYY-MM or YYYY as appropriate - see below for restrictions on input formats accepted.
 
== Usage ==
 
== Usage ==
This template only converts dates formated in one of the formats below to an ISO date  
+
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:
 
The template accepts one parameter - which must be unnamed. For example:

Revision as of 19:20, 5 February 2013

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

Template:UF-date-part

See also