This datetime instance is immutable and unaffected by this method call.
The following three lines are identical in effect:
YearMonthDay subtracted = dt.minusMonths(6); YearMonthDay subtracted = dt.minus(Period.months(6)); YearMonthDay subtracted = dt.withFieldAdded(DurationFieldType.months(), -6);@param months the amount of months to subtract, may be negative @return the new datetime minus the increased months @since 1.1
|
|
|
|