Assuming an user would enter the date before the amount of days to add, meaning the date would be $(1) and the amount to add $(2), you can replace Date.now() with new Date('$(1)'), with the date under the YYYY-MM-DD format (preferably, to avoid confusing the Date constructor), but then you need to turn it into Unix time before adding the days by using .getTime().
So that gives you something like this:
$(eval d = new Date('$(1)'); a = parseInt('$(2)'); isNaN(d) ? 'Please enter a valid date, preferably under the YYYY-MM-DD format' : isNaN(a) ? 'Please enter an amount of days to add to $(1).' : `${a} days from $(1) is ${new Date(d.getTime() + (a * 86400000)).toISOString().split('T')[0]} UTC.`)
Please also note that the code can substract days too.