I have a string startDate, and I am trying to convert it to a date obj so I can add a day to it and get a new string "2020-09-16"
My code below is not working though:
let startDate = "2020-09-15"
let startDateObj = Date.parse(startDate)
console.log('startDateObj = ', startDateObj)
startDateObj.setDate(startDateObj.getDate()+1);
console.log('startDateObj = ', startDateObj)
produces output:
startDateObj = 1600128000000
(node:517) UnhandledPromiseRejectionWarning: TypeError: startDateObj.getDate is not a function