summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/icalendar.el9
-rw-r--r--lisp/calendar/iso8601.el3
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index c2688705e30..3c46982c7b0 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -628,6 +628,7 @@ FIXME: multiple comma-separated values should be allowed!"
(when (> (length isodatetimestring) 14)
;; seconds present
(setq second (read (substring isodatetimestring 13 15))))
+ ;; FIXME: Support subseconds.
(when (and (> (length isodatetimestring) 15)
;; UTC specifier present
(char-equal ?Z (aref isodatetimestring 15)))
@@ -703,6 +704,7 @@ FIXME: multiple comma-separated values should be allowed!"
(setq minutes (read (substring isodurationstring
(match-beginning 10)
(match-end 10)))))
+ ;; FIXME: Support subseconds.
(if (match-beginning 11)
(setq seconds (read (substring isodurationstring
(match-beginning 12)
@@ -719,9 +721,12 @@ FIXME: multiple comma-separated values should be allowed!"
"Add TIME1 to TIME2.
Both times must be given in decoded form. One of these times must be
valid (year > 1900 or something)."
- ;; FIXME: does this function exist already?
+ ;; FIXME: does this function exist already? Can we use decoded-time-add?
(decode-time (encode-time
- (+ (decoded-time-second time1) (decoded-time-second time2))
+ ;; FIXME: Support subseconds.
+ (time-convert (time-add (decoded-time-second time1)
+ (decoded-time-second time2))
+ 'integer)
(+ (decoded-time-minute time1) (decoded-time-minute time2))
(+ (decoded-time-hour time1) (decoded-time-hour time2))
(+ (decoded-time-day time1) (decoded-time-day time2))
diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el
index 30352c7e75f..0f42c824e32 100644
--- a/lisp/calendar/iso8601.el
+++ b/lisp/calendar/iso8601.el
@@ -322,9 +322,10 @@ Return the number of minutes."
duration))))
(list start end
(or duration
+ ;; FIXME: Support subseconds.
(decode-time (time-subtract (iso8601--encode-time end)
(iso8601--encode-time start))
- (or (decoded-time-zone end) 0))))))
+ (or (decoded-time-zone end) 0) 'integer)))))
(defun iso8601--match (regexp string)
(string-match (concat "\\`" regexp "\\'") string))