Im try to do using html
convert to full name of month but i cant correctly do that , anyone know how to do that i need to 21-September-2017
please help me to fix this
thanks,
function init(){
var d = new Date();
var day = d.getDate();
var x = d.toDateString().substr(4, 3);
var year = d.getFullYear();
document.querySelector("#date").innerHTML = day + '-' + x + '-' + year;
}
window.onload = init;
<div id="date"></div>