Practical guide
BYSETPOS: Second in a Combined Weekday Set or Second of Each Day?
BYSETPOS chooses positions from the combined candidate set for each frequency interval. BYDAY=TU,TH;BYSETPOS=2 selects one second candidate per month, while BYDAY=2TU,2TH selects the second Tuesday and second Thursday separately.
Decide whether second describes the set or each weekday
A requirement for “the second Tuesday and second Thursday” names two independently numbered weekdays. A requirement for “the second available Tuesday-or-Thursday date” names one position in a combined list. Similar wording can produce different dates and different numbers of meetings.
For a MONTHLY rule, BYDAY=TU,TH;BYSETPOS=2 collects the month’s Tuesdays and Thursdays, orders their candidate dates, then chooses the second candidate. By contrast, BYDAY=2TU,2TH directly selects the second Tuesday and second Thursday. [1]
BYSETPOS is applied within the frequency interval after the other applicable BY selectors. It requires another BY rule part. It is not an instruction to count separately for each comma-separated weekday. [1]
Build January’s combined set
On a narrow screen, swipe within this table to read the remaining columns.
| Combined position | Candidate | Ordinal within that weekday |
|---|---|---|
| 1 | Tuesday 5 January | First Tuesday |
| 2 | Thursday 7 January | First Thursday |
| 3 | Tuesday 12 January | Second Tuesday |
| 4 | Thursday 14 January | Second Thursday |
| 5 | Tuesday 19 January | Third Tuesday |
The combined second candidate is January 7, which is only the first Thursday. The separate ordinal requirement selects January 12 and January 14. A single selected position therefore does not mean two events, and it does not necessarily select either weekday’s second occurrence.
Check more than one calendar month
On a narrow screen, swipe within this table to read the remaining columns.
| Month | Second in combined Tuesday/Thursday set | Second of each weekday |
|---|---|---|
| January | Thursday 7 January | Tuesday 12; Thursday 14 |
| February | Thursday 4 February | Tuesday 9; Thursday 11 |
| March | Thursday 4 March | Tuesday 9; Thursday 11 |
The combined policy supplies three occurrences across these three months. The separate policy supplies six. COUNT limits occurrences rather than calendar months, so use COUNT=3 for the first finite file and COUNT=6 for the second finite file.
The examples deliberately start on January 7 and January 12 respectively, because each DTSTART matches its own rule. An unrelated January 1 start would not make a reliable comparison: RFC 5545 calls an unsynchronized DTSTART recurrence set undefined. [2]
Read the two complete practice files
These are complete fictional calendar files for inspection and isolated practice. Identifiers and timestamps belong to the examples. No invitations or alarms are present. Keep your original export and use a separate test calendar before changing a live schedule; particular calendar-app import behavior has not been tested here.
Download practice second combined weekday (.ics)
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//DayMoon Calendar//Recurrence Practice 1.0//EN
BEGIN:VEVENT
UID:52e36885c81d9f22dbb4db2a@daymooncalendar.com
DTSTAMP:20261109T000000Z
DTSTART;VALUE=DATE:20270107
SUMMARY:Second combined weekday
RRULE:FREQ=MONTHLY;COUNT=3;BYDAY=TU,TH;BYSETPOS=2
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDARDownload practice second each weekday (.ics)
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//DayMoon Calendar//Recurrence Practice 1.0//EN
BEGIN:VEVENT
UID:06f83d29961ed02d69de0b97@daymooncalendar.com
DTSTAMP:20261109T000000Z
DTSTART;VALUE=DATE:20270112
SUMMARY:Second of each weekday
RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=2TU,2TH
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDARThese finite all-day schedules contain no holiday exclusions. If either selected date is a closure, a separate policy must say whether to cancel it or choose a replacement. Subtracting an EXDATE does not rerun BYSETPOS against a reduced candidate list.
Read every selector that can change the candidate set
Inspect FREQ first, then every BY selector and finally BYSETPOS. An additional BYMONTHDAY or other filter may reduce the candidates before positions are selected. If the candidate set has fewer than two members, position 2 contributes no candidate; it does not select an arbitrary fallback day.
For an actual schedule, write out a month with four occurrences of a selected weekday and one with five. Confirm the number of selected dates as well as their names. If the intended policy is one event on each second weekday, keep the weekday ordinals explicit. If it is a ranked slot from an availability set, label that combined set so readers can reproduce the choice.
Two complete position decisions
January 7 is only the first Thursday. Why did BYSETPOS=2 choose it?
It is the second date in the combined Tuesday/Thursday set.
January 5 Tuesday is candidate 1; January 7 Thursday is candidate 2. The weekday’s own ordinal is not the position in the combined list.
Can I use COUNT=3 in both files to cover January through March?
No. The separate-weekday file has two occurrences per month.
COUNT=3 there reaches January 12, January 14 and February 9. For the six listed January–March occurrences use COUNT=6. A count is not a three-month duration.
Sources and further reading
- RFC 5545 §3.3.10Rule scope and exact example interpretation.
- RFC 5545 §3.8.5.3Rule scope and exact example interpretation.