Popular recipes tagged "readable" but not "bubble"http://code.activestate.com/recipes/tags/readable-bubble/2012-04-26T10:37:10-07:00ActiveState Code RecipesHuman readable format for a given time delta (Python) 2012-04-26T10:37:10-07:00Thomas Lehmannhttp://code.activestate.com/recipes/users/4174477/http://code.activestate.com/recipes/578113-human-readable-format-for-a-given-time-delta/ <p style="color: grey"> Python recipe 578113 by <a href="/recipes/users/4174477/">Thomas Lehmann</a> (<a href="/recipes/tags/back/">back</a>, <a href="/recipes/tags/date/">date</a>, <a href="/recipes/tags/human/">human</a>, <a href="/recipes/tags/readable/">readable</a>, <a href="/recipes/tags/time/">time</a>). </p> <p><strong>What is it about?</strong></p> <ul> <li>I need to say someting like <em>1 day ago</em>, <em>5 days ago</em>, <em>2 weeks ago</em>, ...</li> <li>I can control to have it with/without milliseconds and microseconds.</li> <li>I can use it automatically with current date and time or with a provide one.</li> </ul> <p><strong>Why?</strong></p> <ul> <li>I need it for next revision of my <a href="http://code.activestate.com/recipes/578111/">recipe 578111</a>.</li> <li>I found recipes here and there but often it is always assumed that a month has 30 days and that a year has 365 days; this is not true. That's why I've left away months and years.</li> </ul>