Contents

component(_:from:)

Returns the value for one component of a date.

Declaration

func component(_ component: Calendar.Component, from date: Date) -> Int

Parameters

  • component:

    The component to calculate.

  • date:

    The date to use.

Return Value

The value for the component.

See Also

Extracting Components