This should be easy, but I’m looking to add an integer variable called “rental_period” to the current date and then display it in DD/MM/YYYY form. This is my code:
duedate.setDate(duedate.getDate()+rental_period);
$("#pricing_due").html("DUE DATE: <strong>" + duedate.getDay() + "/" + duedate.getMonth() + "/" + duedate.getFullYear() + "</strong>");
Javascript datetimes are stored in milliseconds.
Therefore, assuming that
rental_periodin a number of days, you need to write(24 hours × 60 minutes × 60 seconds × 1000 milliseconds)
EDIT: Your code should work as is.