Template:Revision date/doc
The {{revision date}}
template displays the date on which the page it is used on was last updated. The default format is m/d/yyyy (3/14/2017 or 12/6/2018, for instance) but there is a |format=
parameter that can be used to specify alternate formats. If you use this in a template, and want it to refer to the date that the template was last modified rather than the revision date of the article that the template is used on, you must also set a |page=
parameter.
Parameters
Parameter | Notes |
---|---|
|Page= |
Sets the article name that it displays the revision date of. If omitted, the revision date of whatever article that {{revision date}} is used on. Note that if you use {{revision date}} in a template, and use that template on another page without specifying anything in the |page= parameter, you will get the revision date of the page that template is used on, not the revision date of the template. To get the revision date of the template, you'd have to say |page=template:template name . If the parameter name isn't specified, this must be the first unnamed parameter.
|
|Format= |
Specifies a format code to use to control how the date is displayed. If omitted, the format will be m/d/yyyy (so the number of the month without zero padding [such as 9 rather than 09], the number of the day without zero padding, and a 4-digit year). If the parameter name isn't specified, this must be the second unnamed parameter. See the #time parser function for a complete listing of available formatting codes, or see below for some common ones. |
Common date formatting codes
Format Code | Appearance | |||
---|---|---|---|---|
New Years Day | Valentines Day | Halloween | Pearl Harbor Day | |
n/j/Y |
1/1/2025 |
2/14/2025 |
10/31/2025 |
12/7/2025
|
n-j-Y |
1-1-2025 |
2-14-2025 |
10-31-2025 |
12-7-2025
|
m/d/Y |
01/01/2025 |
02/14/2025 |
10/31/2025 |
12/07/2025
|
m/d/y |
01/01/25 |
02/14/25 |
10/31/25 |
12/07/25
|
M. j, Y |
Jan. 1, 2025 |
Feb. 14, 2025 |
Oct. 31, 2025 |
Dec. 7, 2025
|
F j, Y |
January 1, 2025 |
February 14, 2025 |
October 31, 2025 |
December 7, 2025
|