Template:MONTHNAME/doc: Difference between revisions

From HIBIKIFORUM
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 6: Line 6:


=== Syntax ===
=== Syntax ===
: {{tlc|MONTHNAME|''month''}}
: {{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).


Line 84: Line 84:
: {{tlc|MONTHNAME|nov}} {{Rarr}} {{MONTHNAME|nov}}
: {{tlc|MONTHNAME|nov}} {{Rarr}} {{MONTHNAME|nov}}
: {{tlc|MONTHNAME|dec}} {{Rarr}} {{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>{{sandbox other||{{testcases other||

Revision as of 05:24, 18 June 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