Mercurial > emacs
changeset 16942:eca5dfcd481d
(timezone-parse-date): Treat unknown month name
like any other unrecognized format.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 27 Jan 1997 05:23:31 +0000 |
parents | 5a800a9d903b |
children | e7814b054e91 |
files | lisp/timezone.el |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/timezone.el Mon Jan 27 02:40:13 1997 +0000 +++ b/lisp/timezone.el Mon Jan 27 05:23:31 1997 +0000 @@ -200,11 +200,14 @@ (substring date (match-beginning month) (+ (match-beginning month) 2)) - (let ((string (substring date - (match-beginning month) - (+ (match-beginning month) 3)))) - (int-to-string - (cdr (assoc (upcase string) timezone-months-assoc)))))) + (let* ((string (substring date + (match-beginning month) + (+ (match-beginning month) 3))) + (monthnum + (cdr (assoc (upcase string) timezone-months-assoc)))) + (if monthnum + (int-to-string monthnum) + nil)))) (setq day (substring date (match-beginning day) (match-end day))) (setq time @@ -213,7 +216,7 @@ (setq zone (substring date (match-beginning zone) (match-end zone)))) ;; Return a vector. - (if year + (if (and year month) (vector year month day time zone) (vector "0" "0" "0" "0" nil)) ))