Hello guys,
I am trying to do the following:
1- Get the value from the calendar the user picked. 2- Add five years to the value chosen. 3- subtract the Value + five years from the current date. 4 Display the result of (value + 5 years - the current date).
So far that is what I have tried, the result in milliseconds won't be added properly it is kind of adding two strings to each other which I am not looking to do so.
let selectDate = document.getElementById('Calender').value;
let exact = Date.parse(selectDate);
let fiveYearsInMs = "157784760000";
console.log(exact+fiveYearsInMs);
Ps: I am looking to use JavaScript only, no moment.js, or anything else
any help, please?