• JMap.Util.Date.formatDistanceToNow

    Returns in the user's locale language, the time that will pass, or passed from now for the given date.

    Parameters

    Returns string

    Throws

    if date is not a Date object, or ISO string, or timestamp number

    Example

    // returns in the user's locale language, the time that will pass, or passed from now for the given date
    JMap.Util.Date.formatDistanceToNow(new Date())