模板: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|年|月}}
參數可由後依次省略,默認為當前年月。