In months fix#609
Conversation
|
I believe that this change will not count March 31st to April 30th as one month, which is arguable whether it is or not. A check could be added for the following:
I don't personally consider this to be any more or less objectively correct than the behavior currently manifested by this PR (because "one month" is not well defined), but it might be more in line with what people "mean" when they say "one month from March 31st." I can dig back into the C code and make this change if there is a desire for it and it will help this PR along. |
Pull Request Check List
This is to address issue #606. The change to the
setupfixture in thetest_diffmodule to use UTC instead of Toronto is a workaround for issue #608.Not sure whether this should be based on
developormaster. Some of this is clearly a bug (see February in particular), but some of the side effects are changes in user-facing behavior of what pendulum thinks "1 month" means colloquially, e.g. whether March 31st to April 30th is 1 month (forward), and whether April 30th to March 31st is 1 month (backward).Rather than try to tweak the logic to satisfy the current notions of what "1 month" means, I let them change and updated the tests to match the new behavior.