def human_seconds(interval):
 units = [(1, u'second'), (60, u'minute'), (60, u'hour'), (24, u'day'), (7, u'week'), (52, u'year'), (10, u'decade')]
 for i in range((len(units) - 1)):
  (increment, suffix) = units[i]
  (next_increment, _) = units[(i + 1)]
  interval /= float(increment)
  if (interval < next_increment):
   break
 else:
  (increment, suffix) = units[(-1)]
  interval /= float(increment)
 return (u'%3.1f %ss' % (interval, suffix))

def human_seconds ( interval ) : units = [ ( 1 , u'second' ) , ( 60 , u'minute' ) , ( 60 , u'hour' ) , ( 24 , u'day' ) , ( 7 , u'week' ) , ( 52 , u'year' ) , ( 10 , u'decade' ) ] for i in range ( ( len ( units ) - 1 ) ) : ( increment , suffix ) = units [ i ] ( next_increment , _ ) = units [ ( i + 1 ) ] interval /= float ( increment ) if ( interval < next_increment ) : break else : ( increment , suffix ) = units [ ( - 1 ) ] interval /= float ( increment ) return ( u'%3.1f %ss' % ( interval , suffix ) )
formats interval .