Revision: 31277
Updated Code
at May 19, 2011 06:50 by stephcode
Updated Code
For full year (four digits): JS: today=new Date(); y0=today.getFullYear(); HTML: <p>© <script type="text/javascript">document.write(y0);</script> Somecompany, Inc. All Rights reserved.</p> - - - - - For partial year (last two digits): JS: var foo = (new Date().getFullYear()).toString(); // Contains last two characters of the full year. // ex: 2003 evaluates to 03. var bar = foo.substring(foo.length, 2); HTML: <p>All contents ™ and © 2005-<script type="text/javascript">document.write(bar);</script> Somecompany, Inc. unless otherwise noted herein. All rights reserved.</p>
Revision: 31276
Updated Code
at May 19, 2011 06:50 by stephcode
Updated Code
For full year (four digits): JS: today=new Date(); y0=today.getFullYear(); HTML: <p>© <script type="text/javascript">document.write(y0);</script> Somecompany, Inc. All Rights reserved.</p> - - - - - For partial year (last two digits): JS: var foo = (new Date().getFullYear()).toString(); // Contains last two characters of the full year. // ex: 2003 evaluates to 03. var bar = foo.substring(foo.length, 2); HTML: <p>All contents ™ and © 2009-<script type="text/javascript">document.write(bar);</script> Somecompany unless otherwise noted herein. All rights reserved.</p>
Revision: 31275
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 2, 2010 05:33 by stephcode
Initial Code
<head><script src="js/date/date-update.js" type="text/javascript"></script></head> File: date-update.js today=new Date(); y0=today.getFullYear(); <body><script type="text/javascript" src="js/date/date-update-do.js"></script></body> File: date-update-do.js document.write(y0);
Initial URL
Initial Description
Initial Title
Year update for full (four digit) year or last two digits, with JavaScript
Initial Tags
date
Initial Language
JavaScript