Contents

nextDate(after:matching:value:options:)

Returns the next date after a given date matching the given calendar unit value.

Declaration

func nextDate(after date: Date, matching unit: NSCalendar.Unit, value: Int, options: NSCalendar.Options = []) -> Date?

Parameters

  • date:

    The date for which to perform the calculation.

  • unit:

    The component to use. For possible values, see Unit.

  • value:

    The value for the given component.

  • options:

    Options for the calculation. For possible values, see Options.

Return Value

A new NSDate object.

See Also

Scanning Dates