Module:Format time/doc: Difference between revisions

Content deleted Content added
create doc
 
add
 
Line 1:
{{Module rating|betaprotected}}
{{Lua|Module:Arguments|Module:YMD to ISO}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
Line 6:
==Syntax==
From a template:
<syntaxhighlight lang="wikitext">{{#invoke:Format date|main|1='<timestamp>'|fmt='<Formatting string>'}}</syntaxhighlight>
 
From a module:
<syntaxhighlight lang="lua">require('Module:Format time')._main{<timestamp>, fmt = <Formatting string>}</syntaxhighlight>
In both cases, <timestamp> is any timestamp considered valid by {{pf|time}} in addition toplus 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}}.
 
<includeonly>{{Sandbox other||