def deltasince(value, now=None):
    """
    Returns a timedelta representing the time since passed datetime
    :param value: a datetime instance
    :param now: datetime to compare to (defaults to now)
    :returns: a timedelta representing the elapsed time
    """
    if now is None:
        now = timezone.now()

    delta = now - value

    return delta

    Returns a timedelta representing the time since passed datetime
    :param value: a datetime instance
    :param now: datetime to compare to (defaults to now)
    :returns: a timedelta representing the elapsed time
    
core/templatetags/duration.py