Template:Month: Difference between revisions

From comp.tf
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{2|}}}|{{#switch:{{lc:{{{2|}}}}}|
<includeonly>{{#if:{{{2|}}}|{{#switch:{{lc:{{{2|}}}}}
   |num
   |num
   |number={{#switch:{{lc:{{{1|}}}}}|
   |number={{#switch:{{lc:{{{1|}}}}}
   |1|01|jan|january=01
   |1|01|jan|january=01
   |2|02|feb|february=02
   |2|02|feb|february=02
Line 14: Line 14:
   |11|nov|november=11
   |11|nov|november=11
   |11|dec|december=12
   |11|dec|december=12
}}}}|{{#switch:{{lc:{{{5|}}}}}|
}}}}|{{#switch:{{lc:{{{1|}}}}}
   |1|01|jan|january=January
   |1|01|jan|january=January
   |2|02|feb|february=February
   |2|02|feb|february=February

Latest revision as of 00:25, 16 April 2020

(view - edit) Documentation

This template converts numbers/abbreviations/full names of months into numbers or month names.

You type You get
{{month|1}} January
{{month|02}} February
{{month|mar}} March
{{month|april}} April

A second parameter may also be added. If set to num or number, the template will instead return the numberical value of the month.

You type You get
{{month|jan|num}} 01