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
yearThe year that the week belongs to.
monthThe month that the week belongs to.
weekNumberThe week number in the year.
datesThe dates in the week.
-
Check the week contains one date or not, the granularity is .day.
Declaration
Swift
public func containsDate(_ comparedDate: Date) -> Bool