magic-removal: Fixes #1052 -- Added a 'weeks' fidelity to strings returned by timesince()/timeutil().

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2006-01-08 13:17:36 +00:00
parent f998c7bcc6
commit ea35b35a14
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ def timesince(d, now=None):
chunks = (
(60 * 60 * 24 * 365, lambda n: ngettext('year', 'years', n)),
(60 * 60 * 24 * 30, lambda n: ngettext('month', 'months', n)),
(60 * 60 * 24 * 7, lambda n : ngettext('week', 'weeks', n)),
(60 * 60 * 24, lambda n : ngettext('day', 'days', n)),
(60 * 60, lambda n: ngettext('hour', 'hours', n)),
(60, lambda n: ngettext('minute', 'minutes', n))