@register.filter(u'timesince', is_safe=False)
def timesince_filter(value, arg=None):
 if (not value):
  return u''
 try:
  if arg:
   return timesince(value, arg)
  return timesince(value)
 except (ValueError, TypeError):
  return u''

@ register . filter ( u'timesince' , is_safe = False ) def timesince_filter ( value , arg = None ) : if ( not value ) : return u'' try : if arg : return timesince ( value , arg ) return timesince ( value ) except ( ValueError , TypeError ) : return u''
formats a date as the time since that date .