Handling the common "too many days in a month" situation should be customizable.
For example Date(2017, 1, 30).add(month=1) currently truncates the result: Date(2017, 2, 28). While this is what many libraries do by default, it may be worth adding different options, like (1) extrapolating or (2) raising an exception.
Places where this could be useful:
adding/subtracting months/years
(?) replacing the day/month component of a date(time)
Handling the common "too many days in a month" situation should be customizable.
For example
Date(2017, 1, 30).add(month=1)
currently truncates the result:Date(2017, 2, 28)
. While this is what many libraries do by default, it may be worth adding different options, like (1) extrapolating or (2) raising an exception.Places where this could be useful: