Returns a copy of this datetime minus 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 subtracting 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 subtracted = dt.minusDays(6); DateTime subtracted = dt.minus(Period.days(6)); DateTime subtracted = dt.withFieldAdded(DurationFieldType.days(), -6);
This datetime instance is immutable and unaffected by this method call.
@param days the amount of days to subtract, may be negative
@return the new datetime minus the increased days
@since 1.1