模板:MONTHNAME/doc

来自决策链云智库
< 模板:MONTHNAME
Zeroclanzhang讨论 | 贡献2024年1月18日 (四) 14:23的版本 (创建页面,内容为“{{Documentation subpage}} {{High-risk|560,000+}} <!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS 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 === : <code><nowiki>{{</nowiki>MONTHNAME<nowiki>|</nowiki></code>''month''<code>}}</code> * The ''month'' value is interpreted modulo 12 (extra leading zeroes and d…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

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}} returns
{{MONTHNAME|2}} returns
{{MONTHNAME|3}} returns
{{MONTHNAME|4}} returns
{{MONTHNAME|5}} returns
{{MONTHNAME|6}} returns
{{MONTHNAME|7}} returns
{{MONTHNAME|8}} returns
{{MONTHNAME|9}} returns
{{MONTHNAME|10}} returns
{{MONTHNAME|11}} returns
{{MONTHNAME|12}} returns

Examples for month numbers with extra leading zero

{{MONTHNAME|01}} returns
{{MONTHNAME|02}} returns
{{MONTHNAME|03}} returns
{{MONTHNAME|04}} returns
{{MONTHNAME|05}} returns
{{MONTHNAME|06}} returns
{{MONTHNAME|07}} returns
{{MONTHNAME|08}} returns
{{MONTHNAME|09}} returns

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

{{MONTHNAME|-12}} returns
{{MONTHNAME|-11}} returns
{{MONTHNAME|-10}} returns
{{MONTHNAME|-9}} returns
{{MONTHNAME|-3}} returns
{{MONTHNAME|-2}} returns
{{MONTHNAME|-1}} returns
{{MONTHNAME|0}} returns
{{MONTHNAME|13}} returns
{{MONTHNAME|14}} returns
{{MONTHNAME|15}} returns
{{MONTHNAME|16}} returns
{{MONTHNAME|23}} returns
{{MONTHNAME|24}} returns
{{MONTHNAME|25}} returns
{{MONTHNAME|1200}} returns
{{MONTHNAME|1201}} returns
{{MONTHNAME|1212}} returns

Examples for all standard English month names

{{MONTHNAME|JANUARY}} returns
{{MONTHNAME|FEBRUARY}} returns
{{MONTHNAME|MARCH}} returns
{{MONTHNAME|APRIL}} returns
{{MONTHNAME|MAY}} returns
{{MONTHNAME|JUNE}} returns
{{MONTHNAME|JULY}} returns
{{MONTHNAME|AUGUST}} returns
{{MONTHNAME|SEPTEMBER}} returns
{{MONTHNAME|OCTOBER}} returns
{{MONTHNAME|NOVEMBER}} returns
{{MONTHNAME|DECEMBER}} returns

Examples for all abbreviated English month names

{{MONTHNAME|jan}} returns
{{MONTHNAME|feb}} returns
{{MONTHNAME|mar}} returns
{{MONTHNAME|apr}} returns
{{MONTHNAME|may}} returns
{{MONTHNAME|jun}} returns
{{MONTHNAME|jul}} returns
{{MONTHNAME|aug}} returns
{{MONTHNAME|sep}} returns
{{MONTHNAME|oct}} returns
{{MONTHNAME|nov}} returns
{{MONTHNAME|dec}} returns

See also

Multiple units of time

Type Adjustable Current Last Next
Date and time {{time}} {{Currentdate}} (MDY)
{{Plain now}} (DMY)
{{Now}} (DMY in a complete sentence)
{{Simple now}}
Date only {{Dateonly}}
{{Datedow}}
(Has the day of the week)
{{Date}} (Chose format)
{{DATE}} (prefixed by date=)
{{TODAY}} (DMY)
{{Yesterday}}
{{Day-1}}
{{Tomorrow}}
{{Day+1}}
Time only {{Timeonly}} {{CURRENTTIME}} (12 h format)
{{CURRENTTIME24}} (24 h format)
Banners {{Right now}}
(Blue with time and number of Wikipedia articles)
Timestamp {{Timestamp}}
(Format YYYYMMDDhhmmss)

Single units of time

Unit of time Adjustable Current Last Next
SECOND {{CURRENTSECOND}}
MINUTE {{CURRENTMINUTE}}
HOUR 模板:Mwl
WEEK 模板:Mwl
{{CURRENTWEEKOFMONTH}}
Day of Week {{DAYOFWEEK}} 模板:Mwl
{{CURRENTWEEKDAYABBREV}}
{{CURRENTWEEKDAY}}
MONTH {{MONTHNAME}}
{{MONTHABBREV}}
{{MONTHNUMBER}}
{{MONTH}} (zero padded)
模板:Mwl
模板:Mwl
模板:Mwl
{{CURRENTMONTHDAYS}}
{{LASTMONTHNAME}} {{NEXTMONTHNAME}}
Day of Month 模板:Mwl
模板:Mwl (zero padded)
YEAR {{CURRENTYEARCC}}
{{CURRENTYEARYY}}
{{CURRENTISOYEAR}}
模板:Mwl
{{LASTYEAR}} {{NEXTYEAR}}
Day of Year {{CURRENTDAYOFYEAR}}
DECADE {{DECADE}} {{CURRENTDECADE}}
CENTURY {{CENTURY}} {{CURRENTCENTURY}}
MILLENNIUM {{MILLENNIUM}}

Date and time templates made for substitution:

Month:
{{Lmonth}} produces 模板:Lmonth
{{Nmonth}} produces 模板:Nmonth
{{LastMonth}} produces 模板:LastMonth
{{NextMonth}} produces 模板:NextMonth


Individual templates

Categories of templates