<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFCalendarGetMaximumRangeOfUnit(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFCalendarGetMaximumRangeOfUnit"
  },
  "title" : "CFCalendarGetMaximumRangeOfUnit(_:_:)"
}
-->

# CFCalendarGetMaximumRangeOfUnit(_:_:)

Returns the maximum range limits of the values that a specified unit can take on in a given calendar.

```
func CFCalendarGetMaximumRangeOfUnit(_ calendar: CFCalendar!, _ unit: CFCalendarUnit) -> CFRange
```

## Parameters

`calendar`

The calendar to examine.

`unit`

A calendar unit. For valid values see [`CFCalendarUnit`](/documentation/CoreFoundation/CFCalendarUnit).

## Return Value

The maximum range limits of the values that the specified unit can take on in `calendar`. For example, in the Gregorian calendar the maximum ranges for the Day unit is 1-31.

## Discussion

---

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)