info@workbox.com (877) 473-9016

Blog

Does Your Website Still Think It’s 2013? Free Scripts Automatically Update Year

Friday, January 10, 2014
Back To BasicsWeb Design

Most of us know by now that it’s 2014, but does your website? Take a look at the bottom of your site to see if the year has changed or if it still reads 2013.

Since timeliness is everything on the web, you need it to show 2014 ASAP! You just can’t be behind the online times!

Fortunately, this is very easy to fix – now and for years to come. All you need is a simple script that automatically updates the year.

There are lots of scripts to handle this, but below are two of our favorites that you can copy and drop into your pages or site.

Javascript for just about any site or page:

<script type="text/javascript">var mdate = new Date();
document.write(mdate.getFullYear());</script>


For PHP pages:

<?php echo(date("Y")); ?>

 

We wish you a happy, healthy and prosperous new year!

Have you seen a script you like? Please share it!

new_year