Contents

nextWeekendStart(_:interval:options:after:)

Returns by reference the starting date and time interval range of the next weekend period after a given date.

Declaration

func nextWeekendStart(_ datep: AutoreleasingUnsafeMutablePointer<NSDate?>?, interval tip: UnsafeMutablePointer<TimeInterval>?, options: NSCalendar.Options = [], after date: Date) -> Bool

Parameters

  • datep:

    Upon return, contains the starting date of the next weekend period.

  • tip:

    Upon return, contains the time interval of the next weekend period.

  • options:

    Options for the calculation. If you specify a backward search option (Searchbackwards), the starting date and time interval range of the preceding weekend period will be returned by reference instead.

  • date:

    The date for which to perform the calculation.

Return Value

false if the calendar and locale do not have the concept of a weekend, otherwise true.

Discussion

Note that a particular calendar day may not necessarily fall entirely within a weekend period, as weekends can start in the middle of a day in some calendars and locales.

See Also

Calculating Dates