Contents

range(ofWeekendStart:interval:containing:)

Returns whether a given date falls within a weekend period, and if so, returns by reference the start date and time interval of the weekend range.

Declaration

func range(ofWeekendStart datep: AutoreleasingUnsafeMutablePointer<NSDate?>?, interval tip: UnsafeMutablePointer<TimeInterval>?, containing 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.

  • date:

    The date to use to perform the calculation.

Return Value

true if the given date falls within a weekend period, otherwise false.

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

Getting Calendar Information