NSDate

Undocumented

  • Add seconds to a date

    Parameter

    Parameter seconds: int - the number of seconds to add

    Returns

    NSDate

    Declaration

    Swift

    public func addSeconds(seconds: Int) -> NSDate

    Parameters

    seconds

    int - the number of seconds to add

    Return Value

    NSDate

  • Converts a date to a string representation (e.g. 1 month ago)

    Parameter

    Parameter numericDates: bool - true returns strings such as 1 day ago false returns strings such as Yesterday

    Returns

    String

    Declaration

    Swift

    public func timeAgo(numericDates:Bool = true) -> String

    Parameters

    numericDates

    bool - true returns strings such as 1 day ago false returns strings such as Yesterday

    Return Value

    String