m (Add TemplateData) |
m (Show source for examples (oops)) |
||
Line 2: | Line 2: | ||
Formats a date similarly to how the format string <code>D, M j Y</code> for [[mw:Help:Extension:ParserFunctions##time|ParserFunctions' <code><nowiki>{{#time}}</nowiki></code>]] would, but with an ordinal for the DoM. | Formats a date similarly to how the format string <code>D, M j Y</code> for [[mw:Help:Extension:ParserFunctions##time|ParserFunctions' <code><nowiki>{{#time}}</nowiki></code>]] would, but with an ordinal for the DoM. | ||
Examples: | Examples: | ||
* {{pretty date|nov 26th 2006}} | * <code><nowiki>{{pretty date|nov 26th 2006}}</nowiki></code> ⟶ {{pretty date|nov 26th 2006}} | ||
* {{pretty date|1969-07-21}} | * <code><nowiki>{{pretty date|1969-07-21}}</nowiki></code> ⟶ {{pretty date|1969-07-21}} | ||
* {{pretty date|19 January 2038}} | * <code><nowiki>{{pretty date|19 January 2038}}</nowiki></code> ⟶ {{pretty date|19 January 2038}} | ||
{{TemplateData preamble}}<templatedata> | {{TemplateData preamble}}<templatedata> |
Revision as of 17:22, 30 October 2023
Formats a date similarly to how the format string D, M j Y
for ParserFunctions' {{#time}}
would, but with an ordinal for the DoM.
Examples:
{{pretty date|nov 26th 2006}}
⟶ Sun, Nov 26th 2006{{pretty date|1969-07-21}}
⟶ Mon, Jul 21st 1969{{pretty date|19 January 2038}}
⟶ Tue, Jan 19th 2038
The below documentation is automatically generated from JSON. It can be changed by editing this page, but note that it's only the documentation (for the visual editor)—the actual template part must also be edited, manually.
Formats a date, e.g. "2006-11-26" becomes "Sun, Nov 26th 2006".
Parameter | Description | Type | Status | |
---|---|---|---|---|
Date | 1 | please use YYYY-MM-DD
| Date | required |