https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AUpdated Module:Updated - Revision history 2025-05-25T10:17:40Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.2 https://en.wikipedia.org/w/index.php?title=Module:Updated&diff=1254913521&oldid=prev CanonNi: copied from Module:Sandbox/CanonNi 2024-11-02T08:36:50Z <p>copied from <a href="/wiki/Module:Sandbox/CanonNi" title="Module:Sandbox/CanonNi">Module:Sandbox/CanonNi</a></p> <p><b>New page</b></p><div>local Date = require(&#039;Module:Date&#039;)._Date<br /> local current = require(&#039;Module:Date&#039;)._current<br /> <br /> local p = {}<br /> <br /> function p.main(frame)<br /> local day<br /> <br /> if frame.args[1] then<br /> local success, result = pcall(function() return Date(frame.args[1]):text(&#039;dmy&#039;) end)<br /> if success then <br /> day = result<br /> else<br /> error(&#039;Invalid date format in Template:Update.&#039;)<br /> end<br /> else<br /> day = Date(current.year, current.month, current.day):text(&#039;dmy&#039;) + &#039;[[Category:Pages using updated template with missing date]]&#039;<br /> end<br /> <br /> --check for extra args<br /> local extra = &#039;&#039;<br /> if frame.args[3] and mw.title.getCurrentTitle() == 0 then<br /> extra = &#039;[[Category:Pages using updated template with unknown parameters]]&#039;<br /> end<br /> <br /> return string.format(&quot;: &#039;&#039;As of %s%s%s&#039;&#039;&quot;, day, frame.args[2] or &#039;&#039;, extra)<br /> end<br /> <br /> return p</div> CanonNi