这是RFC 5545规范的一部分,该规范基于ISO 8601:
Format Definition: This value type is defined by the following
notation:
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"
我不太明白
dur-value
的格式。我认为 /
代表 or
对吧?这意味着您不应该能够混合 dur-date
、dur-time
和 dur-week
?
如果是这种情况,那么
dur-date = dur-day [dur-time]
的链接实际上允许在相同的持续时间值中使用 dur-date
和 dur-time
,但禁止 dur-week
与其他任何内容混合。
那么这个
P1W1D
持续时间值将无效?
是的。否则它应该是:
dur-week = 1*DIGIT "W" [dur-date]
或者也许:
dur-week = 1*DIGIT "W" ([dur-date] / [dur-time])