Friday, February 20, 2015

How to Automatically Update The Copyright Year

By Gary Boutin

Supplies and Tools:
Basic HTML (Hypertext Markup Language) 
Basic understanding of JavaScript Language
Internet (or a good Coffee Shop with Internet access) 

Every year time is spent on my monthly maintenance of my each blog. Each post had a manual copyright year that would need to be changed by typed manually. When the blog reached over 400 post, there must be a better way of changing the year automatically. Searching the Internet for JavaScript Snippet that worked on the blog. the search engine found this code that made the year change easier than typing of the year easier. This code was written by S.Pradeep Kumar (

This post shows the six steps on how to put a JavaScript Snippet in your HTML coding that automatically updated the copyright year

Step 1: Open up your blogger existing post page. 
Step 2: Click on the HTML button on the left side of the page.
Step 3: Once in the HTML page, you  will see the following HTML coding. Place the JavaScript code were you want it to be. See below. 
Step 4: The code you want is the black type. Cut and paste the code were you want it to be. The copyright starting year 2011- and the ending year will appear near the dash. Your PC will make this date for you.
For example: 2011-2015 and next year it will be 2011-2016 etc. Change the 2011 to the beginning date that you started your blog or your web page. There are many Internet site that have this code, for this blog this JavaScript Snippet worked. This is the reason why this post was written.

Step 5: This JavaScript code was developed by S.Pradeep Kumar who built his own blog named HellBound Bloggers (HBB). Check it out and find many interesting articles. 

Step 6: Check the end of this blog and you can see for yourself that the JavaScript code works fine. If you go the JavaScript code Snippet. If you feel comfortable view the page source by clicking on the left button of your mouse.

Update: DIY Advisor has New blogs check them today:
  • Cookie Alert: European Union laws requires that you know that this blog uses cookies. If you are concerned about this please click here to see how Google uses this information.

Note: The reader must always exercise reasonable caution, follow current codes and regulations that may apply, and is urged to consult with a licensed contractor if in doubt about any steps on these posts. All names were changed to protect client's privacy. DIY Advisor. Reproduction of site content including photos without permission prohibited. All rights reserved. © Copyright 2011-

No comments:

Post a Comment