User enters a date (field x[1]) and a number of days (field [x2]) results field y[1] = new date. 14 days after August 1st should be August 15th but it returns August 14th. I think the issue has something to do with time zones. Any ideas?
JavaScript:
const newDate = new Date(x[1]);
newDate.setDate(newDate.getDate()+x[2]);
const options = { year: 'numeric', month: 'short', day: 'numeric' };
const formattedNewDate = newDate.toLocaleDateString('en-US', options);
y[1] = formattedNewDate;
Last edited by a moderator: