Display Current Year


/ Published in: JavaScript
Save to your folder(s)

Place anywhere on page where the full year is needed.


Copy this code and paste it in your HTML
  1. <script language="JavaScript">
  2. var d = new Date();
  3. var curr_year = d.getFullYear();
  4. </script>
  5.  
  6.  
  7. <script language="Javascript">document.write(curr_year);</script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.