Template:Daycap/doc
Appearance
| This is a documentation subpage for Template:Daycap. It may contain usage information, categories and other content that is not part of the original template page. |
Returns the day of the month after one month, capped by the number of days in the next month. The result is not zero-padded by default.
Usage
{{daycap|monthname|day|year}}. The default values are from the current date.
Examples
{{daycap}}→ 29{{daycap|2=5}} (from current month)→ 5 (from current month){{daycap|2=31}} (from potentially invalid day)→ 31 (from potentially invalid day){{daycap|January|29|2025}}→ 28{{daycap|January|30}}→ 28{{daycap|January|30|2024}}→ 29{{daycap|January|30|2025}}→ 28{{daycap|January|31}}→ 28{{daycap|January|31|2024}}→ 29{{daycap|January|31|2025}}→ 28{{daycap|February}} (from potentially invalid day)→ 29 (from potentially invalid day){{daycap|February|30}} (from invalid date)→ 30 (from invalid date){{daycap|April|20}}→ 20{{daycap|June|1}}→ 1{{daycap|October|31}}→ 30{{daycap|December|31|2026}}→ 31