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);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…