Skip to content

Case

Calendar.RecurrenceRule.Weekday.nth(_:_:)

iOS 18.0+ iPadOS 18.0+ Mac Catalyst 18.0+ macOS 15.0+ tvOS 18.0+ watchOS 11.0+
Repeat on the n-th instance of the specified weekday in a month, if the recurrence has a monthly frequency. If the recurrence has a yearly frequency, repeat on the n-th week of the year.
case nth(Int, Locale.Weekday)

Discussion

If n is negative, repeat on the n-to-last of the given weekday.