Function: date-days-in-month
date-days-in-month is a byte-compiled function defined in
time-date.el.gz.
Signature
(date-days-in-month YEAR MONTH)
Documentation
The number of days in MONTH in YEAR.
Probably introduced at or before Emacs version 27.1.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/time-date.el.gz
(defun date-days-in-month (year month)
"The number of days in MONTH in YEAR."
(unless (and (numberp month) (<= 1 month 12))
(error "Month %s is invalid" month))
(if (= month 2)
(if (date-leap-year-p year)
29
28)
(if (memq month '(1 3 5 7 8 10 12))
31
30)))