I am trying to make JavaScript that creates a new date based on a certain interval that could be either years, months, days or hours. I would like to create a new date with time depending on interval type. I don’t really know how to start.
var startDate = 2022-04-19T10:00:00.000Z
var interval = 10
var intervalType = "days" // could be Months, Days, Hours