#33879: timesince - wrong results for 11 months + several weeks
--------------------------------------+------------------------------------
     Reporter:  אורי                  |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Utilities             |                  Version:  dev
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by אורי):

 Thank you, Claude. I suggest calculating the number of days per month:

 {{{
 If months <= 2:
     30 * months
 else:
     int(30.4 * months)
 }}}

 (I confirm that `int(30.4 * months) == 30 * months` if `months` is 1 or 2)

 I'm not sure if I know how to submit a PR since currently
 `TIMESINCE_CHUNKS` doesn't support this. And I don't know how to change
 the algorithm to support this.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33879#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701825531cb37-5abba0b4-d020-46d4-8fe8-b91ffef76cc4-000000%40eu-central-1.amazonses.com.

Reply via email to