The first video in the TASBot Re: (TASBot Revisited) series is out! TASBot Re: Gradius covers our first run from AGDQ 2014.

Historians wanted: Inquire here.

Template:Pretty date: Difference between revisions

Template page
m (Add TemplateData)
m (Use markup to control breaks instead of NBSP chars)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>{{#time:D, M|{{{1}}}}} {{ordinal|{{#time:j|{{{1}}}}}}} {{#time:Y|{{{1}}}}}</includeonly></onlyinclude>
<onlyinclude><includeonly><span style="white-space: nowrap;">{{#time:D, M|{{{1}}}}} {{ordinal|{{#time:j|{{{1}}}}}}} {{#time:Y|{{{1}}}}}</span></includeonly></onlyinclude>
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> &longrightarrow; {{pretty date|nov 26th 2006}}
* {{pretty date|1969-07-21}}
* <code><nowiki>{{pretty date|1969-07-21}}</nowiki></code> &longrightarrow; {{pretty date|1969-07-21}}
* {{pretty date|19 January 2038}}
* <code><nowiki>{{pretty date|19 January 2038}}</nowiki></code> &longrightarrow; {{pretty date|19 January 2038}}


{{TemplateData preamble}}<templatedata>
{{TemplateData preamble}}<templatedata>
Line 21: Line 21:
}
}
</templatedata>
</templatedata>
[[Category:General-use_inline_templates]]

Latest revision as of 20:37, 23 February 2024

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".

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Date1

please use YYYY-MM-DD

Example
2006-11-26
Daterequired