---
title: "maximumRange(of:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/calendar/maximumrange(of:)"
---

# maximumRange(of:)

The maximum range limits of the values that a given component can take on.

## Declaration

```swift
func maximumRange(of component: Calendar.Component) -> Range<Int>?
```

## Parameters

- `component`: A component to calculate a range for.

## Return Value

Return Value The range, or nil if it could not be calculated.

## Discussion

Discussion As an example, in the Gregorian calendar the maximum range of values for the Day component is 1-31.

## See Also

### Getting Calendar Information

- [identifier](foundation/calendar/identifier-swift.property.md)
- [locale](foundation/calendar/locale.md)
- [firstWeekday](foundation/calendar/firstweekday.md)
- [minimumDaysInFirstWeek](foundation/calendar/minimumdaysinfirstweek.md)
- [timeZone](foundation/calendar/timezone.md)
- [minimumRange(of:)](foundation/calendar/minimumrange(of:).md)
- [ordinality(of:in:for:)](foundation/calendar/ordinality(of:in:for:).md)
- [range(of:in:for:)](foundation/calendar/range(of:in:for:).md)
