- Posted by Apple Pie Design
- On February 18, 2019
- 0 Comments
- copyright info, website programming
It’s a new year, so why does your website still read © last year or worse?
Most web site owners forget to update their copyright date. And it’s easy to understand why. For most sites, the footer, where the copyright date usually sits, is below the fold and in small type anyways. But for site visitors, it can communicate the freshness of a website’s content. So it doesn’t hurt to make sure this information is updated.
You could do it manually, or like I did, by using a “Find and Replace” feature of my web programming program. An even better way is to present the date dynamically, and yes, even if you’re not using a server side technology like PHP or ASP.
Below are code snippets in various languages to present the current year on a web page. Note that I’m using the © character attribute for displaying the copyright symbol (and so should you).
This code can be used on any web page, including static HTML pages.
var theDate=new Date()
©<?php echo date(Y);?>
©<? echo date(Y);?>
Server Side Includes (SSI)
<!--#config timefmt="%Y" -->
<!--#echo var="date_LOCAL" -->