From 85bbde633a61ce103aa132c04abe357e81db3281 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 2 Dec 1999 07:55:46 +0000 Subject: [PATCH] (appt-convert-time): Handle "12:MMam", remove extraneous string-match. --- lisp/calendar/appt.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.39.5