Contents

maximumRange(of:)

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

Declaration

func maximumRange(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 maximum range of values for the Day component is 1-31.

See Also

Getting Calendar Information