DateComponentsConvertible

internal protocol DateComponentsConvertible

Expresses that a type can be represented as DateComponents.

  • Convert instance to a DateComponents.

    Declaration

    Swift

    func dateComponents(_ calendar: Calendar) -> DateComponents

    Parameters

    calendar

    Calendar for resulting components.

    Return Value

    Newly created DateComponents containing values from this instance.