-3

Iam trying to calculate new date based on provided no. of days to base date(i.e current date or any specific date). Linux shell can do by date -d "2020-10-19 30 days"

2020-10-19 is base date 30 is new date after 30 days.

ROH07
  • 21
  • 3

1 Answers1

0
import java.time.LocalDate;

public class Main {

    public static void main(String[] args) {
        final LocalDate now = LocalDate.now();
        final LocalDate nowPlus30Days = now.plusDays(30);
        System.out.println(nowPlus30Days);
    }
}
Smutje
  • 17,733
  • 4
  • 24
  • 41
  • 1
    [Is it my duty to check for duplicate questions before answering?](https://meta.stackoverflow.com/questions/326622/is-it-my-duty-to-check-for-duplicate-questions-before-answering) – Abra Oct 19 '20 at 07:49