Possible Duplicate:
How to get current date in JavaScript
I need to get todays date in the format yyyymmdd using JavaScript.
I've used the following code:
var d = new Date();
d.getFullYear()+ '' +((d.getMonth()+1)) + '' + d.getDate();
But the month and date are returned in single digits, does someone know how to do this?