Template:Month/doc: Difference between revisions

From comp.tf
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 7: Line 7:
|{{month|1}}
|{{month|1}}
|-
|-
|<code><nowiki>{{month|01}}</nowiki></code>
|<code><nowiki>{{month|02}}</nowiki></code>
|{{month|01}}
|{{month|02}}
|-
|-
|<code><nowiki>{{month|jan}}</nowiki></code>
|<code><nowiki>{{month|mar}}</nowiki></code>
|{{month|jan}}
|{{month|mar}}
|-
|-
|<code><nowiki>{{month|january}}</nowiki></code>
|<code><nowiki>{{month|april}}</nowiki></code>
|{{month|january}}
|{{month|april}}
|}
|}
A second parameter may also be added. If set to <code>num</code> or <code>number</code>, the template will instead return the numberical value of the month.
A second parameter may also be added. If set to <code>num</code> or <code>number</code>, the template will instead return the numberical value of the month.

Latest revision as of 00:26, 16 April 2020

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