Template:MONTHNAME/doc: Difference between revisions

From HIBIKIFORUM
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{template rating|p}}
{{Support|Template:MONTHNUMBER}}
__NOTOC__


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.
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 ===
=== Syntax ===
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|</nowiki></code>''month''<code>}}</code>
: {{tji|MONTHNAME|month}}
* The ''month'' value is interpreted modulo 12 (extra leading zeroes and decimals are ignored).
* The ''month'' value is interpreted modulo 12 (extra leading zeroes and decimals are ignored).


=== Compatibility synonym ===
=== Compatibility synonym ===
: <code><nowiki>{{</nowiki>month name|</code>''month''<code>}}</code>
: {{tlc|month name|''month''}}


=== Examples for all standard month numbers ===
=== Examples for all standard month numbers ===
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|1}}</nowiki></code> returns {{MONTHNAME|1}}
: {{tlc|MONTHNAME|1}} {{Rarr}} {{MONTHNAME|1}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|2}}</nowiki></code> returns {{MONTHNAME|2}}
: {{tlc|MONTHNAME|2}} {{Rarr}} {{MONTHNAME|2}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|3}}</nowiki></code> returns {{MONTHNAME|3}}
: {{tlc|MONTHNAME|3}} {{Rarr}} {{MONTHNAME|3}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|4}}</nowiki></code> returns {{MONTHNAME|4}}
: {{tlc|MONTHNAME|4}} {{Rarr}} {{MONTHNAME|4}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|5}}</nowiki></code> returns {{MONTHNAME|5}}
: {{tlc|MONTHNAME|5}} {{Rarr}} {{MONTHNAME|5}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|6}}</nowiki></code> returns {{MONTHNAME|6}}
: {{tlc|MONTHNAME|6}} {{Rarr}} {{MONTHNAME|6}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|7}}</nowiki></code> returns {{MONTHNAME|7}}
: {{tlc|MONTHNAME|7}} {{Rarr}} {{MONTHNAME|7}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|8}}</nowiki></code> returns {{MONTHNAME|8}}
: {{tlc|MONTHNAME|8}} {{Rarr}} {{MONTHNAME|8}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|9}}</nowiki></code> returns {{MONTHNAME|9}}
: {{tlc|MONTHNAME|9}} {{Rarr}} {{MONTHNAME|9}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|10}}</nowiki></code> returns {{MONTHNAME|10}}
: {{tlc|MONTHNAME|10}} {{Rarr}} {{MONTHNAME|10}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|11}}</nowiki></code> returns {{MONTHNAME|11}}
: {{tlc|MONTHNAME|11}} {{Rarr}} {{MONTHNAME|11}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|12}}</nowiki></code> returns {{MONTHNAME|12}}
: {{tlc|MONTHNAME|12}} {{Rarr}} {{MONTHNAME|12}}


=== Examples for month numbers with extra leading zero ===
=== Examples for month numbers with extra leading zero ===
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|01}}</nowiki></code> returns {{MONTHNAME|01}}
: {{tlc|MONTHNAME|01}} {{Rarr}} {{MONTHNAME|01}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|02}}</nowiki></code> returns {{MONTHNAME|02}}
: {{tlc|MONTHNAME|02}} {{Rarr}} {{MONTHNAME|02}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|03}}</nowiki></code> returns {{MONTHNAME|03}}
: {{tlc|MONTHNAME|03}} {{Rarr}} {{MONTHNAME|03}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|04}}</nowiki></code> returns {{MONTHNAME|04}}
: {{tlc|MONTHNAME|04}} {{Rarr}} {{MONTHNAME|04}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|05}}</nowiki></code> returns {{MONTHNAME|05}}
: {{tlc|MONTHNAME|05}} {{Rarr}} {{MONTHNAME|05}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|06}}</nowiki></code> returns {{MONTHNAME|06}}
: {{tlc|MONTHNAME|06}} {{Rarr}} {{MONTHNAME|06}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|07}}</nowiki></code> returns {{MONTHNAME|07}}
: {{tlc|MONTHNAME|07}} {{Rarr}} {{MONTHNAME|07}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|08}}</nowiki></code> returns {{MONTHNAME|08}}
: {{tlc|MONTHNAME|08}} {{Rarr}} {{MONTHNAME|08}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|09}}</nowiki></code> returns {{MONTHNAME|09}}
: {{tlc|MONTHNAME|09}} {{Rarr}} {{MONTHNAME|09}}


=== Examples for month number cyclic underflows and overflows, from computed values ===
=== Examples for month number cyclic underflows and overflows, from computed values ===
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|-12}}</nowiki></code> returns {{MONTHNAME|-12}}
: {{tlc|MONTHNAME|-12}} {{Rarr}} {{MONTHNAME|-12}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|-11}}</nowiki></code> returns {{MONTHNAME|-11}}
: {{tlc|MONTHNAME|-11}} {{Rarr}} {{MONTHNAME|-11}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|-10}}</nowiki></code> returns {{MONTHNAME|-10}}
: {{tlc|MONTHNAME|-10}} {{Rarr}} {{MONTHNAME|-10}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|-9}}</nowiki></code> returns {{MONTHNAME|-9}}
: {{tlc|MONTHNAME|-9}} {{Rarr}} {{MONTHNAME|-9}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|-3}}</nowiki></code> returns {{MONTHNAME|-3}}
: {{tlc|MONTHNAME|-3}} {{Rarr}} {{MONTHNAME|-3}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|-2}}</nowiki></code> returns {{MONTHNAME|-2}}
: {{tlc|MONTHNAME|-2}} {{Rarr}} {{MONTHNAME|-2}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|-1}}</nowiki></code> returns {{MONTHNAME|-1}}
: {{tlc|MONTHNAME|-1}} {{Rarr}} {{MONTHNAME|-1}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|0}}</nowiki></code> returns {{MONTHNAME|0}}
: {{tlc|MONTHNAME|0}} {{Rarr}} {{MONTHNAME|0}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|13}}</nowiki></code> returns {{MONTHNAME|13}}
: {{tlc|MONTHNAME|13}} {{Rarr}} {{MONTHNAME|13}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|14}}</nowiki></code> returns {{MONTHNAME|14}}
: {{tlc|MONTHNAME|14}} {{Rarr}} {{MONTHNAME|14}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|15}}</nowiki></code> returns {{MONTHNAME|15}}
: {{tlc|MONTHNAME|15}} {{Rarr}} {{MONTHNAME|15}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|16}}</nowiki></code> returns {{MONTHNAME|16}}
: {{tlc|MONTHNAME|16}} {{Rarr}} {{MONTHNAME|16}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|23}}</nowiki></code> returns {{MONTHNAME|23}}
: {{tlc|MONTHNAME|23}} {{Rarr}} {{MONTHNAME|23}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|24}}</nowiki></code> returns {{MONTHNAME|24}}
: {{tlc|MONTHNAME|24}} {{Rarr}} {{MONTHNAME|24}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|25}}</nowiki></code> returns {{MONTHNAME|25}}
: {{tlc|MONTHNAME|25}} {{Rarr}} {{MONTHNAME|25}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|1200}}</nowiki></code> returns {{MONTHNAME|1200}}
: {{tlc|MONTHNAME|1200}} {{Rarr}} {{MONTHNAME|1200}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|1201}}</nowiki></code> returns {{MONTHNAME|1201}}
: {{tlc|MONTHNAME|1201}} {{Rarr}} {{MONTHNAME|1201}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|1212}}</nowiki></code> returns {{MONTHNAME|1212}}
: {{tlc|MONTHNAME|1212}} {{Rarr}} {{MONTHNAME|1212}}


=== Examples for all standard English month names ===
=== Examples for all standard English month names ===
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|JANUARY}}</nowiki></code> returns {{MONTHNAME|JANUARY}}
: {{tlc|MONTHNAME|JANUARY}} {{Rarr}} {{MONTHNAME|JANUARY}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|FEBRUARY}}</nowiki></code> returns {{MONTHNAME|FEBRUARY}}
: {{tlc|MONTHNAME|FEBRUARY}} {{Rarr}} {{MONTHNAME|FEBRUARY}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|MARCH}}</nowiki></code> returns {{MONTHNAME|MARCH}}
: {{tlc|MONTHNAME|MARCH}} {{Rarr}} {{MONTHNAME|MARCH}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|APRIL}}</nowiki></code> returns {{MONTHNAME|APRIL}}
: {{tlc|MONTHNAME|APRIL}} {{Rarr}} {{MONTHNAME|APRIL}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|MAY}}</nowiki></code> returns {{MONTHNAME|MAY}}
: {{tlc|MONTHNAME|MAY}} {{Rarr}} {{MONTHNAME|MAY}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|JUNE}}</nowiki></code> returns {{MONTHNAME|JUNE}}
: {{tlc|MONTHNAME|JUNE}} {{Rarr}} {{MONTHNAME|JUNE}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|JULY}}</nowiki></code> returns {{MONTHNAME|JULY}}
: {{tlc|MONTHNAME|JULY}} {{Rarr}} {{MONTHNAME|JULY}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|AUGUST}}</nowiki></code> returns {{MONTHNAME|AUGUST}}
: {{tlc|MONTHNAME|AUGUST}} {{Rarr}} {{MONTHNAME|AUGUST}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|SEPTEMBER}}</nowiki></code> returns {{MONTHNAME|SEPTEMBER}}
: {{tlc|MONTHNAME|SEPTEMBER}} {{Rarr}} {{MONTHNAME|SEPTEMBER}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|OCTOBER}}</nowiki></code> returns {{MONTHNAME|OCTOBER}}
: {{tlc|MONTHNAME|OCTOBER}} {{Rarr}} {{MONTHNAME|OCTOBER}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|NOVEMBER}}</nowiki></code> returns {{MONTHNAME|NOVEMBER}}
: {{tlc|MONTHNAME|NOVEMBER}} {{Rarr}} {{MONTHNAME|NOVEMBER}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|DECEMBER}}</nowiki></code> returns {{MONTHNAME|DECEMBER}}
: {{tlc|MONTHNAME|DECEMBER}} {{Rarr}} {{MONTHNAME|DECEMBER}}


=== Examples for all abbreviated English month names ===
=== Examples for all abbreviated English month names ===
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|jan}}</nowiki></code> returns {{MONTHNAME|jan}}
: {{tlc|MONTHNAME|jan}} {{Rarr}} {{MONTHNAME|jan}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|feb}}</nowiki></code> returns {{MONTHNAME|feb}}
: {{tlc|MONTHNAME|feb}} {{Rarr}} {{MONTHNAME|feb}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|mar}}</nowiki></code> returns {{MONTHNAME|mar}}
: {{tlc|MONTHNAME|mar}} {{Rarr}} {{MONTHNAME|mar}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|apr}}</nowiki></code> returns {{MONTHNAME|apr}}
: {{tlc|MONTHNAME|apr}} {{Rarr}} {{MONTHNAME|apr}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|may}}</nowiki></code> returns {{MONTHNAME|may}}
: {{tlc|MONTHNAME|may}} {{Rarr}} {{MONTHNAME|may}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|jun}}</nowiki></code> returns {{MONTHNAME|jun}}
: {{tlc|MONTHNAME|jun}} {{Rarr}} {{MONTHNAME|jun}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|jul}}</nowiki></code> returns {{MONTHNAME|jul}}
: {{tlc|MONTHNAME|jul}} {{Rarr}} {{MONTHNAME|jul}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|aug}}</nowiki></code> returns {{MONTHNAME|aug}}
: {{tlc|MONTHNAME|aug}} {{Rarr}} {{MONTHNAME|aug}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|sep}}</nowiki></code> returns {{MONTHNAME|sep}}
: {{tlc|MONTHNAME|sep}} {{Rarr}} {{MONTHNAME|sep}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|oct}}</nowiki></code> returns {{MONTHNAME|oct}}
: {{tlc|MONTHNAME|oct}} {{Rarr}} {{MONTHNAME|oct}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|nov}}</nowiki></code> returns {{MONTHNAME|nov}}
: {{tlc|MONTHNAME|nov}} {{Rarr}} {{MONTHNAME|nov}}
: <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|dec}}</nowiki></code> returns {{MONTHNAME|dec}}
: {{tlc|MONTHNAME|dec}} {{Rarr}} {{MONTHNAME|dec}}
 
== TemplateData ==
<templatedata>
{
"description": "Returns the name of the month of the given number.",
"params": {
"1": {
"label": "Number",
"description": "The number to input for a month.",
"type": "number",
"required": true
}
}
}
</templatedata>
 
 
<includeonly>{{sandbox other||{{testcases other||


<includeonly>
<!-- Categories below this line, please -->
<!-- Categories below this line, please -->
[[Category:Templates]]
[[Category:Utility templates]]
</includeonly>
}}}}</includeonly>

Latest revision as of 03:06, 20 August 2023

Light bulb.png }}
It contains usage information, categories and other content that is not part of the original template page.


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}} → January
{{MONTHNAME|2}} → February
{{MONTHNAME|3}} → March
{{MONTHNAME|4}} → April
{{MONTHNAME|5}} → May
{{MONTHNAME|6}} → June
{{MONTHNAME|7}} → July
{{MONTHNAME|8}} → August
{{MONTHNAME|9}} → September
{{MONTHNAME|10}} → October
{{MONTHNAME|11}} → November
{{MONTHNAME|12}} → December

Examples for month numbers with extra leading zero

{{MONTHNAME|01}} → January
{{MONTHNAME|02}} → February
{{MONTHNAME|03}} → March
{{MONTHNAME|04}} → April
{{MONTHNAME|05}} → May
{{MONTHNAME|06}} → June
{{MONTHNAME|07}} → July
{{MONTHNAME|08}} → August
{{MONTHNAME|09}} → September

Examples for month number cyclic underflows and overflows, from computed values

{{MONTHNAME|-12}} → December
{{MONTHNAME|-11}} → January
{{MONTHNAME|-10}} → February
{{MONTHNAME|-9}} → March
{{MONTHNAME|-3}} → September
{{MONTHNAME|-2}} → October
{{MONTHNAME|-1}} → November
{{MONTHNAME|0}} → December
{{MONTHNAME|13}} → January
{{MONTHNAME|14}} → February
{{MONTHNAME|15}} → March
{{MONTHNAME|16}} → April
{{MONTHNAME|23}} → November
{{MONTHNAME|24}} → December
{{MONTHNAME|25}} → January
{{MONTHNAME|1200}} → December
{{MONTHNAME|1201}} → January
{{MONTHNAME|1212}} → December

Examples for all standard English month names

{{MONTHNAME|JANUARY}} → January
{{MONTHNAME|FEBRUARY}} → February
{{MONTHNAME|MARCH}} → March
{{MONTHNAME|APRIL}} → April
{{MONTHNAME|MAY}} → May
{{MONTHNAME|JUNE}} → June
{{MONTHNAME|JULY}} → July
{{MONTHNAME|AUGUST}} → August
{{MONTHNAME|SEPTEMBER}} → September
{{MONTHNAME|OCTOBER}} → October
{{MONTHNAME|NOVEMBER}} → November
{{MONTHNAME|DECEMBER}} → December

Examples for all abbreviated English month names

{{MONTHNAME|jan}} → January
{{MONTHNAME|feb}} → February
{{MONTHNAME|mar}} → March
{{MONTHNAME|apr}} → April
{{MONTHNAME|may}} → May
{{MONTHNAME|jun}} → June
{{MONTHNAME|jul}} → July
{{MONTHNAME|aug}} → August
{{MONTHNAME|sep}} → September
{{MONTHNAME|oct}} → October
{{MONTHNAME|nov}} → November
{{MONTHNAME|dec}} → December

TemplateData

Returns the name of the month of the given number.

Template parameters

ParameterDescriptionTypeStatus
Number1

The number to input for a month.

Numberrequired