ExpressibleByDateComponents
internal protocol ExpressibleByDateComponents
Expresses that a type can be initialized using DateComponents
.
-
Collection of
Calendar.Component
s that are required for proper initialization of this type’s instances.Declaration
Swift
static var requiredComponents: Set<Calendar.Component> { get }
-
Creates a new instance from
DateComponents
.Declaration
Swift
init(_ dateComponents: DateComponents)
Parameters
dateComponents
Date components to initialize from.