Template:Daycap
Appearance
8
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}}→ 8{{daycap|2=5}} (from current month)→ 5 (from current month){{daycap|2=31}} (from potentially invalid day)→ 30 (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)→ 8 (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