Retrieve how long ago a file has been modified.

    :param filename: name of the file

    >>> print modified('/')             # doctest: +SKIP
    3 days ago

def modified(filename):
    '''
    Retrieve how long ago a file has been modified.

    :param filename: name of the file

    >>> print modified('/')             # doctest: +SKIP
    3 days ago
    '''
    if isinstance(filename, file):
        filename = filename.name

    return duration(os.stat(filename)[stat.ST_MTIME])