3
I have a code that I want to check if the date is over 30 days with Jodatime, but putting in the console output the value is not assigned. I saw the following: https://stackoverflow.com/questions/16461361/add-one-day-into-joda-time-datetime
and I had the same idea, but it still didn’t work.
Follows the code :
DateTime dataEnvioPrevistoMaisTrintaDias = new DateTime();
dataEnvioPrevistoMaisTrintaDias = peg.getDataEnvioPrevisto().plus(30);
System.out.println("Data Envio : "+ peg.getDataEnvioPrevisto());
System.out.println("Data Envio + 30 : "+dataEnvioPrevistoMaisTrintaDias);
Console output:
Date Sent: 2017-09-29T00:00:00.000-03:00
Date Shipping + 30 : 2017-09-29T00:00:00.030-03:00