2.2.1.44.1.4 PatternTypeSpecific Week
For a weekly recurrence pattern (value of the PatternType field is 0x0001), the structure of the PatternTypeSpecific field is as follows.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X |
Sa |
F |
Th |
W |
Tu |
M |
Su |
unused |
X (1 bit): This bit is not used. MUST be zero and MUST be ignored.
Sa (1 bit): (0x00000040) The event occurs on Saturday.
F (1 bit): (0x00000020) The event occurs on Friday.
Th (1 bit): (0x00000010) The event occurs on Thursday.
W (1 bit): (0x00000008) The event occurs on Wednesday.
Tu (1 bit): (0x00000004) The event occurs on Tuesday.
M (1 bit): (0x00000002) The event occurs on Monday.
Su (1 bit): (0x00000001) The event occurs on Sunday.
unused (3 bytes): These bits are not used. MUST be zero and MUST be ignored.
The day on which a calendar week begins is used in combination with the value of the PatternTypeSpecific field to determine the event dates. For example, consider the pattern "Every 2 weeks on Monday, Tuesday, and Friday, starting in week 2." If Wednesday is designated as the beginning of the calendar week according to the value of the FirstDOW field of the RecurrencePattern structure, the Monday, Tuesday, and Friday event dates in a given week are not the same as they would be if the calendar week begins on Sunday. The following figure might make this a little bit easier to understand.
Figure 2: Event dates depend on the first day of the week
Assuming a pattern "Every 2 weeks on Monday, Tuesday, and Friday, starting in week 2", Calendar A in the preceding figure shows Monday, Tuesday, and Friday event dates when Sunday is designated as the beginning of a calendar week, and Calendar B shows the event dates when Wednesday is designated as the beginning of a calendar week.
If the calendar week begins on Sunday, the valid dates would be the 9th, 10th, 13th, 23rd, 24th, and 27th of the month, but if the calendar week begins on Wednesday, the valid dates would be the 13th, 16th, 17th, 27th, 30th, and 31st of the month. The day on which calendar weeks begin makes a huge difference. When applying the weekly recurrence pattern, all days within the pattern need to be in the same week.