<html>
<body>
<h2>JavaScript Dates</h2>
<p>toLocaleDateString() returns the date (not the time) of a date, as a string, using locale conventions:</p>
<p id="demo"></p>
<script>
const d = new Date();
let text = d.toLocaleDateString();
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>