aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-12-02 07:55:46 +0000
committerGerd Moellmann1999-12-02 07:55:46 +0000
commit85bbde633a61ce103aa132c04abe357e81db3281 (patch)
tree74c1d695931c6f19d1dbb5fb2b3e73b6db74d2da
parent8f713f537c81ddbed43512f0b15812b20747a9a1 (diff)
downloademacs-85bbde633a61ce103aa132c04abe357e81db3281.tar.gz
emacs-85bbde633a61ce103aa132c04abe357e81db3281.zip
(appt-convert-time): Handle "12:MMam",
remove extraneous string-match.
-rw-r--r--lisp/calendar/appt.el9
1 files 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."
477 (setq tmp-msg-list (cdr tmp-msg-list)) 477 (setq tmp-msg-list (cdr tmp-msg-list))
478 (if test-input 478 (if test-input
479 (setq appt-time-msg-list (delq element appt-time-msg-list))))) 479 (setq appt-time-msg-list (delq element appt-time-msg-list)))))
480 (appt-check)
480 (message ""))) 481 (message "")))
481 482
482 483
@@ -614,10 +615,10 @@ The time should be in either 24 hour format or am/pm format."
614 615
615 ;; convert the time appointment time into 24 hour time 616 ;; convert the time appointment time into 24 hour time
616 617
617 (if (and (string-match "[p][m]" time2conv) (< hr 12)) 618 (cond ((and (string-match "pm" time2conv) (< hr 12))
618 (progn 619 (setq hr (+ 12 hr)))
619 (string-match "[0-9]?[0-9]:" time2conv) 620 ((and (string-match "am" time2conv) (= hr 12))
620 (setq hr (+ 12 hr)))) 621 (setq hr 0)))
621 622
622 ;; convert the actual time 623 ;; convert the actual time
623 ;; into minutes for comparison 624 ;; into minutes for comparison