Let say date current date is 10 Jan 2011. When I get date using js code
var now = new Date();
var currentDate = now.getDate() + '-' + (now.getMonth() + 1) + '-' + now.getFullYear();
It reutrns "10-1-2011"
but I want "10-01-2011" (2 places format)