Changeset 5671
- Timestamp:
- 07/12/07 08:55:19 (1 year ago)
- Files:
-
- django/trunk/AUTHORS (modified) (1 diff)
- django/trunk/django/utils/dateformat.py (modified) (1 diff)
- django/trunk/django/utils/timesince.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/AUTHORS
r5663 r5671 226 226 scott@staplefish.com 227 227 serbaut@gmail.com 228 John Shaffer <jshaffer2112@gmail.com> 228 229 Pete Shinners <pete@shinners.org> 229 230 Jozko Skrablin <jozko.skrablin@gmail.com> django/trunk/django/utils/dateformat.py
r5609 r5671 228 228 else: 229 229 j = day_of_year + (7 - weekday) + (jan1_weekday - 1) 230 week_number = j / 7230 week_number = j // 7 231 231 if jan1_weekday > 4: 232 232 week_number -= 1 django/trunk/django/utils/timesince.py
r5609 r5671 34 34 since = delta.days * 24 * 60 * 60 + delta.seconds 35 35 for i, (seconds, name) in enumerate(chunks): 36 count = since / seconds36 count = since // seconds 37 37 if count != 0: 38 38 break 39 if count < 0:40 return ugettext('%d milliseconds') % math.floor((now - d).microseconds / 1000)41 39 s = ugettext('%(number)d %(type)s') % {'number': count, 'type': name(count)} 42 40 if i + 1 < len(chunks): 43 41 # Now get the second item 44 42 seconds2, name2 = chunks[i + 1] 45 count2 = (since - (seconds * count)) / seconds243 count2 = (since - (seconds * count)) // seconds2 46 44 if count2 != 0: 47 45 s += ugettext(', %(number)d %(type)s') % {'number': count2, 'type': name2(count2)}
