def nice_time(time):
 if (time < 15):
  return 'moments'
 if (time < 90):
  return ('%d seconds' % time)
 if (time < ((60 * 60) * 1.5)):
  return ('%d minutes' % (time / 60.0))
 if (time < (((24 * 60) * 60) * 1.5)):
  return ('%d hours' % (time / 3600.0))
 if (time < ((((7 * 24) * 60) * 60) * 1.5)):
  return ('%d days' % (time / 86400.0))
 if (time < ((((30 * 24) * 60) * 60) * 1.5)):
  return ('%d weeks' % (time / 604800.0))
 return ('%d months' % (time / 2592000.0))

def nice_time ( time ) : if ( time < 15 ) : return 'moments' if ( time < 90 ) : return ( '%d seconds' % time ) if ( time < ( ( 60 * 60 ) * 1.5 ) ) : return ( '%d minutes' % ( time / 60.0 ) ) if ( time < ( ( ( 24 * 60 ) * 60 ) * 1.5 ) ) : return ( '%d hours' % ( time / 3600.0 ) ) if ( time < ( ( ( ( 7 * 24 ) * 60 ) * 60 ) * 1.5 ) ) : return ( '%d days' % ( time / 86400.0 ) ) if ( time < ( ( ( ( 30 * 24 ) * 60 ) * 60 ) * 1.5 ) ) : return ( '%d weeks' % ( time / 604800.0 ) ) return ( '%d months' % ( time / 2592000.0 ) )
format a time in seconds to a string like "5 minutes" .