Returns a copy of this datetime plus the specified number of days.
The calculation will do its best to only change the day field retaining the same time of day. However, in certain circumstances, typically daylight savings cutover, it may be necessary to alter the time fields.
In spring an hour is typically removed. If adding one day results in the time being within the cutover then the time is adjusted to be within summer time. For example, if the cutover is from 01:59 to 03:00 and the result of this method would have been 02:30, then the result will be adjusted to 03:30.
The following three lines are identical in effect:
DateTime added = dt.plusDays(6); DateTime added = dt.plus(Period.days(6)); DateTime added = dt.withFieldAdded(DurationFieldType.days(), 6);
This datetime instance is immutable and unaffected by this method call.
@param days the amount of days to add, may be negative
@return the new datetime plus the increased days
@since 1.1