DaysInMonth - Maple Help

Calendar

 DaysInMonth
 compute the number of days in a given month

 Calling Sequence DaysInMonth( year, month )

Parameters

 year - integer; the year in which the month occurs month - integer; the numeric value (1..12) of the month

Description

 • The DaysInMonth( year, month ) command computes the number of days in the month month of the year year. It is necessary to specify the year in order to take account of leap years.

Examples

 > $\mathrm{with}\left(\mathrm{Calendar}\right):$
 > $\mathrm{DaysInMonth}\left(2000,2\right)$
 ${29}$ (1)
 > $\mathrm{DaysInMonth}\left(2001,2\right)$
 ${28}$ (2)
 > $\mathrm{DaysInMonth}\left(1900,2\right)$
 ${28}$ (3)
 > $\mathrm{DaysInMonth}\left(1995,10\right)$
 ${31}$ (4)
 > $\mathrm{DaysInMonth}\left(1582,10\right)$
 ${21}$ (5)

Compatibility

 • The Calendar[DaysInMonth] command was introduced in Maple 2018.