zig.com Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript setDate()</h2>
<p>The setDate() method can be used to add days to a date.</p>
<p id="demo"></p>
<script>
  const d = new Date();
  d.setDate(d.getDate() + 50);
  document.getElementById("demo").innerHTML = d;
</script>
</body>
<!-- /js/tryit.asp?filename=tryjs_date_ahead  Thu, 06 Feb 2025 19:15:26 GMT -->
</html>