Changeset 1579
- Timestamp:
- 12/08/05 20:52:27 (3 years ago)
- Files:
-
- django/trunk/AUTHORS (modified) (1 diff)
- django/trunk/django/utils/timesince.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/AUTHORS
r1578 r1579 76 76 Nebojša Dorđević 77 77 Sam Newman <http://www.magpiebrain.com/> 78 pgross@thoughtworks.com 79 phaedo <http://phaedo.cx/> 78 80 Luke Plant <http://lukeplant.me.uk/> 79 phaedo <http://phaedo.cx/>80 81 plisk 81 82 Oliver Rutherfurd <http://rutherfurd.net/> django/trunk/django/utils/timesince.py
r1374 r1579 5 5 def timesince(d, now=None): 6 6 """ 7 Takes a datetime object,returns the time between then and now7 Takes two datetime objects and returns the time between then and now 8 8 as a nicely formatted string, e.g "10 minutes" 9 9 Adapted from http://blog.natbat.co.uk/archive/2003/Jun/14/time_since … … 17 17 ) 18 18 if now: 19 t = time.mktime(now)19 t = now.timetuple() 20 20 else: 21 21 t = time.localtime() … … 48 48 """ 49 49 now = datetime.datetime.now() 50 return timesince(now, time.mktime(d.timetuple()))50 return timesince(now, d)
