javascript format date mmm dd, yyyy code example
Example 1: javascript format date yyyy-mm-dd
let today = new Date()
today.toISOString().split('T')[0]
Example 2: javascript date format dd-mm-yyyy
var date_format = new Date();
document.write(innerHTML = date_format.getMonth()+'-'+ date_format.getDate()+'-'+date_format.getFullYear());