Looking to display the Date output in 2 different formats. Below is my current attempt:
<p id="demo"></p>
<script>
var d = new Date(day, month);
document.getElementById("demo").innerHTML = d.toString();
</script>
Unfortunately, the above code is not producing the desired output for me.
My goal with this code is to achieve the following output: 21 Jun
Additionally, I am interested in learning how to obtain the date in this format:
Jun 21, 2016 12:00 AM