aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calendar
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>1999-12-02 07:55:46 +0000
committerGerd Moellmann <[email protected]>1999-12-02 07:55:46 +0000
commit85bbde633a61ce103aa132c04abe357e81db3281 (patch)
tree74c1d695931c6f19d1dbb5fb2b3e73b6db74d2da /lisp/calendar
parent8f713f537c81ddbed43512f0b15812b20747a9a1 (diff)
(appt-convert-time): Handle "12:MMam",
remove extraneous string-match.
Diffstat (limited to 'lisp/calendar')
-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 c667aca3da..ae3c74834f 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