Skip to content

Couldn't parse iCalendar / Text cannot be parsed to a Duration #1220

Answered by rfc2822
shoneg asked this question in General
Discussion options

You must be logged in to vote

TRIGGER:-P1WT2H

According to RFC 5545, DURATION can be

       dur-value  = (["+"] / "-") "P" (dur-date / dur-time / dur-week)

       dur-date   = dur-day [dur-time]
       dur-time   = "T" (dur-hour / dur-minute / dur-second)
       dur-week   = 1*DIGIT "W"
       dur-hour   = 1*DIGIT "H" [dur-minute]
       dur-minute = 1*DIGIT "M" [dur-second]
       dur-second = 1*DIGIT "S"
       dur-day    = 1*DIGIT "D"

So it can either be -P1W or P-T2H, but weeks and hours cannot be combined.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@shoneg
Comment options

@rfc2822
Comment options

Answer selected by shoneg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants