This datetime instance is immutable and unaffected by this method call.
The following three lines are identical in effect:
DateMidnight subtracted = dt.minusWeeks(6); DateMidnight subtracted = dt.minus(Period.weeks(6)); DateMidnight subtracted = dt.withFieldAdded(DurationFieldType.weeks(), -6);@param weeks the amount of weeks to subtract, may be negative @return the new datetime minus the increased weeks @since 1.1
The calculation operates as if it were subtracting the equivalent in days.
The following three lines are identical in effect:
DateTime subtracted = dt.minusWeeks(6); DateTime subtracted = dt.minus(Period.weeks(6)); DateTime subtracted = dt.withFieldAdded(DurationFieldType.weeks(), -6);
This datetime instance is immutable and unaffected by this method call. @param weeks the amount of weeks to subtract, may be negative @return the new datetime minus the increased weeks @since 1.1
This LocalDate instance is immutable and unaffected by this method call.
The following three lines are identical in effect:
LocalDate subtracted = dt.minusWeeks(6); LocalDate subtracted = dt.minus(Period.weeks(6)); LocalDate subtracted = dt.withFieldAdded(DurationFieldType.weeks(), -6);@param weeks the amount of weeks to subtract, may be negative @return the new LocalDate minus the increased weeks
|
|
|
|