DatabaseDateComponents

public struct DatabaseDateComponents : DatabaseValueConvertible, StatementColumnConvertible

DatabaseDateComponents reads and stores DateComponents in the database.

  • The available formats for reading and storing date components.

    See more

    Declaration

    Swift

    public enum Format : String
  • The date components

    Declaration

    Swift

    public let dateComponents: DateComponents
  • The database format

    Declaration

    Swift

    public let format: Format
  • Creates a DatabaseDateComponents from a DateComponents and a format.

    Declaration

    Swift

    public init(_ dateComponents: DateComponents, format: Format)

    Parameters

    dateComponents

    An optional DateComponents.

    format

    The format used for storing the date components in the database.