Function: icalendar-match-duration-value
icalendar-match-duration-value is a byte-compiled function defined in
icalendar-parser.el.gz.
Signature
(icalendar-match-duration-value S)
Documentation
Match string S against rx icalendar-dur-value.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/icalendar-parser.el.gz
(ical:define-type ical:dur-value "DURATION"
"Type for Duration values.
When printed, a duration is a string containing:
- possibly a +/- sign
- the letter 'P'
- one or more sequences of digits followed by a letter representing a unit
of time: 'W' for weeks, 'D' for days, etc. Units smaller than a day are
separated from days by the letter 'T'. If a duration is specified in weeks,
other units of time are not allowed.
For example, a duration of 15 days, 5 hours, and 20 seconds would be printed:
P15DT5H0M20S
and a duration of 7 weeks would be printed:
P7W
When read, a duration is either an integer, in which case it
represents a number of weeks, or a decoded time, in which case it
must represent a time delta in the sense of `decoded-time-add'.
Note that, in the time delta representation, units of time longer
than a day are not supported and will be ignored if present.
This type is named `icalendar-dur-value' rather than
`icalendar-duration' for consistency with the text of RFC5545 and
so that its name does not collide with the symbol for the
`DURATION' property."
'(or integer (satisfies ical:-time-delta-p))
;; Group 15: weeks
;; Group 16: days
;; Group 17: hours
;; Group 18: minutes
;; Group 19: seconds
;; Group 20: sign
(seq
(group-n 20 (zero-or-one (or ?+ ?-)))
?P
(or ical:dur-date ical:dur-time ical:dur-week))
:reader ical:read-dur-value
:printer ical:print-dur-value
:link "https://www.rfc-editor.org/rfc/rfc5545#section-3.3.6")