daysInMonth
Returns the number of days in the given month of the given year.
Month is 1-based (1 = January, 12 = December) to match human
convention and ISO 8601 (unlike Date.getMonth() which is 0-based).
Returns NaN if the month is out of range.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
year | number | A full year number (e.g. 2025) |
month | number | 1-based month number (1–12) |
Returns
Section titled “Returns”number — Number of days in that month, or NaN for invalid month
