Template:MONTHNAME: Difference between revisions
Jump to navigation
Jump to search
m (Changed protection settings for "Template:MONTHNAME" ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
mNo edit summary |
||
Line 13: | Line 13: | ||
| 11=November | | 11=November | ||
| 12=December | | 12=December | ||
| | | {{error|Invalid month number}} | ||
}} | }} | ||
| | | {{error|Requires '''Month''' parameter!}}</includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
<!-- Add categories to the /doc subpage, not here! --> | <!-- Add categories to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |
Revision as of 00:25, 20 June 2023
Supporting Templates |
This template returns the name of the month whose number is in parameter. Alternatively, the English month name or abbreviation (with any letter case) can be given.
Syntax
- {{MONTHNAME
|month}}
- The month value is interpreted modulo 12 (extra leading zeroes and decimals are ignored).
Compatibility synonym
{{month name|month}}
Examples for all standard month numbers
{{MONTHNAME|1}}
→ {{ #if:1
| January | Requires Month parameter!
{{MONTHNAME|2}}
→ {{ #if:2
| February | Requires Month parameter!
{{MONTHNAME|3}}
→ {{ #if:3
| March | Requires Month parameter!
{{MONTHNAME|4}}
→ {{ #if:4
| April | Requires Month parameter!
{{MONTHNAME|5}}
→ {{ #if:5
| May | Requires Month parameter!
{{MONTHNAME|6}}
→ {{ #if:6
| June | Requires Month parameter!
{{MONTHNAME|7}}
→ {{ #if:7
| July | Requires Month parameter!
{{MONTHNAME|8}}
→ {{ #if:8
| August | Requires Month parameter!
{{MONTHNAME|9}}
→ {{ #if:9
| September | Requires Month parameter!
{{MONTHNAME|10}}
→ {{ #if:10
| October | Requires Month parameter!
{{MONTHNAME|11}}
→ {{ #if:11
| November | Requires Month parameter!
{{MONTHNAME|12}}
→ {{ #if:12
| December | Requires Month parameter!
Examples for month numbers with extra leading zero
{{MONTHNAME|01}}
→ {{ #if:01
| January | Requires Month parameter!
{{MONTHNAME|02}}
→ {{ #if:02
| February | Requires Month parameter!
{{MONTHNAME|03}}
→ {{ #if:03
| March | Requires Month parameter!
{{MONTHNAME|04}}
→ {{ #if:04
| April | Requires Month parameter!
{{MONTHNAME|05}}
→ {{ #if:05
| May | Requires Month parameter!
{{MONTHNAME|06}}
→ {{ #if:06
| June | Requires Month parameter!
{{MONTHNAME|07}}
→ {{ #if:07
| July | Requires Month parameter!
{{MONTHNAME|08}}
→ {{ #if:08
| August | Requires Month parameter!
{{MONTHNAME|09}}
→ {{ #if:09
| September | Requires Month parameter!
Examples for month number cyclic underflows and overflows, from computed values
{{MONTHNAME|-12}}
→ {{ #if:-12
| December | Requires Month parameter!
{{MONTHNAME|-11}}
→ {{ #if:-11
| January | Requires Month parameter!
{{MONTHNAME|-10}}
→ {{ #if:-10
| February | Requires Month parameter!
{{MONTHNAME|-9}}
→ {{ #if:-9
| March | Requires Month parameter!
{{MONTHNAME|-3}}
→ {{ #if:-3
| September | Requires Month parameter!
{{MONTHNAME|-2}}
→ {{ #if:-2
| October | Requires Month parameter!
{{MONTHNAME|-1}}
→ {{ #if:-1
| November | Requires Month parameter!
{{MONTHNAME|0}}
→ {{ #if:0
| December | Requires Month parameter!
{{MONTHNAME|13}}
→ {{ #if:13
| January | Requires Month parameter!
{{MONTHNAME|14}}
→ {{ #if:14
| February | Requires Month parameter!
{{MONTHNAME|15}}
→ {{ #if:15
| March | Requires Month parameter!
{{MONTHNAME|16}}
→ {{ #if:16
| April | Requires Month parameter!
{{MONTHNAME|23}}
→ {{ #if:23
| November | Requires Month parameter!
{{MONTHNAME|24}}
→ {{ #if:24
| December | Requires Month parameter!
{{MONTHNAME|25}}
→ {{ #if:25
| January | Requires Month parameter!
{{MONTHNAME|1200}}
→ {{ #if:1200
| December | Requires Month parameter!
{{MONTHNAME|1201}}
→ {{ #if:1201
| January | Requires Month parameter!
{{MONTHNAME|1212}}
→ {{ #if:1212
| December | Requires Month parameter!
Examples for all standard English month names
{{MONTHNAME|JANUARY}}
→ {{ #if:JANUARY
| January | Requires Month parameter!
{{MONTHNAME|FEBRUARY}}
→ {{ #if:FEBRUARY
| February | Requires Month parameter!
{{MONTHNAME|MARCH}}
→ {{ #if:MARCH
| March | Requires Month parameter!
{{MONTHNAME|APRIL}}
→ {{ #if:APRIL
| April | Requires Month parameter!
{{MONTHNAME|MAY}}
→ {{ #if:MAY
| May | Requires Month parameter!
{{MONTHNAME|JUNE}}
→ {{ #if:JUNE
| June | Requires Month parameter!
{{MONTHNAME|JULY}}
→ {{ #if:JULY
| July | Requires Month parameter!
{{MONTHNAME|AUGUST}}
→ {{ #if:AUGUST
| August | Requires Month parameter!
{{MONTHNAME|SEPTEMBER}}
→ {{ #if:SEPTEMBER
| September | Requires Month parameter!
{{MONTHNAME|OCTOBER}}
→ {{ #if:OCTOBER
| October | Requires Month parameter!
{{MONTHNAME|NOVEMBER}}
→ {{ #if:NOVEMBER
| November | Requires Month parameter!
{{MONTHNAME|DECEMBER}}
→ {{ #if:DECEMBER
| December | Requires Month parameter!
Examples for all abbreviated English month names
{{MONTHNAME|jan}}
→ {{ #if:jan
| January | Requires Month parameter!
{{MONTHNAME|feb}}
→ {{ #if:feb
| February | Requires Month parameter!
{{MONTHNAME|mar}}
→ {{ #if:mar
| March | Requires Month parameter!
{{MONTHNAME|apr}}
→ {{ #if:apr
| April | Requires Month parameter!
{{MONTHNAME|may}}
→ {{ #if:may
| May | Requires Month parameter!
{{MONTHNAME|jun}}
→ {{ #if:jun
| June | Requires Month parameter!
{{MONTHNAME|jul}}
→ {{ #if:jul
| July | Requires Month parameter!
{{MONTHNAME|aug}}
→ {{ #if:aug
| August | Requires Month parameter!
{{MONTHNAME|sep}}
→ {{ #if:sep
| September | Requires Month parameter!
{{MONTHNAME|oct}}
→ {{ #if:oct
| October | Requires Month parameter!
{{MONTHNAME|nov}}
→ {{ #if:nov
| November | Requires Month parameter!
{{MONTHNAME|dec}}
→ {{ #if:dec
| December | Requires Month parameter!
TemplateData
Returns the name of the month of the given number.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Number | 1 | The number to input for a month. | Number | required |