date.getFullYear()+"-"+("0" + (date.getMonth()+1)).slice(-2)+"-"+("0" + date.getDate()).slice(-2) // Returns format YYYY-MM-DD Padded with 0s for month and day