I\'ve created this script to calculate the date for 10 days in advance in the format of dd/mm/yyyy:
var MyDate = new Date(); var MyDateString = new Date(); M
I found the shorterst way to do this:
MyDateString.replace(/(^|\D)(\d)(?!\d)/g, '$10$2');
will add leading zeros to all lonely, single digits