---
title: "afterOccurrences(_:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/calendar/recurrencerule/end-swift.struct/afteroccurrences(_:)"
---

# afterOccurrences(_:)

The event stops repeating after a given number of times

## Declaration

```swift
static func afterOccurrences(_ count: Int) -> Calendar.RecurrenceRule.End
```

## Parameters

- `count`: How many times to repeat the event, including the first occurrence. count must be greater than 0
