https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AFormat_time%2Fdoc Module:Format time/doc - Revision history 2025-06-29T16:29:32Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.7 https://en.wikipedia.org/w/index.php?title=Module:Format_time/doc&diff=1297730853&oldid=prev HouseBlaster: create doc 2025-06-28T04:08:16Z <p>create doc</p> <p><b>New page</b></p><div>{{Module rating|beta}}<br /> {{Lua|Module:Arguments|Module:YMD to ISO}}<br /> &lt;!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --&gt;<br /> This module is a fancy way to call {{pf|time}} in Lua. Unlike &lt;code&gt;#time&lt;/code&gt;, it handles YMD dates (e.g. 2020 January 1) correctly via [[Module:YMD to ISO]].<br /> <br /> ==Syntax==<br /> From a template:<br /> &lt;syntaxhighlight lang=&quot;wikitext&quot;&gt;{{#invoke:Format date|main|1=&#039;&lt;timestamp&gt;&#039;|fmt=&#039;&lt;Formatting string&gt;&#039;}}&lt;/syntaxhighlight&gt;<br /> <br /> From a module:<br /> &lt;syntaxhighlight lang=&quot;lua&quot;&gt;require(&#039;Module:Format time&#039;)._main{&lt;timestamp&gt;, fmt = &lt;Formatting string&gt;}&lt;/syntaxhighlight&gt;<br /> In both cases, &lt;timestamp&gt; is any timestamp considered valid by {{pf|time}} in addition to YMD format. {{para|fmt}} can be any format according to [[:mw:Help:Extension:ParserFunctions##time]], and defaults to &lt;code&gt;j xg Y&lt;/code&gt;, which renders dates like {{samp|28 June 2025}}.<br /> <br /> &lt;includeonly&gt;{{Sandbox other||<br /> &lt;!-- Categories below this line; interwikis at Wikidata --&gt;<br /> [[Category:Time, date and calendar modules]]<br /> }}&lt;/includeonly&gt;<br /> <br /> &lt;noinclude&gt;<br /> [[Category:Module documentation pages]]<br /> &lt;/noinclude&gt;</div> HouseBlaster