Edit in JSFiddle

var date = new Date();

document.getElementById("output1").innerHTML = date.toSource();

var month = date.getMonth();

document.getElementById("output2").innerHTML = month.toSource();
<div id="output1"></div>
<div id="output2"></div>