Contents

isDateInWeekend(_:)

Returns a Boolean value indicating whether the given date is within a weekend period.

Declaration

func isDateInWeekend(_ date: Date) -> Bool

Parameters

  • date:

    The specified date.

Return Value

true if the given date is within a weekend, as defined by the calendar and calendar’s locale; otherwise, false.

See Also

Comparing Dates