mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
(appt-convert-time): Handle "12:MMam",
remove extraneous string-match.
This commit is contained in:
parent
8f713f537c
commit
85bbde633a
1 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue