|
|
|
|
|
by mjevans
1775 days ago
|
|
I did cover that: """ None of the examples in the article use a more vague syntax, such as "0 days before the end of the month". """ As another reply points out, it's incrementing the Month set of buckets. I'll also extend with other results I expect: 2020-12-31 .plus(1 months) => 2021-01-31
2020-12-31 .plus(2 months) => 2021-02-28
2020-12-31 .plus(3 months) => 2021-03-31
2020-12-31 .plus(4 months) => 2021-04-30
A normal human has several options, and truncating to stay within the month makes the most sense to the most people most of the time. It's perfectly reasonable to take that step when resolving the indicated date to a representable value.I'll go further: JodaTime probably isn't focused on Precision Date Calculations; it behaves very much the way I expect someone working with forms and fields, general CRUD enterprisy software stuff, would want auto-filled dates to work. |
|