I need to set up a program that compares the date of creation of a date object(say date object 1), with another a future date or date object(say date object 2) that represents the deadline. For example, if i create an initial datetime object, I want to be able to compare the current date of creation with lets say, a date 18 days after said date(deadline).I don't want to hardcode the actual dates and deadlines. It should return a bool( true when current date is equal or later than the deadline date, false otherwise). Eventually, I'll want to store the date of the deadline in an external database, then when appropriate compare said deadline date with the current date.
I can get the current date with the code below but unsure how to obtain a deadline day by specifyinging "x" days from the current date instead of hardcoding the date values.
I know how to create a date object(as show below) but i want to be able to create a deadline date object in correspondence to the current date of creation, store the deadline date in a database, while continually comparing the current date with the deadline date.
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd");
LocalDate localDate = LocalDate.now();
System.out.println(dtf.format(localDate)); //2016/11/16