def fmtTimeSpan(time, pad=0, point=0, short=False, after=False, unit=99):
 (type, point) = optimalPeriod(time, point, unit)
 time = convertSecondsTo(time, type)
 if (not point):
  time = int(round(time))
 if short:
  fmt = shortTimeFmt(type)
 elif after:
  fmt = afterTimeTable[type](_pluralCount(time, point))
 else:
  fmt = timeTable[type](_pluralCount(time, point))
 timestr = ('%(a)d.%(b)df' % {'a': pad, 'b': point})
 return locale.format_string(('%' + (fmt % timestr)), time)

def fmtTimeSpan ( time , pad = 0 , point = 0 , short = False , after = False , unit = 99 ) : ( type , point ) = optimalPeriod ( time , point , unit ) time = convertSecondsTo ( time , type ) if ( not point ) : time = int ( round ( time ) ) if short : fmt = shortTimeFmt ( type ) elif after : fmt = afterTimeTable [ type ] ( _pluralCount ( time , point ) ) else : fmt = timeTable [ type ] ( _pluralCount ( time , point ) ) timestr = ( '%(a)d.%(b)df' % { 'a' : pad , 'b' : point } ) return locale . format_string ( ( '%' + ( fmt % timestr ) ) , time )
return a string representing a time span .