Add one day into Joda-Time DateTime
If you want add days to current date time instance, use MutableDateTime
MutableDateTime dateTime = new MutableDateTime(date);
dateTime.addDays(1);
The plusDays
method is not a mutator. It returns a copy of the given DateTime
object with the change made rather than changing the given object.
If you want to actually change the variable dateTime
value, you'll need:
DateTime dateTime = new DateTime(date);
dateTime = dateTime.plusDays(1);