https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AFormat_time%2FdocModule:Format time/doc - Revision history2025-06-29T13:23:55ZRevision history for this page on the wikiMediaWiki 1.45.0-wmf.7https://en.wikipedia.org/w/index.php?title=Module:Format_time/doc&diff=1297730853&oldid=prevHouseBlaster: create doc2025-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 />
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --><br />
This module is a fancy way to call {{pf|time}} in Lua. Unlike <code>#time</code>, it handles YMD dates (e.g. 2020 January 1) correctly via [[Module:YMD to ISO]].<br />
<br />
==Syntax==<br />
From a template:<br />
<syntaxhighlight lang="wikitext">{{#invoke:Format date|main|1='<timestamp>'|fmt='<Formatting string>'}}</syntaxhighlight><br />
<br />
From a module:<br />
<syntaxhighlight lang="lua">require('Module:Format time')._main{<timestamp>, fmt = <Formatting string>}</syntaxhighlight><br />
In both cases, <timestamp> 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 <code>j xg Y</code>, which renders dates like {{samp|28 June 2025}}.<br />
<br />
<includeonly>{{Sandbox other||<br />
<!-- Categories below this line; interwikis at Wikidata --><br />
[[Category:Time, date and calendar modules]]<br />
}}</includeonly><br />
<br />
<noinclude><br />
[[Category:Module documentation pages]]<br />
</noinclude></div>HouseBlaster