什么时候单个 iCalendar 事件会有多个重复规则?

When will a single iCalendar event have multiple recurrence rules?

我使用 ical.NET 库在 C# 中处理 iCalendar 事件。

我注意到一个日历事件可以有多个重复规则。这是什么时候的事?

CalendarEvent class 扩展了 RecurringComponent class,它有这个 属性:

public virtual IList<RecurrencePattern> RecurrenceRules { get; set; }

为什么这是一个列表?我认为这将是一个 RecurrencePattern 元素,而不是列表。

很可能是出于向后兼容的原因:

RFC2445 支持多个 RRULE 和 EXRULE:https://www.rfc-editor.org/rfc/rfc2445#section-4.6.1

; the following are optional, ; and MAY occur more than once

            attach / attendee / categories / comment /
            contact / exdate / exrule / rstatus / related /
            resources / rdate / rrule / x-prop

替代 RFC2445 的 RFC5545 删除了该功能,因为大多数客户端未实现或实现不佳。 https://www.rfc-editor.org/rfc/rfc5545#section-3.6.1

; ; The following is OPTIONAL, ; but SHOULD NOT occur more than once. ; rrule /

请注意 RFC2445 也有 EXRULE 的概念,而 RFC5545 删除了它。 https://www.rfc-editor.org/rfc/rfc5545#appendix-A

处的完整更改列表