TimeFormatStyle

public enum TimeFormatStyle : Hashable, Encodable

A set of predefined time format styles.

  • Specifies no time output.

    Declaration

    Swift

    case none
  • Specifies short output, such as 3:30 PM.

    Declaration

    Swift

    case short
  • Specifies medium output, such as 3:30:32 PM.

    Declaration

    Swift

    case medium
  • Specifies medium output, such as 3:30:32 PM PDT.

    Declaration

    Swift

    case long
  • Encodes this value into the given encoder.

    Throws

    This function throws an error if any values are invalid for the given encoder’s format.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.