public void plusDays ( long delta ) { if ( delta != 0 ) { long result = getDay ( ) + delta ; if ( result >= 1 && result <= 28 ) { setDay ( ( int ) result ) ; } else { ZonedDateTime zonedDateTime = ZonedDateTime . from ( this ) ; ZonedDateTime plusDays = zonedDateTime . plusDays ( delta ) ; set ( plusDays ) ; } } }
Adds delta days . Delta can be negative . Month year and day fields are affected .