From: Richard M. Stallman Date: Mon, 27 Jan 1997 05:23:31 +0000 (+0000) Subject: (timezone-parse-date): Treat unknown month name X-Git-Tag: emacs-20.1~3002 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dd713b759cbb6a28e3b4b9bdc0d3a92222ed8370;p=emacs.git (timezone-parse-date): Treat unknown month name like any other unrecognized format. --- diff --git a/lisp/timezone.el b/lisp/timezone.el index c26adf78702..175cb182519 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el @@ -200,11 +200,14 @@ Understands the following styles: (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 @@ Understands the following styles: (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)) ))