Script to add five days to today’s date and convert the date to another time zone

function addDays() {
    var date = new Date();
    var day = 5* 60 * 60 * 24 * 1000;
    var endDate = new Date(date.getTime() + day);
    let us_time = format.format({
        value: endDate,
        type: format.Type.DATE,
        timezone: format.Timezone.AMERICA_NEW_YORK
    });
    return us_time;
}

Leave a comment

Your email address will not be published. Required fields are marked *