diff options
author | Eli Zaretskii <eliz@gnu.org> | 2020-04-03 14:21:07 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-04-03 14:21:07 +0300 |
commit | d8dae04e5ae5cc4897c8d1af8548a0c1576137b6 (patch) | |
tree | 7fe76277745fd42fc16e63fbb78022351356f791 /lisp/calendar | |
parent | f134dfa041b30a8c28484a13c2fa08f2fee27ff5 (diff) | |
download | emacs-d8dae04e5ae5cc4897c8d1af8548a0c1576137b6.tar.gz emacs-d8dae04e5ae5cc4897c8d1af8548a0c1576137b6.tar.bz2 emacs-d8dae04e5ae5cc4897c8d1af8548a0c1576137b6.zip |
Improve last change
* lisp/calendar/time-date.el (date-days-in-month): Improve the
error message text and make sure MONTH is a number. (Bug#40217)
Diffstat (limited to 'lisp/calendar')
-rw-r--r-- | lisp/calendar/time-date.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 9b58a4884bc..eeb09926a6e 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -355,8 +355,8 @@ is output until the first non-zero unit is encountered." (defun date-days-in-month (year month) "The number of days in MONTH in YEAR." - (unless (<= 1 month 12) - (error "Month %s invalid" month)) + (unless (and (numberp month) (<= 1 month 12)) + (error "Month %s is invalid" month)) (if (= month 2) (if (date-leap-year-p year) 29 |