<!DOCTYPE html>
<html>
<body>
 
<h2>JavaScript abc</h2>
 
<p id="demo"></p>
 
<script>
var praveTed = new Date();
 
var dnes = new Date("2020-05-13");   
document.getElementById("demo").innerHTML = dnes;
 
var predtim = new Date("2019-03-03");   
document.getElementById("demo").innerHTML =
 predtim + '<br>' + dnes + "<br>" +
 "uplynulo dnu: " + (dnes-predtim)/1000/60/60/24;
 
 
</script>
 
</body>
</html>