From: Richard M. Stallman Date: Wed, 23 Jul 1997 19:07:34 +0000 (+0000) Subject: (diary-entry-time): Downcase the am/pm letter. X-Git-Tag: emacs-20.1~1024 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf95757e71cd5fe376c89f1dc7b1383754d5a77c;p=emacs.git (diary-entry-time): Downcase the am/pm letter. --- diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index df469978c89..b658566eeca 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -892,8 +892,7 @@ and XX:XXam or XX:XXpm." (+ (* 100 (% (string-to-int (substring s (match-beginning 1) (match-end 1))) 12)) - (if (string-equal "a" - (substring s (match-beginning 2) (match-end 2))) + (if (equal ?a (downcase (aref s (match-beginning 2)))) 0 1200))) ((string-match;; Hour and minute XX:XXam or XX:XXpm "^[ \t]*\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) @@ -901,8 +900,7 @@ and XX:XXam or XX:XXpm." (substring s (match-beginning 1) (match-end 1))) 12)) (string-to-int (substring s (match-beginning 2) (match-end 2))) - (if (string-equal "a" - (substring s (match-beginning 3) (match-end 3))) + (if (equal ?a (downcase (aref s (match-beginning 3)))) 0 1200))) (t -9999)));; Unrecognizable