JavaScript: Copyright Year Generation

MobileHacks

New Member
Here's a little JavaScript that you can place in your copyright statement to keep your year up to date. Just put it where you want the year to display:

PHP:
<script type="text/javascript">
d = new Date();
y = d.getFullYear();
document.write(y);
</script>
OR
PHP:
<script type="text/javascript">d = new Date();y = d.getFullYear();document.write(y);</script>
They both do the same thing, one's just on a single line.

A JS file attached just in case you want to keep it as a back up.

Also, this works with any version of vBulletin (or should) and can be seen on vB.org.
 
Top