'Returns a relative date for a file path
This is typically used for new entries that do not have
\'git log\' information.'

def date(self):

    try:
        st = core.stat(self.path)
    except:
        return (N_(u'%d    minutes    ago') % 0)
    elapsed = (time.time() - st.st_mtime)
    minutes = int((elapsed / 60))
    if (minutes < 60):
        return (N_(u'%d    minutes    ago') % minutes)
    hours = int(((elapsed / 60) / 60))
    if (hours < 24):
        return (N_(u'%d    hours    ago') % hours)
    return (N_(u'%d    days    ago') % int((((elapsed / 60) / 60) / 24)))
