Internet Engineering Task Force (IETF) C. Daboo Request for Comments: 7529 Apple Inc. Updates: 5545, 6321, 7265 G. Yakushev Category: Standards Track Google Inc. ISSN: 2070-1721 May 2015
Internet Engineering Task Force (IETF) C. Daboo Request for Comments: 7529 Apple Inc. Updates: 5545, 6321, 7265 G. Yakushev Category: Standards Track Google Inc. ISSN: 2070-1721 May 2015
Non-Gregorian Recurrence Rules in the Internet Calendaring and Scheduling Core Object Specification (iCalendar)
Internet日历和调度核心对象规范(iCalendar)中的非公历重复规则
Abstract
摘要
This document defines extensions to the Internet Calendaring and Scheduling Core Object Specification (iCalendar) (RFC 5545) to support use of non-Gregorian recurrence rules. It also defines how Calendaring Extensions to WebDAV (CalDAV) (RFC 4791) servers and clients can be extended to support these new recurrence rules.
本文档定义了对Internet日历和调度核心对象规范(iCalendar)(RFC 5545)的扩展,以支持使用非公历重复规则。它还定义了如何扩展WebDAV(CalDAV)(RFC 4791)服务器和客户端的日历扩展,以支持这些新的重复规则。
Status of This Memo
关于下段备忘
This is an Internet Standards Track document.
这是一份互联网标准跟踪文件。
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7529.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7529.
Copyright Notice
版权公告
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2015 IETF信托基金和确定为文件作者的人员。版权所有。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
Table of Contents
目录
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Conventions Used in This Document . . . . . . . . . . . . . . 3 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Extended RRULE Property . . . . . . . . . . . . . . . . . . . 6 4.1. Skipping Invalid Dates . . . . . . . . . . . . . . . . . 6 4.2. Handling Leap Months . . . . . . . . . . . . . . . . . . 9 4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10 5. Registering Calendar Systems . . . . . . . . . . . . . . . . 13 6. Compatibility . . . . . . . . . . . . . . . . . . . . . . . . 13 7. Use with iTIP . . . . . . . . . . . . . . . . . . . . . . . . 14 8. Use with xCal . . . . . . . . . . . . . . . . . . . . . . . . 15 9. Use with jCal . . . . . . . . . . . . . . . . . . . . . . . . 15 10. Use with CalDAV . . . . . . . . . . . . . . . . . . . . . . . 16 10.1. CALDAV:supported-rscale-set Property . . . . . . . . . . 17 11. Security Considerations . . . . . . . . . . . . . . . . . . . 18 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 12.1. Normative References . . . . . . . . . . . . . . . . . . 18 12.2. Informative References . . . . . . . . . . . . . . . . . 19 Appendix A. xCal RELAX NG Schema Update . . . . . . . . . . . . 20 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Conventions Used in This Document . . . . . . . . . . . . . . 3 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Extended RRULE Property . . . . . . . . . . . . . . . . . . . 6 4.1. Skipping Invalid Dates . . . . . . . . . . . . . . . . . 6 4.2. Handling Leap Months . . . . . . . . . . . . . . . . . . 9 4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10 5. Registering Calendar Systems . . . . . . . . . . . . . . . . 13 6. Compatibility . . . . . . . . . . . . . . . . . . . . . . . . 13 7. Use with iTIP . . . . . . . . . . . . . . . . . . . . . . . . 14 8. Use with xCal . . . . . . . . . . . . . . . . . . . . . . . . 15 9. Use with jCal . . . . . . . . . . . . . . . . . . . . . . . . 15 10. Use with CalDAV . . . . . . . . . . . . . . . . . . . . . . . 16 10.1. CALDAV:supported-rscale-set Property . . . . . . . . . . 17 11. Security Considerations . . . . . . . . . . . . . . . . . . . 18 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 12.1. Normative References . . . . . . . . . . . . . . . . . . 18 12.2. Informative References . . . . . . . . . . . . . . . . . 19 Appendix A. xCal RELAX NG Schema Update . . . . . . . . . . . . 20 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21
The iCalendar [RFC5545] data format is in widespread use to represent calendar data. iCalendar represents dates and times using the Gregorian calendar system only. It does provide a way to use non-Gregorian calendar systems via a "CALSCALE" property, but this has never been used. However, there is a need to support at least non-Gregorian recurrence patterns to cover anniversaries, and many local, religious, or civil holidays based on non-Gregorian dates.
iCalendar[RFC5545]数据格式广泛用于表示日历数据。iCalendar仅使用公历系统表示日期和时间。它确实提供了一种通过“CALSCALE”属性使用非公历系统的方法,但从未使用过。然而,至少需要支持非公历重现模式,以涵盖周年纪念日,以及许多基于非公历日期的当地、宗教或公民假日。
There are several disadvantages to using the existing "CALSCALE" property in iCalendar for implementing non-Gregorian calendars:
使用iCalendar中现有的“CALSCALE”属性来实现非公历日历有几个缺点:
1. The "CALSCALE" property exists in the top-level "VCALENDAR" objects and thus applies to all components within that object. In today's multi-cultural society, that restricts the ability to mix events from different calendar systems within the same iCalendar object, e.g., it would prevent having both the Gregorian New Year and Chinese New Year in the same iCalendar object.
1. “CALSCALE”属性存在于顶级“VCALENDAR”对象中,因此适用于该对象中的所有组件。在当今的多元文化社会中,这限制了在同一iCalendar对象中混合来自不同日历系统的事件的能力,例如,这将阻止公历新年和中国新年在同一iCalendar对象中。
2. Time zone and daylight saving time rules are typically published using Gregorian calendar dates and rules (e.g., "the 3rd Sunday in March") and are thus converted to iCalendar "VTIMEZONE"
2. 时区和夏令时规则通常使用公历日期和规则(例如,“3月的第三个星期日”)发布,并因此转换为iCalendar“VTIMEZONE”
components using Gregorian dates and recurrence rules. This results in the problem whereby one component (the "VTIMEZONE") is fixed to the Gregorian calendar system, and another (a "VEVENT") wants to use a different non-Gregorian calendar scale; thus, the single top-level "CALSCALE" property is again inadequate.
使用公历日期和重复规则的组件。这导致了一个问题,即一个组件(“VTIMEZONE”)固定在公历系统上,而另一个组件(“VEVENT”)希望使用不同的非公历刻度;因此,单一的顶级“CALSCALE”属性再次不足。
This specification solves these issues by allowing the "CALSCALE" to remain set to Gregorian but redefining the "RRULE" recurrence rule property to accept new items, including one that allows non-Gregorian calendar systems to be used. With this, all the "DATE", "DATE-TIME", and "PERIOD" values in the iCalendar object would remain specified using the Gregorian calendar system, but repeating patterns in other calendar systems could be defined. It is then up to calendar user agents and servers to map between Gregorian and non-Gregorian calendar systems in order to expand out recurrence instances. The non-Gregorian recurrence rules can be used in any iCalendar component that allows the "RRULE" property to be specified, including "VTIMEZONE" components (to allow for possible future use of non-Gregorian rules in published daylight saving time data).
本规范通过允许“CALSCALE”保持设置为公历,但重新定义“RRULE”重复规则属性以接受新项目(包括允许使用非公历系统的项目)来解决这些问题。这样,iCalendar对象中的所有“DATE”、“DATE-TIME”和“PERIOD”值都将使用公历系统进行指定,但可以定义其他日历系统中的重复模式。然后由日历用户代理和服务器在公历和非公历系统之间映射,以扩展重复实例。非公历重复规则可用于允许指定“RRULE”属性的任何iCalendar组件,包括“VTIMEZONE”组件(以允许将来在发布的夏令时数据中可能使用非公历规则)。
This specification does not itself define calendar systems; rather, it utilizes the calendar system registry defined by the Unicode Consortium in their Common Locale Data Repository (CLDR) project [UNICODE.CLDR], as implemented in the Unicode (International Components for Unicode (ICU)) Library [UNICODE.ICU].
本规范本身并未定义日历系统;相反,它利用了Unicode联盟在其公共语言环境数据存储库(CLDR)项目[Unicode.CLDR]中定义的日历系统注册表,该项目在Unicode(国际Unicode组件(ICU))库[Unicode.ICU]中实现。
This specification makes the following updates:
本规范进行了以下更新:
It updates iCalendar [RFC5545], the XML format for iCalendar (xCal) [RFC6321], and the JSON format for iCalendar (jCal) [RFC7265], to extend the "RRULE" property definition.
它更新了iCalendar[RFC5545]、iCalendar(xCal)[RFC6321]的XML格式以及iCalendar(jCal)[RFC7265]的JSON格式,以扩展“RRULE”属性定义。
It clarifies use of the iCalendar Transport-Independent Interoperability Protocol (iTIP) [RFC5546] to specify how the extended "RRULE" property should be handled in iTIP messages.
它阐明了使用iCalendar传输独立互操作性协议(iTIP)[RFC5546]来指定如何在iTIP消息中处理扩展的“RRULE”属性。
It extends CalDAV [RFC4791] to specify how the extended "RRULE" property can be supported by CalDAV servers and clients.
它扩展了CalDAV[RFC4791],以指定CalDAV服务器和客户端如何支持扩展的“RRULE”属性。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照[RFC2119]中的说明进行解释。
The notation used in this memo is the ABNF notation of [RFC5234] as used by iCalendar [RFC5545]. Any syntax elements shown below that are not explicitly defined in this specification come from iCalendar [RFC5545], iTIP [RFC5546], and CalDAV [RFC4791].
本备忘录中使用的符号是iCalendar[RFC5545]使用的[RFC5234]的ABNF符号。本规范中未明确定义的以下语法元素来自iCalendar[RFC5545]、iTIP[RFC5546]和CalDAV[RFC4791]。
When XML element types in the namespaces "DAV:" and "urn:ietf:params:xml:ns:caldav" are referenced in this document outside of the context of an XML fragment, the string "DAV:" and "CALDAV:" will be prefixed to the element type names, respectively.
当本文档在XML片段的上下文之外引用名称空间“DAV:”和“urn:ietf:params:XML:ns:caldav”中的XML元素类型时,字符串“DAV:”和“caldav:”将分别作为元素类型名称的前缀。
When a Gregorian calendar date is shown in text, it will use the format "YYYYMMDD", where "YYYY" is the 4-digit year, "MM" the 2-digit month, and "DD" the 2-digit day (this is the same format used in iCalendar [RFC5545]). The Chinese calendar will be used as an example of a non-Gregorian calendar for illustrative purposes. When a Chinese calendar date is shown in text, it will use the format "{C}YYYYMM[L]DD" -- i.e., the same format as Gregorian but with a "{C}" prefix, and an optional "L" character after the month element to indicate a leap month. Similarly, {E} and {H} are used in other examples as prefixes for Ethiopic (Amete Mihret) and Hebrew dates, respectively. The "{}" prefix is used for purely illustrative purposes and never appears in actual dates used in iCalendar or related specifications. Note that the Chinese calendar years shown in the examples are based on the Unicode (ICU) [UNICODE.ICU] library's Chinese calendar epoch. While there are several different Chinese calendar epochs in common use, the choice of one over another does not impact the actual calculation of the Gregorian equivalent dates, provided conversion is always done using the same epoch.
当公历日期显示为文本时,它将使用格式“YYYYMMDD”,其中“YYYY”是4位数的年份,“MM”是2位数的月份,“DD”是2位数的日期(这与iCalendar[RFC5545]中使用的格式相同)。出于说明目的,中国日历将用作非公历的示例。当以文本形式显示中国日历日期时,它将使用格式“{C}yyymm[L]DD”--即与公历相同的格式,但带有“{C}”前缀,并且在月份元素后有一个可选的“L”字符来表示闰月。类似地,{E}和{H}在其他示例中分别用作Ethiopic(Amete Mihret)和希伯来日期的前缀。“{}”前缀仅用于说明目的,从未出现在iCalendar或相关规范中使用的实际日期中。请注意,示例中显示的中国日历年基于Unicode(ICU)[Unicode.ICU]库的中国日历纪元。虽然有几个不同的中国历法纪元常用,但如果总是使用相同的纪元进行换算,则选择一个纪元而不是另一个纪元并不影响公历等效日期的实际计算。
In the Gregorian calendar system, each year is composed of a fixed number of months (12), with each month having a fixed number of days (between 30 and 31), except for the second month (February), which contains either 28 or 29 days (the latter in a leap year). Weeks are composed of 7 days, with day names Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday. Years can have either 365 or 366 days (the latter in a leap year). The number of whole weeks in a year is 52 (though the [ISO.8601.2004] week numbering scheme used by iCalendar [RFC5545] can have a numeric count up to 53).
在公历系统中,每年由固定的月数(12)组成,每个月有固定的天数(30到31天),第二个月(2月)除外,第二个月包含28天或29天(后者在闰年)。周由7天组成,日期名称为星期一、星期二、星期三、星期四、星期五、星期六和星期日。年份可以有365天或366天(后者是闰年)。一年中的整周数为52周(尽管iCalendar[RFC5545]使用的[ISO.8601.2004]周编号方案的数字计数可达53周)。
In iCalendar, the "RECUR" value type defines various fields used to express a recurrence pattern, and those fields are given limits based on those of the Gregorian calendar system. Since other calendar systems can have different limits and other behaviors that need to be accounted for, the maximum values for the elements in the "RECUR" value are not covered by this specification.
在iCalendar中,“RECUR”值类型定义了用于表示重复模式的各种字段,这些字段根据公历系统的字段给出了限制。由于其他日历系统可能有不同的限制和其他需要考虑的行为,“重现”值中元素的最大值不包括在本规范中。
To generate a set of recurring instances in a non-Gregorian calendar system, the following principles are used:
要在非公历系统中生成一组重复实例,请使用以下原则:
1. iCalendar data continues to use the "GREGORIAN" calendar system, so all "DATE", "DATE-TIME", and "PERIOD" values continue to use the Gregorian format and limits.
1. iCalendar数据继续使用“公历”日历系统,因此所有“日期”、“日期时间”和“期间”值继续使用公历格式和限制。
2. The "RRULE" property is extended to include an "RSCALE" element in its value that specifies the calendar system to use for the recurrence pattern. The existing elements of the "RRULE" value type are used, but modified to support different upper limits, based on the "RSCALE" value, as well as a modification to month numbers to allow a leap month to be specified. Existing requirements for the use of "RRULE" all still apply (e.g., the "RRULE" has to match the "DTSTART" value of the master instance). Other recurrence properties such as "RECURRENCE-ID", "RDATE", and "EXDATE" continue to use the Gregorian date format as "CALSCALE" is unchanged.
2. “RRULE”属性被扩展为在其值中包含一个“RSCALE”元素,该元素指定用于重复模式的日历系统。使用“RRULE”值类型的现有元素,但根据“RSCALE”值进行修改以支持不同的上限,并修改月数以允许指定闰月。使用“RRULE”的现有要求仍然适用(例如,“RRULE”必须与主实例的“DTSTART”值相匹配)。其他定期属性(如“recurrence-ID”、“RDATE”和“EXDATE”)继续使用公历日期格式,因为“CALSCALE”没有改变。
When generating instances, the following procedure might be used:
生成实例时,可能会使用以下过程:
1. Convert the "DTSTART" property value of the master recurring component into the date and time components for the calendar system specified by the "RSCALE" element in the "RRULE" value. This provides the "seed" value for generating subsequent recurrence instances.
1. 将主周期组件的“DTSTART”属性值转换为“RRULE”值中的“RSCALE”元素指定的日历系统的日期和时间组件。这为生成后续重复实例提供了“种子”值。
2. Iteratively generate instances using the "RRULE" value applied to the year, month, and day components of the date in the new calendar system.
2. 使用应用于新日历系统中日期的年、月和日组件的“RRULE”值迭代生成实例。
3. For each generated instance, convert the dates and times back from the non-Gregorian form into Gregorian and use those values for other properties such as "RECURRENCE-ID".
3. 对于每个生成的实例,将日期和时间从非公历形式转换回公历形式,并将这些值用于其他属性,如“RECURRENCE-ID”。
Consider the following example for an event representing the Chinese New Year:
考虑一个代表中国新年的事件的下面的例子:
DTSTART;VALUE=DATE:20130210 RRULE:RSCALE=CHINESE;FREQ=YEARLY SUMMARY:Chinese New Year
DTSTART;VALUE=DATE:20130210 RRULE:RSCALE=CHINESE;FREQ=YEARLY SUMMARY:Chinese New Year
To generate instances, first the "DTSTART" value "20130210" is converted into the Chinese calendar system giving "{C}46500101". Next, the year component is incremented by one to give "{C}46510101", and that is then converted back into Gregorian as "20140131". Additional instances are generated by iteratively increasing the year component in the Chinese date and converting back to Gregorian.
要生成实例,首先将“DTSTART”值“20130210”转换为中国日历系统,给出“{C}46500101”。接下来,将年份分量加1,得到“{C}46510101”,然后将其转换回公历为“20140131”。通过迭代增加中国日期中的年份分量并转换回公历,可以生成其他实例。
This specification extends the existing "RRULE" iCalendar property value to include a new "RSCALE" element that can be used to indicate the calendar system used for generating the recurrence pattern.
本规范扩展了现有的“RRULE”iCalendar属性值,以包含一个新的“RSCALE”元素,该元素可用于指示用于生成重复模式的日历系统。
When "RSCALE" is present, the other changes to "RRULE" are:
出现“RSCALE”时,对“RRULE”的其他更改包括:
1. Elements that include numeric values (e.g., "BYYEARDAY") have numeric ranges defined by the "RSCALE" value (i.e., in some calendar systems there might be more than 366 days in a year).
1. 包含数值的元素(例如,“BYYEARDAY”)具有由“RSCALE”值定义的数值范围(即,在某些日历系统中,一年可能超过366天)。
2. Month numbers can include an "L" suffix to indicate that the specified month is a leap month in the corresponding calendar system (see Section 4.2).
2. 月份编号可以包含一个“L”后缀,表示指定月份是相应日历系统中的闰月(见第4.2节)。
3. A "SKIP" element is added to define how "missing" instances are handled (see Section 4.1).
3. 添加了“跳过”元素,以定义如何处理“缺失”实例(参见第4.1节)。
The syntax for the "RECUR" value is modified in the following fashion:
“RECUR”值的语法按以下方式修改:
; recur-rule-part is extended from RFC 5545 recur-rule-part =/ ("RSCALE" "=" rscale) / ("SKIP" "=" skip)
; recur-rule-part is extended from RFC 5545 recur-rule-part =/ ("RSCALE" "=" rscale) / ("SKIP" "=" skip)
rscale = (iana-token ; A CLDR-registered calendar system ; name. / x-name) ; A non-standard, experimental ; calendar system name. ; Names are case insensitive, ; but uppercase values are preferred.
rscale = (iana-token ; A CLDR-registered calendar system ; name. / x-name) ; A non-standard, experimental ; calendar system name. ; Names are case insensitive, ; but uppercase values are preferred.
skip = ("OMIT" / "BACKWARD" / "FORWARD") ; Optional, with default value "OMIT", and ; MUST NOT be present unless "RSCALE" is present.
skip = ("OMIT" / "BACKWARD" / "FORWARD") ; Optional, with default value "OMIT", and ; MUST NOT be present unless "RSCALE" is present.
monthnum = 1*2DIGIT ["L"] ; Existing element modified to include a leap ; month indicator suffix.
monthnum = 1*2DIGIT ["L"] ; Existing element modified to include a leap ; month indicator suffix.
In every calendar system, only certain combinations of day-of-month and month values are valid for a given year, e.g., in the Gregorian calendar system, January 31st is valid but February 31st is not. Similarly, February 29th is valid in a leap year but invalid in a non-leap year. Other calendar systems can also include leap months
在每个日历系统中,只有特定的月日和月值组合对给定年份有效,例如,在公历系统中,1月31日有效,但2月31日无效。同样,2月29日在闰年有效,但在非闰年无效。其他日历系统也可以包括闰月
(see Section 4.2), which vary from year to year. This poses a problem for recurring events where the frequency of recurrence might give rise to an invalid date. For example, a recurring event that starts on January 31st and is set to repeat monthly will generate invalid dates for months with fewer than 31 days. The iCalendar [RFC5545] specification requires recurrence rule generators to ignore any invalid dates generated when iterating the rule. However, that behavior might be surprising to a calendar user born on a leap day and whose birthday event only appears on their calendar every four years. There are common conventions used by humans to determine what to do in such cases, but those conventions can differ from calendar system to calendar system, as well as within the same calendar system, depending on the nature of the event. Typically, humans will expect the "missing" events to be moved to an earlier or later (valid) date.
(见第4.2节),每年都有所不同。这给重复发生的事件带来了问题,因为重复发生的频率可能会导致无效日期。例如,从1月31日开始并设置为每月重复的重复事件将为少于31天的月份生成无效日期。iCalendar[RFC5545]规范要求定期规则生成器忽略迭代规则时生成的任何无效日期。然而,对于出生在闰日的日历用户来说,这种行为可能会令人惊讶,他们的生日事件每四年才出现在日历上。在这种情况下,人类有共同的约定来决定该做什么,但这些约定在不同的日历系统中以及在相同的日历系统中可能有所不同,这取决于事件的性质。通常,人们会期望“缺失”事件被移动到更早或更晚(有效)的日期。
This specification introduces a new "RRULE" element, "SKIP", for use only when the "RSCALE" element is present. The "SKIP" element allows the calendar user agent to specify new options for handling invalid dates.
本规范引入了一个新的“RRULE”元素“SKIP”,仅在存在“RSCALE”元素时使用。“SKIP”元素允许日历用户代理指定处理无效日期的新选项。
"SKIP=OMIT": this is the default option and corresponds to the existing iCalendar behavior of simply ignoring the invalid date.
“SKIP=OMIT”:这是默认选项,对应于现有的iCalendar行为,即忽略无效日期。
"SKIP=BACKWARD": when this option is set, a date with an invalid month is changed to the previous (valid) month. A date with an invalid day-of-month is changed to the previous (valid) day-of-month.
“跳过=向后”:设置此选项时,具有无效月份的日期将更改为上一个(有效)月份。具有无效月日的日期将更改为上一个(有效)月日。
"SKIP=FORWARD": when this option is set, a date with an invalid month is changed to the next (valid) month. A date with an invalid day-of-month is changed to the next (valid) day-of-month.
“跳过=前进”:设置此选项时,具有无效月份的日期将更改为下一个(有效)月份。具有无效月日的日期将更改为下一个(有效)月日。
Note that for both "BACKWARD" and "FORWARD", if the month is changed and results in an invalid day-of-month, then the skip behavior will be reapplied as per the day-of-month rules, according to the processing order defined below.
请注意,对于“向后”和“向前”,如果月份发生更改并导致月份中的某一天无效,则将根据下面定义的处理顺序,按照月份中的某一天规则重新应用跳过行为。
The month and day-of-month skip behavior is only applied at specific points during the processing of an "RRULE" as determined by the order in which any "BYxxx" elements are processed. The order is as follows (based on the "RRULE" element processing order defined in Section 3.3.10 of [RFC5545]):
在“RRULE”的处理过程中,仅在特定点应用月和日跳过行为,这取决于任何“BYxxx”元素的处理顺序。顺序如下(基于[RFC5545]第3.3.10节中定义的“RRULE”元件处理顺序):
o BYMONTH
o 按月
o SKIP (for invalid month only)
o 跳过(仅适用于无效月份)
o BYWEEKNO
o 比威克诺
o BYYEARDAY
o 按年
o BYMONTHDAY
o 拜蒙特日
o SKIP (for invalid day)
o 跳过(无效日期)
o BYDAY
o 白天
o BYHOUR
o 按小时
o BYMINUTE
o 按分钟
o BYSECOND
o 瞬间
o BYSETPOS
o 比塞特波斯
o COUNT
o 计数
o UNTIL
o 直到
It is often possible to avoid having to deal with invalid dates by determining the real intent of a human user, e.g., a human creating a monthly recurring event that starts on January 31st likely intends the event to occur on the last day of every month, in which case that could be encoded into an "RRULE" by using the "BYMONTHDAY=-1" element.
通常可以通过确定用户的真实意图来避免处理无效日期,例如,创建从1月31日开始的每月重复事件的用户可能希望事件发生在每个月的最后一天,在这种情况下,可以使用“BYMONTHDAY=-1”元素将其编码为“RRULE”。
Only a few types of recurrence patterns are likely to need the use of "SKIP". The following is a list of some situations where it might be needed:
只有少数类型的重复模式可能需要使用“跳过”。以下是可能需要的一些情况的列表:
1. The start date of the recurrence is a leap day in the specified calendar system.
1. 重复的开始日期是指定日历系统中的闰日。
2. The start date of the recurrence is in a leap month in the specified calendar system.
2. 重复周期的开始日期为指定日历系统中的闰月。
3. The start date of the recurrence has a day-of-month value greater than the smallest day-of-month value for any month in any year in the specified calendar system.
3. 重复周期的开始日期的“月日”值大于指定日历系统中任何年份中任何月份的最小“月日”值。
4. A "BYMONTHDAY" element in an "RRULE" has a day-of-month value greater than the smallest day-of-month value for any month in any year in the specified calendar system.
4. “RRULE”中的“BYMONTHDAY”元素的月日值大于指定日历系统中任何年份中任何月份的最小月日值。
5. A "BYMONTH" element in an "RRULE" has a value corresponding to a leap month in the specified calendar system.
5. “RRULE”中的“BYMONTH”元素具有与指定日历系统中的闰月相对应的值。
6. A combination of a "BYMONTHDAY" element and a "BYMONTH" element in an "RRULE" has a value corresponding to a leap day in the specified calendar system.
6. “RRULE”中“BYMONTHDAY”元素和“BYMONTH”元素的组合具有与指定日历系统中的闰日对应的值。
7. A "BYYEARDAY" element in an "RRULE" has an absolute value greater than the smallest number of days in any year in the specified calendar system.
7. “RRULE”中的“BYYEARDAY”元素的绝对值大于指定日历系统中任何一年中的最小天数。
8. A "BYWEEKNO" element in an "RRULE" has an absolute value greater than the smallest number of weeks in any year in the specified calendar system.
8. “RRULE”中的“BYWEEKNO”元素的绝对值大于指定日历系统中任何一年中的最小周数。
Examples of using "SKIP" for some common use cases appear in Section 4.3.
对一些常见用例使用“跳过”的示例见第4.3节。
Leap months can occur in different calendar systems. For such calendar systems, the following rules are applied for "identifying" months:
闰月可以出现在不同的日历系统中。对于此类日历系统,以下规则适用于“识别”月份:
1. Numeric values 1 through N are used to identify regular, non-leap, months (where N is the number of months in a regular, non-leap, year).
1. 数值1到N用于标识常规的非闰年月份(其中N是常规的非闰年月份数)。
2. The suffix "L" is added to the regular month number to indicate a leap month that follows the regular month, e.g., "5L" is a leap month that follows the 5th regular month in the year.
2. 将后缀“L”添加到常规月编号,以表示常规月之后的闰月,例如,“5L”是一年中第五个常规月之后的闰月。
Care has to be taken when mapping the month identifiers used here with those of any underlying calendar system library being used. In particular, the Hebrew calendar system used by Unicode (ICU) [UNICODE.ICU] uses a month number scheme of 1 through 13, with month 6 being the leap month, and in non-leap years, month 6 is skipped. Thus, ICU months 1 through 5 map to iCalendar months 1 through 5, ICU month 6 maps to iCalendar month "5L", and ICU months 7 through 13 map to iCalendar months 6 through 12.
在将此处使用的月份标识符与正在使用的任何基础日历系统库的标识符进行映射时,必须小心。特别是,Unicode(ICU)[Unicode.ICU]使用的希伯来日历系统使用1到13的月数方案,第6个月为闰月,在非闰年中跳过第6个月。因此,ICU第1至5个月映射到iCalendar第1至5个月,ICU第6个月映射到iCalendar第“5L”个月,ICU第7至13个月映射到iCalendar第6至12个月。
Consider the following set of iCalendar properties (from the example above):
考虑下面的ICONDEAR属性集(从上面的例子):
DTSTART;VALUE=DATE:20130210 RRULE:RSCALE=CHINESE;FREQ=YEARLY SUMMARY:Chinese New Year
DTSTART;VALUE=DATE:20130210 RRULE:RSCALE=CHINESE;FREQ=YEARLY SUMMARY:Chinese New Year
These define a recurring event for the Chinese New Year, with the first instance being the one in Gregorian year 2013.
这些定义了中国新年的重复事件,第一次是在公历2013年。
The Chinese date corresponding to the first instance is "{C}46500101". The table below shows the initial instance and the next four, each of which is determined by adding the appropriate amount to the year component of the Chinese date. Also shown is the conversion back to the Gregorian date:
与第一审相对应的中文日期为“{C}46500101”。下表显示了初始实例和接下来的四个实例,每个实例都是通过将适当的金额添加到中国日期的年份部分来确定的。还显示了返回公历日期的转换:
+--------------+--------------------------+ | Chinese Date | Gregorian Date | +--------------+--------------------------+ | {C}46500101 | 20130210 - DTSTART value | | {C}46510101 | 20140131 | | {C}46520101 | 20150219 | | {C}46530101 | 20160208 | | {C}46540101 | 20170128 | +--------------+--------------------------+
+--------------+--------------------------+ | Chinese Date | Gregorian Date | +--------------+--------------------------+ | {C}46500101 | 20130210 - DTSTART value | | {C}46510101 | 20140131 | | {C}46520101 | 20150219 | | {C}46530101 | 20160208 | | {C}46540101 | 20170128 | +--------------+--------------------------+
Consider the following set of iCalendar properties:
考虑以下一组IcLeDaar属性:
DTSTART;VALUE=DATE:20130906 RRULE:RSCALE=ETHIOPIC;FREQ=MONTHLY;BYMONTH=13 SUMMARY:First day of 13th month
DTSTART;VALUE=DATE:20130906 RRULE:RSCALE=ETHIOPIC;FREQ=MONTHLY;BYMONTH=13 SUMMARY:First day of 13th month
These define a recurring event for the first day of the 13th month, with the first instance being the one in Gregorian year 2013. While there are a number of alternative ways of writing the "RRULE" above to achieve the same pattern of recurring dates, the one above was chosen to illustrate a "BYMONTH" value exceeding the limit of 12, previously described in iCalendar (Section 3.3.10 of [RFC5545]).
这些定义了第13个月第一天的重复事件,第一次是2013年公历年的事件。虽然有多种替代方法可以编写上述“RRULE”以实现相同的重复日期模式,但选择上述方法是为了说明“BYMONTH”值超过12的限制,如iCalendar(RFC5545)第3.3.10节所述。
The Ethiopic date corresponding to the first instance is "{E}20051301". The table below shows the initial instance and the next four, each of which is determined by adding the appropriate amount to the year component of the Ethiopic date. Also shown is the conversion back to the Gregorian date:
与第一次审判相对应的埃塞俄比亚日期为“{E}20051301”。下表显示了初始实例和接下来的四个实例,每个实例都是通过将适当的金额添加到Ethiopic日期的年份部分来确定的。还显示了返回公历日期的转换:
+---------------+--------------------------+ | Ethiopic Date | Gregorian Date | +---------------+--------------------------+ | {E}20051301 | 20130906 - DTSTART value | | {E}20061301 | 20140906 | | {E}20071301 | 20150906 | | {E}20081301 | 20160906 | | {E}20091301 | 20170906 | +---------------+--------------------------+
+---------------+--------------------------+ | Ethiopic Date | Gregorian Date | +---------------+--------------------------+ | {E}20051301 | 20130906 - DTSTART value | | {E}20061301 | 20140906 | | {E}20071301 | 20150906 | | {E}20081301 | 20160906 | | {E}20091301 | 20170906 | +---------------+--------------------------+
Note that in this example, the value of the "BYMONTH" component in the "RRULE" matches the Ethiopic month value and not the Gregorian month.
请注意,在本例中,“RRULE”中“BYMONTH”组件的值与Ethiopic month值匹配,而不是与公历月份匹配。
Consider the following set of iCalendar properties:
考虑以下一组IcLeDaar属性:
DTSTART;VALUE=DATE:20140208 RRULE:RSCALE=HEBREW;FREQ=YEARLY;BYMONTH=5L;BYMONTHDAY=8;SKIP=FORWARD SUMMARY:Anniversary
DTSTART;VALUE=DATE:20140208 RRULE:RSCALE=HEBREW;FREQ=YEARLY;BYMONTH=5L;BYMONTHDAY=8;SKIP=FORWARD SUMMARY:Anniversary
These define a recurring event for the 8th day of the Hebrew month of Adar I (the leap month identified by "5L"), with the first instance being the one in Gregorian year 2014.
这些定义了阿达尔一世希伯来月第8天(用“5L”标识的闰月)的重复事件,第一次是2014年公历年。
The Hebrew date corresponding to the first instance is "{H}577405L08", which is a leap month in year 5774. The table below shows the initial instance and the next four, each of which is determined by adding the appropriate amount to the year component of the Hebrew date, taking into account that only year 5776 is a leap year. Thus, in other years the Hebrew month component is adjusted forward to month 6. Also shown is the conversion back to the Gregorian date:
与第一个实例相对应的希伯来语日期是“{H}577405L08”,这是5774年的闰月。下表显示了初始实例和接下来的四个实例,每个实例都是通过将适当的金额添加到希伯来语日期的年份部分来确定的,考虑到只有5776年是闰年。因此,在其他年份,希伯来语月份部分向前调整为第6个月。还显示了返回公历日期的转换:
+--------------+--------------------------+ | Hebrew Date | Gregorian Date | +--------------+--------------------------+ | {H}577405L08 | 20140208 - DTSTART value | | {H}57750608 | 20150227 | | {H}577605L08 | 20160217 | | {H}57770608 | 20170306 | | {H}57780608 | 20180223 | +--------------+--------------------------+
+--------------+--------------------------+ | Hebrew Date | Gregorian Date | +--------------+--------------------------+ | {H}577405L08 | 20140208 - DTSTART value | | {H}57750608 | 20150227 | | {H}577605L08 | 20160217 | | {H}57770608 | 20170306 | | {H}57780608 | 20180223 | +--------------+--------------------------+
Consider the following set of iCalendar properties:
考虑以下一组IcLeDaar属性:
DTSTART;VALUE=DATE:20120229 RRULE:FREQ=YEARLY SUMMARY:Anniversary
DTSTART;VALUE=DATE:20120229 RRULE:FREQ=YEARLY SUMMARY:Anniversary
These define a recurring event for the 29th of February, 2012, in the standard iCalendar calendar scale -- Gregorian. The standard iCalendar behavior is that non-existent dates in a recurrence set are ignored. Thus, the properties above would only generate instances in leap years (2016, 2020, etc.), which is likely not what users expect. The new "RSCALE" option defined by this specification provides the "SKIP" element, which can be used to "fill in" the missing instances in an appropriate fashion. The set of iCalendar properties below does that:
这些定义了2012年2月29日的重复事件,采用标准的伊卡伦达日历尺度——公历。iCalendar的标准行为是忽略重复集中不存在的日期。因此,上述属性只会在闰年(2016年、2020年等)生成实例,这可能不是用户所期望的。本规范定义的新“RSCALE”选项提供了“SKIP”元素,可用于以适当的方式“填充”缺少的实例。下面的iCalendar属性集可以:
DTSTART;VALUE=DATE:20120229 RRULE:RSCALE=GREGORIAN;FREQ=YEARLY;SKIP=FORWARD SUMMARY:Anniversary
DTSTART;VALUE=DATE:20120229 RRULE:RSCALE=GREGORIAN;FREQ=YEARLY;SKIP=FORWARD SUMMARY:Anniversary
With these properties, the "missing" instances in non-leap years now appear on the 1st of March in those years:
有了这些属性,非闰年中的“缺失”实例现在出现在这些年份的3月1日:
+-------------------------------+----------------------------+ | Instances (with SKIP=FORWARD) | Instances (without RSCALE) | +-------------------------------+----------------------------+ | 20120229 | 20120229 - DTSTART value | | 20130301 | | | 20140301 | | | 20150301 | | | 20160229 | 20160229 | | 20170301 | | +-------------------------------+----------------------------+
+-------------------------------+----------------------------+ | Instances (with SKIP=FORWARD) | Instances (without RSCALE) | +-------------------------------+----------------------------+ | 20120229 | 20120229 - DTSTART value | | 20130301 | | | 20140301 | | | 20150301 | | | 20160229 | 20160229 | | 20170301 | | +-------------------------------+----------------------------+
This specification uses the Unicode Consortium's registry of calendar systems [UNICODE.CLDR] to define valid values for the "RSCALE" element of an "RRULE". Note that the underscore character "_" is never used in CLDR-based calendar system names. New values can be added to this registry following Unicode Consortium rules. It is expected that many implementations of non-Gregorian calendars will use software libraries provided by Unicode (ICU) [UNICODE.ICU], and hence it makes sense to reuse their registry rather than creating a new one. "RSCALE" values are case insensitive, but uppercase is preferred.
本规范使用Unicode联盟的日历系统注册表[Unicode.CLDR]为“RRULE”的“RSCALE”元素定义有效值。请注意,基于CLDR的日历系统名称中从不使用下划线字符“\u1”。可以按照Unicode联盟规则将新值添加到此注册表。预计许多非公历日历的实现将使用Unicode(ICU)[Unicode.ICU]提供的软件库,因此重用它们的注册表而不是创建新的注册表是有意义的。“RSCALE”值不区分大小写,但首选大写。
CLDR supports the use of "alias" values as alternative names for specific calendar systems. These alias values can be used as "RSCALE" values and are treated the same as the equivalent CLDR calendar system they are an alias for.
CLDR支持使用“别名”值作为特定日历系统的备选名称。这些别名值可用作“RSCALE”值,并与它们作为别名的等效CLDR日历系统相同。
When using the CLDR data, calendar agents SHOULD take into account the "deprecated" value and use the alternative "preferred" calendar system. In particular, the "islamicc" calendar system is considered deprecated in favor of the "islamic-civil" calendar system.
使用CLDR数据时,日历代理应考虑“弃用”值,并使用替代的“首选”日历系统。特别是,“伊斯兰国际商会”日历系统被认为是不赞成的,而赞成“伊斯兰公民”日历系统。
For calendar user agents that do not support the "RSCALE" element, or do not support the calendar system specified by the "RSCALE" element value, the following behaviors are possible when processing iCalendar data:
对于不支持“RSCALE”元素或不支持“RSCALE”元素值指定的日历系统的日历用户代理,在处理iCalendar数据时可能出现以下行为:
1. The calendar user agent can reject the entire iCalendar object within which at least one iCalendar component uses the unrecognized "RSCALE" element or element value.
1. 日历用户代理可以拒绝整个iCalendar对象,其中至少有一个iCalendar组件使用无法识别的“RSCALE”元素或元素值。
2. The calendar user agent can reject just the iCalendar components containing an unrecognized "RSCALE" element or element value. Note that any overridden components associated with those rejected components MUST also be rejected (i.e., any other components with the same "UID" property value as the one with the unrecognized "RSCALE" element or element value).
2. 日历用户代理可以仅拒绝包含无法识别的“RSCALE”元素或元素值的iCalendar组件。请注意,与被拒绝组件相关联的任何被覆盖组件也必须被拒绝(即,与具有未识别的“RSCALE”元素或元素值的组件具有相同“UID”属性值的任何其他组件)。
3. The calendar user agent can fall back to a non-recurring behavior for the iCalendar component containing the unrecognized "RSCALE" element or element value (effectively ignoring the "RRULE" property). However, any overridden components SHOULD be rejected as they would represent "orphaned" instances that would seem to be out of place.
3. 对于包含无法识别的“RSCALE”元素或元素值(实际上忽略“RRULE”属性)的iCalendar组件,日历用户代理可以退回到非重复性行为。但是,任何被重写的组件都应该被拒绝,因为它们将表示似乎不合适的“孤立”实例。
In general, the best choice for a calendar user agent would be option (2) above, as it would be the least disruptive choice. Note that when processing iTIP [RFC5546] messages, the manner of the rejection is covered as discussed in the next section.
通常,日历用户代理的最佳选择是上面的选项(2),因为它是破坏性最小的选择。请注意,在处理iTIP[RFC5546]消息时,拒绝的方式将在下一节中讨论。
iTIP [RFC5546] defines how iCalendar data can be sent between calendar user agents to schedule calendar components between calendar users. It is often not possible to know the capabilities of a calendar user agent to which an iTIP message is being sent, but iTIP defines fallback behavior in such cases.
iTIP[RFC5546]定义了如何在日历用户代理之间发送iCalendar数据,以在日历用户之间调度日历组件。通常不可能知道iTIP消息发送到的日历用户代理的功能,但iTIP在这种情况下定义了回退行为。
For calendar user agents that do not support the "RSCALE" element, the following can occur when iTIP messages containing an "RSCALE" element are received:
对于不支持“RSCALE”元素的日历用户代理,当接收到包含“RSCALE”元素的iTIP消息时,可能会发生以下情况:
The receiving calendar user agent can reject the entire iTIP message and return an iTIP reply with a "REQUEST-STATUS" property set to the "3.1" status code (as per Section 3.6.14 of [RFC5546]).
接收日历用户代理可以拒绝整个iTIP消息,并返回一个iTIP回复,其中“请求状态”属性设置为“3.1”状态代码(根据[RFC5546]第3.6.14节)。
The receiving calendar user agent can fall back to a non-recurring behavior for the calendar component (effectively ignoring the "RRULE" property) and return an iTIP reply with a "REQUEST-STATUS" property set to the "2.3", "2.5", "2.8", or "2.10" status codes (as per Sections 3.6.4, 3.6.6, 3.6.9, or 3.6.11, respectively, of [RFC5546]).
接收日历的用户代理可以退回到日历组件的非重复行为(有效地忽略“RRULE”属性),并返回iTIP回复,其中“请求状态”属性设置为“2.3”、“2.5”、“2.8”或“2.10”状态代码(分别根据[RFC5546]第3.6.4、3.6.6、3.6.9或3.6.11节)。
For calendar user agents that support the "RSCALE" element but do not support the calendar system specified by the "RSCALE" element value, the following can occur:
对于支持“RSCALE”元素但不支持“RSCALE”元素值指定的日历系统的日历用户代理,可能会发生以下情况:
The iTIP message SHOULD be rejected, returning a "REQUEST-STATUS" property set to the "3.1" status code (as per Section 3.6.14 of [RFC5546]).
应拒绝iTIP消息,并将“请求状态”属性设置为“3.1”状态代码(根据[RFC5546]第3.6.14节)。
If the iTIP message is accepted and the calendar component treated as non-recurring, an iTIP reply with a "REQUEST-STATUS" property set to the "2.8" or "2.10" status codes (as per Sections 3.6.9 or 3.6.11, respectively, of [RFC5546]) SHOULD be returned.
如果iTIP消息被接受,且日历组件被视为非周期性,则应返回iTIP回复,其“请求状态”属性设置为“2.8”或“2.10”状态代码(分别根据[RFC5546]第3.6.9节或第3.6.11节)。
As noted in Section 6, the best choice is to reject the entire iTIP message.
如第6节所述,最好的选择是拒绝整个iTIP消息。
xCal [RFC6321] defines how iCalendar data is represented in XML. This specification extends the <recur> XML element in Section 3.6.10 of [RFC6321] in the following manner:
xCal[RFC6321]定义了iCalendar数据在XML中的表示方式。本规范以以下方式扩展了[RFC6321]第3.6.10节中的<recur>XML元素:
1. A new <rscale> XML element is defined as a child element of <recur>. The content of this element MUST be a string whose value is the "RSCALE" element value of the "RRULE", with case preserved.
1. 新的<rscale>XML元素被定义为<recur>的子元素。此元素的内容必须是一个字符串,其值为“RRULE”的“RSCALE”元素值,并保留大小写。
2. A new <skip> XML element is defined as a child element of <recur>. The content of this element MUST be a string whose value is the "SKIP" element value of the "RRULE", with case preserved.
2. 新的<skip>XML元素被定义为<recur>的子元素。此元素的内容必须是一个字符串,其值为“RRULE”的“SKIP”元素值,保留大小写。
3. The <bymonth> XML element is redefined to support either numeric or string values as its content (as per Section 4.2).
3. <bymonth>XML元素被重新定义为支持数字或字符串值作为其内容(根据第4.2节)。
Extensions to the RELAX NG schema in Appendix A of [RFC6321] are defined in Appendix A of this document.
[RFC6321]附录A中RELAX NG模式的扩展在本文件附录A中定义。
Example: the iCalendar "RRULE" property:
示例:iCalendar“RRULE”属性:
RRULE:RSCALE=GREGORIAN;FREQ=YEARLY;SKIP=FORWARD
RRULE:RSCALE=GREGORIAN;FREQ=YEARLY;SKIP=FORWARD
would be represented in XML as:
将用XML表示为:
<rrule> <recur> <rscale>GREGORIAN</rscale> <freq>YEARLY</freq> <skip>FORWARD</skip> </recur> </rrule>
<rrule> <recur> <rscale>GREGORIAN</rscale> <freq>YEARLY</freq> <skip>FORWARD</skip> </recur> </rrule>
jCal [RFC7265] defines how iCalendar data is represented in JSON. This specification extends the "recur" JSON object defined in Section 3.6.10 of [RFC7265] in the following manner:
jCal[RFC7265]定义了iCalendar数据在JSON中的表示方式。本规范以以下方式扩展了[RFC7265]第3.6.10节中定义的“recur”JSON对象:
1. A new "rscale" child member is defined. This MUST be a string whose value is the "RSCALE" element value of the "RRULE", with case preserved.
1. 定义了一个新的“rscale”子成员。这必须是一个字符串,其值为“RRULE”的“RSCALE”元素值,保留大小写。
2. A new "skip" child member is defined. This MUST be a string whose value is the "SKIP" element value of the "RRULE", with case preserved.
2. 定义了一个新的“跳过”子成员。这必须是一个字符串,其值为“RRULE”的“SKIP”元素值,保留大小写。
3. The "bymonth" child member is redefined to support either numeric or string values. If the "BYMONTH" element value is an integer, then a numeric JSON value MUST be used. If the "BYMONTH" element value is an integer with the "L" suffix (as per Section 4.2), then a JSON string value MUST be used.
3. “bymonth”子成员被重新定义为支持数值或字符串值。如果“BYMONTH”元素值是整数,则必须使用数字JSON值。如果“BYMONTH”元素值是带有“L”后缀的整数(根据第4.2节),则必须使用JSON字符串值。
Example: the iCalendar "RRULE" property:
示例:iCalendar“RRULE”属性:
RRULE:RSCALE=GREGORIAN;FREQ=YEARLY;SKIP=FORWARD
RRULE:RSCALE=GREGORIAN;FREQ=YEARLY;SKIP=FORWARD
would be represented in JSON as:
将在JSON中表示为:
[ "rrule", {}, "recur", { "rscale": "GREGORIAN", "freq": "YEARLY", "skip": "FORWARD" } ]
[ "rrule", {}, "recur", { "rscale": "GREGORIAN", "freq": "YEARLY", "skip": "FORWARD" } ]
The CalDAV [RFC4791] calendar access protocol allows clients and servers to exchange iCalendar data. In addition, CalDAV clients are able to query calendar data stored on the server, including time-based queries. Since an "RSCALE" element value determines the time ranges for recurring instances in a calendar component, CalDAV servers need to support it to interoperate with clients also using the "RSCALE" element.
CalDAV[RFC4791]日历访问协议允许客户端和服务器交换iCalendar数据。此外,CalDAV客户端能够查询存储在服务器上的日历数据,包括基于时间的查询。由于“RSCALE”元素值决定日历组件中重复实例的时间范围,CalDAV服务器需要支持它,以便也使用“RSCALE”元素与客户端进行互操作。
A CalDAV server advertises a CALDAV:supported-rscale-set Web Distributed Authoring and Versioning (WebDAV) property on calendar home or calendar collections if it supports use of the "RSCALE" element as described in this specification. The server can advertise a specific set of supported calendar systems by including one or more CALDAV:supported-rscale XML elements within the CALDAV:supported-rscale-set XML element. If no CALDAV:supported-rscale XML elements are included in the WebDAV property, then clients can try any calendar system value but need to be prepared for a failure when attempting to store the calendar data.
如果CalDAV服务器支持使用本规范中所述的“rscale”元素,则会在日历主目录或日历集合上公布CalDAV:supported rscale set Web Distributed Authoring and Versioning(WebDAV)属性。服务器可以通过在CALDAV:supported rscale set XML元素中包含一个或多个CALDAV:supported rscale XML元素来公布一组特定的受支持日历系统。如果WebDAV属性中不包含CALDAV:supported rscale XML元素,则客户端可以尝试任何日历系统值,但在尝试存储日历数据时需要做好失败准备。
Clients MUST NOT attempt to store iCalendar data containing "RSCALE" elements if the CALDAV:supported-rscale-set WebDAV property is not advertised by the server.
如果服务器未公布CALDAV:supported RSCALE set WebDAV属性,则客户端不得尝试存储包含“RSCALE”元素的iCalendar数据。
The server SHOULD return an HTTP 403 response with a DAV:error element containing a CALDAV:supported-rscale XML element, if a client attempts to store iCalendar data with an "RSCALE" element value not supported by the server.
如果客户端试图使用服务器不支持的“rscale”元素值存储iCalendar数据,则服务器应返回HTTP 403响应,其中包含一个DAV:error元素,该元素包含CALDAV:supported rscale XML元素。
It is possible for an "RSCALE" value to be present in calendar data on the server being accessed by a client that does not support an "RSCALE" element or its specified value. It is expected that existing clients, unaware of "RSCALE", will fail gracefully by ignoring the calendar component, while still processing other calendar data on the server (as per option (2) in Section 6).
不支持“RSCALE”元素或其指定值的客户端访问的服务器上的日历数据中可能存在“RSCALE”值。预计不知道“RSCALE”的现有客户端将通过忽略日历组件而正常失败,同时仍在服务器上处理其他日历数据(根据第6节中的选项(2))。
Name: supported-rscale-set
名称:支持的rscale集
Namespace: urn:ietf:params:xml:ns:caldav
Namespace: urn:ietf:params:xml:ns:caldav
Purpose: Enumerates the set of supported iCalendar "RSCALE" element values supported by the server.
目的:枚举服务器支持的一组受支持的iCalendar“RSCALE”元素值。
Protected: This property MUST be protected and SHOULD NOT be returned by a PROPFIND allprop request (as defined in Section 14.2 of [RFC4918]).
受保护:此属性必须受保护,不应通过PROPFIND allprop请求返回(如[RFC4918]第14.2节所定义)。
Description: See above.
说明:见上文。
Definition:
定义:
<!ELEMENT supported-rscale-set (supported-rscale*)> <!ELEMENT supported-rscale (#PCDATA)> <!-- PCDATA value: string - case insensitive but uppercase preferred -->
<!ELEMENT supported-rscale-set (supported-rscale*)> <!ELEMENT supported-rscale (#PCDATA)> <!-- PCDATA value: string - case insensitive but uppercase preferred -->
Example:
例子:
<C:supported-rscale-set xmlns:C="urn:ietf:params:xml:ns:caldav"> <C:supported-rscale>GREGORIAN</C:supported-rscale> <C:supported-rscale>CHINESE</C:supported-rscale> <C:supported-rscale>ISLAMIC-CIVIL</C:supported-rscale> <C:supported-rscale>HEBREW</C:supported-rscale> <C:supported-rscale>ETHIOPIC</C:supported-rscale> </C:supported-rscale-set>
<C:supported-rscale-set xmlns:C="urn:ietf:params:xml:ns:caldav"> <C:supported-rscale>GREGORIAN</C:supported-rscale> <C:supported-rscale>CHINESE</C:supported-rscale> <C:supported-rscale>ISLAMIC-CIVIL</C:supported-rscale> <C:supported-rscale>HEBREW</C:supported-rscale> <C:supported-rscale>ETHIOPIC</C:supported-rscale> </C:supported-rscale-set>
This specification does not introduce any additional security concerns beyond those described in [RFC5545], [RFC5546], and [RFC4791].
除[RFC5545]、[RFC5546]和[RFC4791]中所述的安全问题外,本规范不引入任何其他安全问题。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.
[RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, March 2007, <http://www.rfc-editor.org/info/rfc4791>.
[RFC4791]Daboo,C.,Desruisseaux,B.,和L.Dusseault,“WebDAV(CalDAV)日历扩展”,RFC 47912007年3月<http://www.rfc-editor.org/info/rfc4791>.
[RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)", RFC 4918, June 2007, <http://www.rfc-editor.org/info/rfc4918>.
[RFC4918]Dusseault,L.,Ed.“Web分布式创作和版本控制(WebDAV)的HTTP扩展”,RFC4918,2007年6月<http://www.rfc-editor.org/info/rfc4918>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.
[RFC5234]Crocker,D.,Ed.和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,2008年1月<http://www.rfc-editor.org/info/rfc5234>.
[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, September 2009, <http://www.rfc-editor.org/info/rfc5545>.
[RFC5545]Desruisseaux,B.,Ed.“互联网日历和调度核心对象规范(iCalendar)”,RFC 55452009年9月<http://www.rfc-editor.org/info/rfc5545>.
[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, December 2009, <http://www.rfc-editor.org/info/rfc5546>.
[RFC5546]Daboo,C.,Ed.“iCalendar传输独立互操作性协议(iTIP)”,RFC 55462009年12月<http://www.rfc-editor.org/info/rfc5546>.
[RFC6321] Daboo, C., Douglass, M., and S. Lees, "xCal: The XML Format for iCalendar", RFC 6321, August 2011, <http://www.rfc-editor.org/info/rfc6321>.
[RFC6321]Daboo,C.,Douglass,M.,和S.Lees,“xCal:iCalendar的XML格式”,RFC 63212011年8月<http://www.rfc-editor.org/info/rfc6321>.
[RFC7265] Kewisch, P., Daboo, C., and M. Douglass, "jCal: The JSON Format for iCalendar", RFC 7265, May 2014, <http://www.rfc-editor.org/info/rfc7265>.
[RFC7265]Kewisch,P.,Daboo,C.,和M.Douglass,“jCal:iCalendar的JSON格式”,RFC 7265,2014年5月<http://www.rfc-editor.org/info/rfc7265>.
[UNICODE.CLDR] The Unicode Consortium, "CLDR calendar.xml Data", Unicode Consortium CLDR, <http://www.unicode.org/repos/cldr/tags/latest/common/ bcp47/calendar.xml>.
[UNICODE.CLDR]UNICODE联盟,“CLDR calendar.xml数据”,UNICODE联盟CLDR<http://www.unicode.org/repos/cldr/tags/latest/common/ bcp47/calendar.xml>。
[ISO.8601.2004] International Organization for Standardization, "Data elements and interchange formats - Information interchange - Representation of dates and times", ISO Standard 8601, December 2004.
[ISO.8601.2004]国际标准化组织,“数据元素和交换格式-信息交换-日期和时间的表示”,ISO标准86012004年12月。
[UNICODE.ICU] "International Components for Unicode", April 2014, <http://site.icu-project.org>.
[UNICODE.ICU]“UNICODE的国际组件”,2014年4月<http://site.icu-project.org>.
The following changes are made to the RELAX NG schema defined in Appendix A of [RFC6321].
对[RFC6321]附录A中定义的RELAX NG模式进行了以下更改。
# 3.3.10 RECUR # This extension adds type-rscale and type-skip, # and modifies type-bymonth
#3.3.10重复#此扩展添加类型rscale和类型skip,#并按月修改类型
value-recur = element recur { type-rscale?, type-freq, (type-until | type-count)?, element interval { xsd:positiveInteger }?, type-bysecond*, type-byminute*, type-byhour*, type-byday*, type-bymonthday*, type-byyearday*, type-byweekno*, type-bymonth*, type-bysetpos*, element wkst { type-weekday }?, type-skip? }
value-recur = element recur { type-rscale?, type-freq, (type-until | type-count)?, element interval { xsd:positiveInteger }?, type-bysecond*, type-byminute*, type-byhour*, type-byday*, type-bymonthday*, type-byyearday*, type-byweekno*, type-bymonth*, type-bysetpos*, element wkst { type-weekday }?, type-skip? }
type-rscale = element rscale { xsd:string }
type-rscale = element rscale { xsd:string }
type-bymonth = element bymonth { xsd:positiveInteger | xsd:string }
type-bymonth = element bymonth { xsd:positiveInteger | xsd:string }
type-skip = element skip { "OMIT" | "BACKWARD" | "FORWARD" }
type-skip = element skip { "OMIT" | "BACKWARD" | "FORWARD" }
Acknowledgments
致谢
Thanks to the following for feedback: Mark Davis, Mike Douglass, Donald Eastlake, Peter Edberg, Marten Gajda, Philipp Kewisch, Barry Leiba, Jonathan Lennox, Ken Murchison, Arnaud Quillaud, Dave Thewlis, and Umaoka Yoshito.
感谢下面的反馈:马克·戴维斯、迈克·道格拉斯、唐纳德·伊斯特莱克、彼得·埃德伯格、马丁·加伊达、菲利普·凯维什、巴里·莱巴、乔纳森·伦诺克斯、肯·默奇森、阿诺·基劳德、戴夫·泰利斯和奥冈·吉斯托。
This specification originated from work at the Calendaring and Scheduling Consortium, which has helped with the development and testing of implementations.
该规范源于日历和调度联盟的工作,该联盟帮助开发和测试了实现。
Authors' Addresses
作者地址
Cyrus Daboo Apple Inc. 1 Infinite Loop Cupertino, CA 95014 United States
Cyrus Daboo苹果公司,美国加利福尼亚州库比蒂诺市无限环路1号,邮编95014
EMail: cyrus@daboo.name URI: http://www.apple.com/
EMail: cyrus@daboo.name URI: http://www.apple.com/
Gregory Yakushev Google Inc. Brandschenkestrasse 100 8002 Zurich Switzerland
Gregory Yakushev谷歌公司Brandschenkestrasse 100 8002瑞士苏黎世
EMail: gyakushev@yahoo.com URI: http://www.google.com/
EMail: gyakushev@yahoo.com URI: http://www.google.com/