CalendarWeekInfo

public struct CalendarWeekInfo : Hashable

The date model for one week in Calendar.

  • Public initializer for calendar week info.

    Declaration

    Swift

    public init(year: Int? = nil, month: Int? = nil, weekNumber: Int, dates: [Date])

    Parameters

    year

    The year that the week belongs to.

    month

    The month that the week belongs to.

    weekNumber

    The week number in the year.

    dates

    The dates in the week.

  • Check the week contains one date or not, the granularity is .day.

    Declaration

    Swift

    public func containsDate(_ comparedDate: Date) -> Bool