Duration addDays ( final int amount ) { Duration duration ; if ( amount < 0 ) { duration = getDatatypeFactory ( ) . newDuration ( false , 0 , 0 , Math . abs ( amount ) , 0 , 0 , 0 ) ; } else { duration = getDatatypeFactory ( ) . newDuration ( true , 0 , 0 , amount , 0 , 0 , 0 ) ; } return duration ; }
Create a Duration of x days .