After revisiting this script, and some modifications, the following is available to allow a user to add a feature that calculates the expected delivery date.
ship.setDate( safety ); // add a number of days
Doesn't add days. It sets the day. More info
The setDate() method sets the day of the Date object relative to the beginning of the currently set month.
setDate()
Date
If you want to add days do something like this:
ship.setDate(ship.getDate()+1);