Date
extension Date
-
Convenience to return date components.
Declaration
Swift
public func components(in timezone: TimeZone = .current, calendar: Calendar = Calendar(identifier: .gregorian)) -> DateComponentsParameters
timezoneTimeZoneused to generate the date components. By default the current timezone is used.calendarCalendarused to generate the data components. By default the gregorian calendar is used. Currently SwiftIcal can only supports Gregorian calendars.
Date Extension Reference