human-datetimedelta

Human readable datetime deltas
Download

human-datetimedelta Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Col Wilson
  • Publisher web site:
  • http://terse-words.blogspot.com/

human-datetimedelta Tags


human-datetimedelta Description

human-datetimedelta is a Python module with human readable datetime deltas.Examples:from datetime import datetime, timedeltanow = datetime.now()an_hour_ago = now - timedelta(hours=1)yesterday = now - timedelta(days=1)tomorrow = now + timedelta(days=1)import humanprint human.date(now) # 'now'print human.date(an_hour_ago) # 'an hour ago'print human.date(an_hour_ago, short=True) # '1h ago'print human.date(an_hour_ago, asdays=True) # 'today'print human.date(yesterday, short=True) # 'yest'print human.date(tomorrow) # 'tomorrow'Product's homepage


human-datetimedelta Related Software