问题
I'm trying to create a set of calendar events for a repeating set of days that starts on the first monday of the month, then has an event for the day immediately after that (not necessarily the first tuesday of the month, but the first tuesday after the first monday of the month), but I'm not sure how to do it with the advanced iCalendar rules.
https://www.kanzaki.com/docs/ical/recur.html shows that you can recur on the nth date in a set of candidate dates via BYSETPOS
, but I can't figure out how to make this work for my particular case, if that's even possible.
回答1:
Sometimes it's helpful to think of another way of phrasing the recurrence rule with the same effect. In this case, I went with a Monthly recurrence on 2,3,4,5,6,7,8 of the month BUT only if that day is a Tuesday. That should always give you the first tuesday after the first monday. EG: If the 1st is the Tuesday, the rule will recur on the 8th of the Month.
RRULE:FREQ=MONTHLY;BYDAY=TU;BYMONTHDAY=2,3,4,5,6,7,8
See first few recurrences here: https://test.icalevents.com/event/first-tuesday-after-first-monday/
来源:https://stackoverflow.com/questions/61663797/icalendar-repeat-rule-for-the-day-after-the-second-monday-of-the-month