DateComponents
public extension DateComponents
-
Initializes date components with provided
tiveInterval
andcomponents
. Uses day, hour, minute, second, nanosecond components by default.Declaration
Swift
init(timeInterval: TimeInterval, components: Set<Calendar.Component> = [.day, .hour, .minute, .second, .nanosecond])