This datetime instance is immutable and unaffected by this method call.
The following three lines are identical in effect:
DateMidnight added = dt.plusWeeks(6); DateMidnight added = dt.plus(Period.weeks(6)); DateMidnight added = dt.withFieldAdded(DurationFieldType.weeks(), 6);@param weeks the amount of weeks to add, may be negative @return the new datetime plus the increased weeks @since 1.1
The calculation operates as if it were adding the equivalent in days.
The following three lines are identical in effect:
DateTime added = dt.plusWeeks(6); DateTime added = dt.plus(Period.weeks(6)); DateTime added = dt.withFieldAdded(DurationFieldType.weeks(), 6);
This datetime instance is immutable and unaffected by this method call. @param weeks the amount of weeks to add, may be negative @return the new datetime plus 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 added = dt.plusWeeks(6); LocalDate added = dt.plus(Period.weeks(6)); LocalDate added = dt.withFieldAdded(DurationFieldType.weeks(), 6);@param weeks the amount of weeks to add, may be negative @return the new LocalDate plus the increased weeks
|
|