~ubuntu-branches/ubuntu/saucy/python-django/saucy-updates

« back to all changes in this revision

Viewing changes to django/utils/timesince.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2013-08-13 16:49:39 UTC
  • mfrom: (1.3.9)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: package-import@ubuntu.com-20130813164939-irlkd7hokvcgocfl
Tags: upstream-1.5.2
ImportĀ upstreamĀ versionĀ 1.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    displayed.  For example, "2 weeks, 3 days" and "1 year, 3 months" are
17
17
    possible outputs, but "2 weeks, 3 hours" and "1 year, 5 days" are not.
18
18
 
19
 
    Adapted from http://blog.natbat.co.uk/archive/2003/Jun/14/time_since
 
19
    Adapted from
 
20
    http://web.archive.org/web/20060617175230/http://blog.natbat.co.uk/archive/2003/Jun/14/time_since
20
21
    """
21
22
    chunks = (
22
23
      (60 * 60 * 24 * 365, lambda n: ungettext('year', 'years', n)),