Skip to content

Instance Method

minimumRange(of:)

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
Returns the minimum range limits of the values that a given component can take on.
func minimumRange(of component: Calendar.Component) -> Range<Int>?

Parameters

component

A component to calculate a range for.

Return Value

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

Discussion

As an example, in the Gregorian calendar the minimum range of values for the Day component is 1-28.