From: Gerd Moellmann Date: Thu, 2 Dec 1999 07:55:46 +0000 (+0000) Subject: (appt-convert-time): Handle "12:MMam", X-Git-Tag: emacs-pretest-21.0.90~5910 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=85bbde633a61ce103aa132c04abe357e81db3281;p=emacs.git (appt-convert-time): Handle "12:MMam", remove extraneous string-match. --- diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index c667aca3dad..ae3c74834f8 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -477,6 +477,7 @@ The time should be in either 24 hour format or am/pm format." (setq tmp-msg-list (cdr tmp-msg-list)) (if test-input (setq appt-time-msg-list (delq element appt-time-msg-list))))) + (appt-check) (message ""))) @@ -614,10 +615,10 @@ The time should be in either 24 hour format or am/pm format." ;; convert the time appointment time into 24 hour time - (if (and (string-match "[p][m]" time2conv) (< hr 12)) - (progn - (string-match "[0-9]?[0-9]:" time2conv) - (setq hr (+ 12 hr)))) + (cond ((and (string-match "pm" time2conv) (< hr 12)) + (setq hr (+ 12 hr))) + ((and (string-match "am" time2conv) (= hr 12)) + (setq hr 0))) ;; convert the actual time ;; into minutes for comparison