Date

public extension Date
  • Get the current date and time, formatted.

    Declaration

    Swift

    static func getFormattedTime() -> String

    Return Value

    The current data and time as a timestamp.

  • Initializes a Data object from a timestamp string.

    Declaration

    Swift

    init?(yyyyMMddTHHmmss: String?)

    Parameters

    yyyyMMddTHHmmss

    The timestamp string.

    Return Value

    nil if the timestamp string cannot be converted to a Date.

  • Returns a string representation of the Date object.

    Declaration

    Swift

    var yyyyMMddTHHmmss: String { get }
  • Returns a DateFormatter instance customized for JSONEncoder.dateEncodingStrategy.

    Declaration

    Swift

    static let asTransactionTimestamp: DateFormatter