This datetime instance is immutable and unaffected by this method call.
The following three lines are identical in effect:
DateMidnight subtracted = dt.minusMonths(6); DateMidnight subtracted = dt.minus(Period.months(6)); DateMidnight 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
|
|