Date

struct Date : ReferenceConvertible, Comparable, Equatable
  • Pretty prints time ago since the date until now like An hour ago - parameter numericDates: tells wether it has to give strings like 1 day ago instead of Yesterday. - parameter inTerm: tells wich terms sould be displayed correctly instead of Long ago - returns: the string representation

    Declaration

    Swift

    func timeAgoSinceDate(numericDates: Bool, inTerm term: TimeTerm = .long) -> String

    Parameters

    numericDates

    tells wether it has to give strings like “1 day ago” instead of “Yesterday”.

    inTerm

    tells wich terms sould be displayed correctly instead of “Long ago”

    Return Value

    the string representation