TRIF3CTA Interactive Marketing

Need web help? Hire TRIF3CTA. Subscribe
home / blog / entry

Dynamic Copyright Notices in 7 Web Languages

Website copyright notices are ubiquitous; you can find them in the footer of almost any site. It's also easy to spot copyright notices that haven't been updated in years, which could potentially send the signal that nobody is behind the wheel. A simple solution is to have the year update dynamically.

Here's several ways to "set it and forget it":

JavaScript

&copy; <script type="text/javascript"> //<![CDATA[ var d = new Date(); document.write(d.getFullYear()); //]]> </script>

PHP

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

Ruby/ERB

&copy; <%= Time.now.year %>

Django/Python

&copy; {% now "Y" %}

ASP

&copy; <% Response.Write Year(now) %>

JSP

&copy; <jsp:useBean id="now" class="java.util.Date"/> <fmt:formatDate value="${now}" type="DATE" pattern="yyyy"/>

ActionScript/Flash

trace("&copy; " + new Date().getFullYear();

Tags: timestamp, copyright notice

About the author
Judd Lyon

Judd Lyon is the Principal of TRIF3CTA, a web design and Internet marketing company in Austin, Texas.

LinkedIn: Judd Lyon | Twitter: @TRIF3CTA

Comments

There are no comments for this entry.


Leave a comment

The TRIF3CTA Blog is a collection of web design and Internet marketing hacks ideas.

TRIF3CTA is an online marketing company based in Austin, Texas. Learn more &rarr

Twitter: @trif3cta
Powered by ExpressionEngine Clicky Web Analytics
List once, be found everywhere
Trifecta Interactive Marketing, LLC
1712 E Riverside Dr, Ste 63
Austin, TX, 78741