Display day of the week, hours and minutes, and date
<p>I would like to adapt this script so it can also display the day of the week and the date.</p>

<pre><code>(function () {
    function checkTime(i) {
        return (i &lt; 10) ? "0" + i : i;
    }

    function startTime() {
        var today = new Date(),
            h = checkTime(today.getHours()),
            m = checkTime(today.getMinutes());
        document.getElementById('time').innerHTML = h + ":" + m;
        t = setTimeout(function () {
            startTime()
        }, 500);
    }
    startTime();
})();
</code></pre>

<p>I though about adding a <code>getDay();</code> but I don't know how to add it in the function to be honest. Knowing that the day and date must update automaticaly on the page, that will stay open for days.. (It's a display that will almost always stay on.)</p>

<p>Any idea ? </p>