Difference between revisions of "Template:PrettyRevisionTimestamp"

From Archiveteam
Jump to navigation Jump to search
(I discovered there are bugs with the now that I've created the template)
(nah, it's tenable)
Line 1: Line 1:
<includeonly>'''{{#time: d M, Y| {{REVISIONTIMESTAMP:{{{1|}}}}}}}'''</includeonly><noinclude>
<includeonly>'''{{#time: d M, Y| {{REVISIONTIMESTAMP:{{{1|}}}}}}}'''</includeonly><noinclude>
{{notice|Too buggy}}
This template inserts the date on which an article was last edited. This has been used to communicate which of the lists in [[Projects]] haven't had an update in years.  
<s>This template inserts the date on which an article was last edited. This has been used to communicate which of the lists in [[Projects]] haven't had an update in years.  


The template is called PrettyRevisionTimestamp because it simply pretty prints the date of the <code>REVISIONTIMESTAMP</code> [[mediawikiwiki:Magic_words#Technical_metadata|magic word]].
The template is called PrettyRevisionTimestamp because it simply pretty prints the date of the <code>REVISIONTIMESTAMP</code> [[mediawikiwiki:Magic_words#Technical_metadata|magic word]].


{{notice|This template uses an "[[mediawikiwiki:Manual:$wgExpensiveParserFunctionLimit|expensive parser function]]" (<code>REVISIONTIMESTAMP</code> with a different page as a parameter) but it ''isn't'' worse for rendering times than regular transclusions (in [[/Performance|my testing]].) Still, use it in moderation.}}
== Usage ==
== Usage ==
<pre>
<pre>
Line 11: Line 11:


[[Manual projects]] was last updated: {{PrettyRevisionTimestamp|Manual projects}}
[[Manual projects]] was last updated: {{PrettyRevisionTimestamp|Manual projects}}
{{PrettyRevisionTimestamp|Warrior projects}}</s>
</noinclude>
</noinclude>

Revision as of 14:53, 24 August 2024

This template inserts the date on which an article was last edited. This has been used to communicate which of the lists in Projects haven't had an update in years.

The template is called PrettyRevisionTimestamp because it simply pretty prints the date of the REVISIONTIMESTAMP magic word.

Archiveteam1.png This template uses an "expensive parser function" (REVISIONTIMESTAMP with a different page as a parameter) but it isn't worse for rendering times than regular transclusions (in my testing.) Still, use it in moderation.

Usage

[[Manual projects]] was last updated: {{PrettyRevisionTimestamp|Manual projects}}

Manual projects was last updated: 31 Oct, 2021