Contents

dateComponents(_:from:)

Returns all the date components of a date, using the calendar time zone.

Declaration

func dateComponents(_ components: Set<Calendar.Component>, from date: Date) -> DateComponents

Parameters

  • components:

    The components to return.

  • date:

    The Date to use.

Return Value

The date components of the specified date.

Discussion

See Also

Extracting Components