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.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el
index 83b57a4f56a..f44ed3858f6 100644
--- a/lisp/calendar/iso8601.el
+++ b/lisp/calendar/iso8601.el
@@ -66,7 +66,7 @@
"\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?:?\\([0-9][0-9]\\)?\\.?\\([0-9][0-9][0-9]\\)?")
(defconst iso8601--zone-match
- "\\(Z\\|\\([-+]\\)?\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?\\)")
+ "\\(Z\\|\\([-+]\\)\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?\\)")
(defconst iso8601--full-time-match
(concat "\\(" (replace-regexp-in-string "(" "(?:" iso8601--time-match) "\\)"
@@ -76,8 +76,8 @@
(concat "\\(" iso8601--date-match "\\)"
"\\(?:T\\("
(replace-regexp-in-string "(" "(?:" iso8601--time-match)
- "\\)\\)?"
- "\\(" iso8601--zone-match "\\)?"))
+ "\\)"
+ "\\(" iso8601--zone-match "\\)?\\)?"))
(defconst iso8601--duration-full-match
"P\\([0-9]+Y\\)?\\([0-9]+M\\)?\\([0-9]+D\\)?\\(T\\([0-9]+H\\)?\\([0-9]+M\\)?\\([0-9]+S\\)?\\)?")
@@ -303,7 +303,7 @@ Return the number of minutes."
(or duration
(decode-time (time-subtract (iso8601--encode-time end)
(iso8601--encode-time start))
- (decoded-time-zone end))))))
+ (or (decoded-time-zone end) 0))))))
(defun iso8601--match (regexp string)
(string-match (concat "\\`" regexp "\\'") string))