Your code is perfekt, but you didn't checked the runtime problems.
If you run your js code after declaring of the div it works.
Because, the javascript search after a id that not exits on the dom. If you change the sort of code the runtime problem will be removed.
Plunker Example
<li id="date"></li>
<script type="text/javascript">
n = new Date();
y = n.getFullYear();
m = n.getMonth() + 1;
d = n.getDate();
document.getElementById("date").innerHTML = m + "/" + d + "/" + y;
</script>
Problem Solution 2
If you want you can use moment libery of date/time it very useful.
Moment JS Libary