summaryrefslogtreecommitdiff
path: root/lisp/calendar/iso8601.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calendar/iso8601.el')
-rw-r--r--lisp/calendar/iso8601.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el
index 512ab4b093d..4c66df1b555 100644
--- a/lisp/calendar/iso8601.el
+++ b/lisp/calendar/iso8601.el
@@ -174,15 +174,15 @@ well as variants like \"2008W32\" (week number) and
Return the number of minutes."
(if (not (iso8601--match iso8601--zone-match string))
(signal 'wrong-type-argument string)
- (if (match-string 1 string)
+ (if (match-string 2 string)
;; HH:MM-ish.
(let ((hour (string-to-number (match-string 3 string)))
(minute (and (match-string 4 string)
- (string-to-number (match-string 5 string)))))
- (+ (* (if (equal (match-string 1 string) "-")
- (- hour)
- hour)
- 60
+ (string-to-number (match-string 4 string)))))
+ (* (if (equal (match-string 2 string) "-")
+ -1
+ 1)
+ (+ (* hour 60)
(or minute 0))))
;; "Z".
0)))