From 6245118d273eb7672849fa31e3eb4f3992a6237b Mon Sep 17 00:00:00 2001 From: John Hamelink Date: Fri, 15 Apr 2022 02:49:55 +0100 Subject: [PATCH 3/5] lisp/gnus/gnus-icalendar: Add gnus-icalendar-event--decode-duration --- lisp/gnus/gnus-icalendar.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 8eb3172e01..221d98c63a 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -159,6 +159,11 @@ gnus-icalendar-event:recurring-days (cl-defmethod gnus-icalendar-event:start ((event gnus-icalendar-event)) (format-time-string "%Y-%m-%d %H:%M" (gnus-icalendar-event:start-time event))) +(defun gnus-icalendar-event--decode-duration (event field) + (let ((duration (icalendar--get-event-property event field))) + (unless (null duration) + (icalendar--decode-isoduration duration)))) + (defun gnus-icalendar-event--decode-datefield (event field zone-map) (let* ((dtdate (icalendar--get-event-property event field)) (dtdate-zone (icalendar--find-time-zone -- 2.35.2