<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Calendar/RecurrenceRule/End-swift.struct/afterOccurrences(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation8CalendarV14RecurrenceRuleV3EndV16afterOccurrencesyAGSiFZ"
  },
  "title" : "afterOccurrences(_:)"
}
-->

# afterOccurrences(_:)

The event stops repeating after a given number of times

```
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`

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)