title: using unix timestamp generate timedelta for babel's format_timedelta
body: <p>I am not sure I worded that correctly but python and time always confuses me.
  This is what I am trying.
  Given a unix timestamp (INT) which is definitely in the past (can be seconds ago or years ago) I want to generate a babel format_timedelta </p>
  
  <p>My problem is</p>
  
  <ol>
  <li>Babel format_timedelta takes timedelta as first argument</li>
  <li>so I guess I need to generate a timedelta using time.time() (now) and the unix timestamp I have.</li>
  </ol>
  
  <p>I can't figure out the part 2 and I believe there must be an easier/correct way to do this. Please share the best possible way to do this, also I need it to be fast in calculating since I have to use it in a web page.</p>
  
  <pre><code>def format_starttime(value, granularity="day"):
   delta = datetime.timedelta(seconds=time.time() - value)
   return format_timedelta(delta, granularity)
  </code></pre>
  
  <p>gives error in date.format_timedelta()
    AttributeError: 'module' object has no attribute 'format_timedelta'</p>