If the addition is zero, then this
is returned.
These three lines are equivalent:
YearMonthDay added = ymd.withFieldAdded(DurationFieldType.days(), 6); YearMonthDay added = ymd.plusDays(6); YearMonthDay added = ymd.dayOfMonth().addToCopy(6);@param fieldType the field type to add to, not null @param amount the amount to add @return a copy of this instance with the field updated @throws IllegalArgumentException if the value is null or invalid @throws ArithmeticException if the new datetime exceeds the capacity
|
|
|
|
|
|
|
|