模板:Date.DaysInMonth
更多语言
更多操作
{{#switch:06
|1=31
|2={{#expr:28 + {{#expr:
2026 mod 4 = 0 and
2026 mod 100 != 0 or
2026 mod 400 = 0
}} }}
|3=31 |4=30 |5=31 |6=30 |7=31 |8=31 |9=30 |10=31 |11=30 |12=31 |#default=30
{{
{{#switch:
{{#if:
|
| {{#ifeq:template|
| main
| {{#ifeq:template|template talk
| talk
| template
}}
}}
}}
| main = ambox | talk = tmbox | user = ombox | wikipedia = ombox | image = ombox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | other | #default = ombox
}}
| type = notice
| image =
| imageright =
| class =
| style =
| textstyle =
| text = 这个模板在源代码中包含了一些非常复杂的可选参数和构造。
这个模板的结构精密,除非您确认非常了解它的用途和构造细节,并且能够修复这个修改所有可能引起的变更,否则请不要随意更动这个模板。所有实验性的步骤请在沙盒模板内,或是您的用户页内进行。使用前请参阅讨论页。
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
| name =
}}
- 功能:返回输入月份的天数
- 用法:
{{Date.DaysInMonth|年|月}}
参数可由后依次省略,默认为当前年月。