This question already has an answer here:
How do I get the current date in JavaScript?
33 answers
Date.getDay() javascript returns wrong day
6 answers
You should check the manual:
getDay - method returns the day of the week for the specified date according to local time, where 0 represents Sunday
getMonth - An integer number, between 0 and 11, representing the month in the given date according to local time. 0 corresponds to January, 1 to February, and so on.
getYear - A number representing the year of the given date, according to local time, minus 1900
What you are actually looking for is:
<p id="date"></p>
<script>
var today = new Date();
var day = today.getDate();
var month = today.getMonth() + 1;
var year = today.getFullYear();
document.getElementById('date').innerHTML = day + "." + month + "." + year;
</script>
</html>