Posted By

BebenKoben on 01/30/11


Tagged

javascript


Versions (?)

Current and New Date


 / Published in: JavaScript
 

  1. <script type="text/javascript">
  2. var newDt = new Date();
  3. document.writeln("<b>Current Date</b> :" + newDt + "<br/>");
  4. // add 3 days to the current date
  5. newDt.setDate(newDt.getDate() + 3);
  6. document.writeln("<b>New Date</b> :" + newDt);
  7. </script>

Report this snippet  

You need to login to post a comment.