Contents

date(from:)

Returns a date created from the specified components.

Declaration

func date(from components: DateComponents) -> Date?

Parameters

  • components:

    Used as input to the search algorithm for finding a corresponding date.

Return Value

A new Date, or nil if a date could not be found which matches the components.

See Also

Calculating Dates from Components