Alternative ways to handle days overflowing months #279
ariebovenberg
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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 ("roll over") or (2) raising an exception.Places where this could be useful:
Beta Was this translation helpful? Give feedback.
All reactions