#19210: django.utils.timesince() does not account for leap years ------------------------------+------------------------------------ Reporter: jnns | Owner: nobody Type: Bug | Status: new Component: Core (Other) | Version: master Severity: Normal | Resolution: Keywords: date time | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ------------------------------+------------------------------------
Comment (by hirokiky): I applied my patch and tried test, using 365.2425 instead of 365 in chunks. test_thousand_years_ago passed, but a test failed, like this: {{{ ====================================================================== FAIL: test_other_units (regressiontests.utils.timesince.TimesinceTests) Test other units. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/hirokiky/django/django/tests/regressiontests/utils/timesince.py", line 42, in test_other_units self.assertEqual(timesince(self.t, self.t+self.oneyear), '1 year') AssertionError: u'12 months' != u'1 year' - 12 months + 1 year ---------------------------------------------------------------------- }}} -- Ticket URL: <https://code.djangoproject.com/ticket/19210#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.