---
title: intervalUnit
framework: passkit
role: symbol
role_heading: Instance Property
path: passkit/pkrecurringpaymentsummaryitem/intervalunit
---

# intervalUnit

The amount of time – in calendar units such as day, month, or year – that represents a fraction of the total payment interval.

## Declaration

```swift
var intervalUnit: NSCalendar.Unit { get set }
```

## Discussion

Discussion The default value for the interval unit is month. The supported NSCalendar.Unit interval units are: minute hour day month year To set an interval unit based on a week, set intervalUnit to day, and set intervalCount to a multiple of the number of days per week. To find the number of days for a week in the current calendar, call NSCalendar.current.maximumRange(of: .weekday)!.count). For example, the code below sets a payment that occurs every two weeks. let daysPerWeek = NSCalendar.current.maximumRange(of: .weekday)!.count)

intervalUnit = .day intervalCount = daysPerWeek * 2

## See Also

### Setting the payment interval

- [intervalCount](passkit/pkrecurringpaymentsummaryitem/intervalcount.md)
