Instant plus with negative values

后端 未结 0 1918
夕颜
夕颜 2021-02-10 19:50

I have this code

Instant now = Instant.now();
if(ammountDays >= 0){
    now = now.plus(ammountDays, ChronoUnit.DAYS);
}else{
    now = now.minus(Math.abs(ammou         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题