Difference between revisions of "Template:FormatTime"
Jump to navigation
Jump to search
imported>CyberSkull (|{{PAGENAME}}) |
imported>TheMuuj m (foolproofing: adding padleft to allow for 4|5 instead of 4|05 for 4:05) |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{#ifexpr:({{{1|0}}}=0 or {{{1|0}}}=24) and {{{2|0}}}=0|Midnight|{{#ifexpr:{{{1|0}}}=12 and {{{2|0}}}=0|Noon|{{#expr:({{{1|0}}}+11)mod 12+1}}{{#ifexpr:{{{2|0}}}>0|<nowiki>:</nowiki>{{{2|0 | + | <includeonly>{{#ifexpr:({{{1|0}}}=0 or {{{1|0}}}=24) and {{{2|0}}}=0|Midnight|{{#ifexpr:{{{1|0}}}=12 and {{{2|0}}}=0|Noon|{{#expr:({{{1|0}}}+11)mod 12+1}}{{#ifexpr:{{{2|0}}}>0|<nowiki>:</nowiki>{{padleft:{{{2|00}}}|2|0}}}}{{#ifexpr:{{{3|-1}}}<0 or ({{{1|0}}}<12)!=({{{3|0}}}<12)|<nowiki> </nowiki>{{#ifexpr:{{{1|0}}}<12|a.m.|p.m.}}}}}}}}</includeonly><noinclude> |
| + | <!--the code below is for time ranges--> | ||
| + | </noinclude><includeonly>{{#if:{{{3|}}}|–{{#ifexpr:({{{3|0}}}=0 or {{{3|0}}}=24) and {{{4|0}}}=0|Midnight|{{#ifexpr:{{{3|0}}}=12 and {{{4|0}}}=0|Noon|{{#expr:({{{3|0}}}+11)mod 12+1}}{{#ifexpr:{{{4|0}}}>0|<nowiki>:</nowiki>{{padleft:{{{4|00}}}|2|0}}}} {{#ifexpr:{{{3|0}}}<12|a.m.|p.m.}}}}}}}}</includeonly><noinclude> | ||
{{esoteric}} | {{esoteric}} | ||
Revision as of 07:44, 30 August 2006
| This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
Instructions
See the Template talk:FormatTime for information regarding the use of this template.