You made a website and delivered it to the client of yours. But with
its footer section, you wrote something like: "copyright (c) 2014
<your client's organization>. All Rights Reserved". But on
the next year, it is still showing the year as 2014 while it should
be year 2015. How to resolve this issue where this year update will
be done automatically, without your client contact you and you do the same?
This articles shows how, as follow:-
Write down the following code at the bottom of the webpage where you
are wanting to display that copyright text with the year:-
CopyRight © <script>document.write(new Date().getFullYear()) </script> <your client's organization>. All Rights Reserved.
With the above code:
<script>document.write(new Date().getFullYear()) </script>
will display the current year and even you don't need to write the
initial year on which you are making this website. So if you are
making your website on the year: 2014, that part of the code will
display the year 2014 when you just delivered the website to your
client and on the next year, it will automatically show the year as: 2015
and on the next year it will show the year as: 2016 and so on,
without your client's call to you to do the same.