Template:Out of date: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Rewrote template) |
||
Line 1: | Line 1: | ||
< | <includeonly>{{#if: {{{1|}}} | ||
| <!-- Date provided --> | |||
{{#lvardef: timestamp_diff | | |||
{{#expr: | |||
{{#time: xNU | {{currentdate}}}} - {{#time: xNU | {{{1|}}} }} | |||
}} | |||
}} | |||
{{#lvardef: days_out_of_date | | |||
{{#expr: | |||
floor({{#lvar: timestamp_diff }} / 86400) | |||
}} | |||
}} | |||
{{#lvardef: last_update | | |||
{{#ifeq: {{#lvar: days_out_of_date}} | |||
| 0 | |||
| today | |||
| {{#lvar: days_out_of_date}} days ago | |||
}} | |||
}} | |||
{{ambox | |||
| type = content | |||
| image = [[File:Refreshed_Condition_Icon.webp|35px|link=]] | |||
| text = This article was marked as out of date {{#lvar: last_update}}, and may need to be updated. {{{reason|No reason for adding this template was given.}}} Remove this notice when the article is up to date. | |||
}} | |||
| <!-- No date provided --> | |||
{{ambox | |||
| type = content | |||
| image = [[File:Refreshed_Condition_Icon.webp|35px|link=]] | |||
| text = This article was marked as out of date and may need to be updated. {{{reason|No reason for adding this template was given.}}} Remove this notice when the article is up to date. | |||
}} | |||
}}{{main namespace only|[[Category:Articles in need of updating]]}}</includeonly><noinclude>{{documentation|content= | |||
Displays a notice if a page is out of date and needs to be updated. | |||
< | This template has a corresponding maintenance category: [[:Category:Articles in need of updating]]. | ||
== Examples == | |||
{{Template demo | |||
| style = list | |||
| caption 1 = No date supplied. | |||
| <nowiki>{{lastupdated}} </nowiki> | |||
| caption 2 = Date manually specified. | |||
| <nowiki>{{lastupdated|2024-12-04}} </nowiki> | |||
| caption 3 = Date specified using automatic substitution. This is the preferred method. | |||
| <nowiki>{{lastupdated|{{safesubst:currentdate}}}} </nowiki> | |||
| caption 4 = Reason specified | |||
| <nowiki>{{lastupdated|2024-12-04|reason=This spell was changed in Patch 8 and the article needs to be updated.}} </nowiki> | |||
}} | |||
== Template data == | == Template data == | ||
<templatedata> | <templatedata> | ||
Line 25: | Line 51: | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"autovalue": "{{ | "autovalue": "{{safesubst:CURRENTDATE}}", | ||
"suggested": true | "suggested": true | ||
}, | }, | ||
Line 32: | Line 58: | ||
} | } | ||
</templatedata>}} | </templatedata>}} | ||
[[Category:Templates]] | |||
[[Category:Message box templates]] | |||
</noinclude> | </noinclude> |
Revision as of 03:35, 14 December 2024
Template documentation
Displays a notice if a page is out of date and needs to be updated.
This template has a corresponding maintenance category: Category:Articles in need of updating.
Examples
No date supplied.
Markup{{lastupdated}}Renders as
This article was marked as out of date and may need to be updated. No reason for adding this template was given. Remove this notice when the article is up to date. |
Date manually specified.
Markup{{lastupdated|2024-12-04}}Renders as
This article was marked as out of date 14 days ago, and may need to be updated. No reason for adding this template was given. Remove this notice when the article is up to date. |
Date specified using automatic substitution. This is the preferred method.
Markup{{lastupdated|{{safesubst:currentdate}}}}Renders as
This article was marked as out of date today, and may need to be updated. No reason for adding this template was given. Remove this notice when the article is up to date. |
Reason specified
Markup{{lastupdated|2024-12-04|reason=This spell was changed in Patch 8 and the article needs to be updated.}}Renders as
This article was marked as out of date 14 days ago, and may need to be updated. This spell was changed in Patch 8 and the article needs to be updated. Remove this notice when the article is up to date. |
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | no description
| Unknown | suggested |
reason | reason | no description | Unknown | optional |