2.1.3.2.2.6 Template: Yearly Nth Recurrences
ABNF Description
-
yearlynth-template= "FREQ=YEARLY" yearlynth-args [common-parts] yearlynth-args= byday-nth-part bysetpos-part bymonth-part
Template Examples
The 3rd Sunday of every June:
-
FREQ=YEARLY;BYDAY=SU;BYSETPOS=3;BYMONTH=6
The last weekday of every April at 3:30 P.M.:
-
FREQ=YEARLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1;BYMONTH=4;BYMINUTE=30;BYHOUR=15
The first Monday of every October, every 3 years, for 7 occurrences:
-
FREQ=YEARLY;BYDAY=MO;BYSETPOS=1;BYMONTH=10;INTERVAL=3;COUNT=7
Importing to Calendar objects
An RRULE or X-MICROSOFT-RRULE matching this template SHOULD<305> be imported into PidLidAppointmentRecur as specified in the following table. A VEVENT MUST NOT specify both an RRULE and an X-MICROSOFT-RRULE.
AppointmentRecurrencePattern field |
Value |
---|---|
ReaderVersion |
Set to 0x3004 |
WriterVersion |
Set to 0x3004 |
RecurFrequency |
Set to 0x200D. If the INTERVAL is not 1, RecurFrequency SHOULD<306> be set to 0x200C. |
PatternType |
Set to 0x0003. Can be overridden by X-MICROSOFT-CALSCALE, see section 2.1.3.1.1.8. |
CalendarType |
Imported from X-MICROSOFT-CALSCALE (see section 2.1.3.1.1.8). |
FirstDateTime |
Set as specified in [MS-OXOCAL] section 2.2.1.44.1. |
Period |
Set to (12 * INTERVAL) |
SlidingFlag |
Set to 0x00000000 |
PatternTypeSpecific.Week.Sa-Su |
(unset) |
PatternTypeSpecific.Month.Day |
(unset) |
PatternTypeSpecific.MonthNth.Sa-Su |
Set to a bitmask representation of BYDAY as specified in section 2.1.3.2.2.2. |
PatternTypeSpecific.MonthNth.N |
Set to the value of BYSETPOS. If the value of BYSETPOS is -1, PatternTypeSpecific.MonthNth.N MUST be set to 0x00000005. |
EndType |
If the recurrence is infinite, set EndType to 0x00002023. If the recurrence is specified with a COUNT, set EndType to 0x00002022. Otherwise, set EndType to 0x00002021. |
OccurrenceCount |
Set to the number of occurrences of the recurrence based on UNTIL or COUNT. If the recurrence is infinite, set OccurrenceCount to 0x0000000A. |
FirstDOW |
Set to the correct value based on WKST as specified in section 2.1.3.2.2.1. |
DeletedInstanceCount / DeletedInstanceDates |
See section 2.1.3.1.1.20.13 |
ModifiedInstanceCount / ModifiedInstanceDates |
See section 2.1.3.1.1.20.18 |
StartDate |
Set to the date portion of DTSTART, in the time zone specified by PidLidTimeZoneStruct. This date is stored in minutes after midnight Jan 1, 1601. Note that this value MUST be evenly divisible by 1440. If BYMONTH is specified, it MUST override the month portion of DTSTART. |
EndDate |
Set to the start date of the last instance of a recurrence, in the time zone specified by PidLidTimeZoneStruct. This date is stored in minutes after midnight Jan 1, 1601. If the recurrence is infinite, set EndDate to 0x5AE980DF. Note that this value MUST be evenly divisible by 1440, except for the special value 0x5AE980DF. |
ReaderVersion2 |
Set to 0x00003006 |
WriterVersion2 |
Set to 0x00003009 |
StartTimeOffset |
Set to (60*BYHOUR + BYMINUTE) |
EndTimeOffset |
Set to (StartTimeOffset + PidLidAppointmentDuration) |
ExceptionCount / ExceptionInfo |
See section 2.1.3.1.1.20.18 |
(ReservedBlocks and ExtendedExceptions) |
Refer to [MS-OXOCAL] |
Exporting from Calendar objects
The AppointmentRecurrencePattern structure ([MS-OXOCAL] section 2.2.1.44.5) in the PidLidAppointmentRecur property ([MS-OXOCAL] section 2.2.1.44) SHOULD<307> be exported as the property specified by the table of recurrence properties in section 2.1.3.2.2.1. The exported property MUST be assigned the value generated by the Recurrence template specified by the table of Recurrence templates specified in section 2.1.3.2.2.1.
If PidLidAppointmentRecur is being exported with the Yearly Nth Recurrence Template, it MUST contain the recurrence parts specified in the following table.
Recurrence part |
Value |
---|---|
FREQ |
Set to 'YEARLY' |
INTERVAL |
Set to (Period / 12). If the value is 1, omit this recurrence part. |
BYDAY |
Set to the BYDAY representation of the PatternTypeSpecific.MonthNth.Sa-Su bitmask as specified in section 2.1.3.2.2.2. |
BYSETPOS |
Set to PatternTypeSpecific.MonthNth.N. If PatternTypeSpecific.MonthNth.N is 0x00000005, set BYSETPOS to -1. |
BYMONTH |
Set to the month from FirstDateTime. |
COUNT |
If EndType is 0x00002022, set to OccurrenceCount. Otherwise, omit this recurrence part. |
UNTIL |
If EndType is 0x00002021, SHOULD<308> be set to (EndDate + StartTimeOffset), converted from the time zone specified by PidLidTimeZoneStruct to the UTC time zone. Alternatively, MAY<309> be set to midnight on the date specified by EndDate. If EndType is not 0x00002021, omit this recurrence part. |
WKST |
The WKST recurrence part SHOULD<310> be omitted. |