4d3b8b0673
Rename months_expired() to months_expired_at_return() and have the method return an integer representing the month count rather than an enum-like so that the API user has more flexibility with respect to what they then do with the result. Thanks to Brett for the review that suggested this, and for much of the clever math in this change. The results produced by returning_report.py (which is updated here to use the new API) are almost identical to the results produced before the change. In rare cases (about 2-5% of the time) a supporter's lapsed month count will fall into an adjacent bucket instead of the one it fell into before, usually because the previous result was wrong to begin with (due to the ugly days-per-3-months table that we used previously, which this change thankfully eliminates). |
||
---|---|---|
.. | ||
__init__.py | ||
models.py | ||
settings.py |