Difference between revisions of "Template:ISO date/doc"
Jump to navigation
Jump to search
imported>Trödel (→Usage: function is generalized now - update documentation) |
imported>Trödel (edit summary) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
| − | This template converts dates | + | 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 these formats to an ISO date (a generalized version exists in the history but it will not work consistently because of the number of #time codes used in the calling template. | This template only converts dates formated in one of these formats to an ISO date (a generalized version exists in the history but it will not work consistently because of the number of #time codes used in the calling template. | ||
Revision as of 12:12, 11 November 2008
| 40px | This is a documentation subpage for Template:ISO 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 formated in one of these formats to an ISO date (a generalized version exists in the history but it will not work consistently because of the number of #time codes used in the calling template.
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