Displaying the copyright years in Blogger template

496 Views Asked by At

Is there a way to display the copyright years (including the first year) of a blog in a Blogger template?

Actually I can display only the last year (on user level, because is just a JavaScript code):

<span itemprop="copyrightYear"><script type='text/javascript'>document.write(new Date().getFullYear());</script></span>

I'm trying to find something like Tumblr does with the {CopyrightYears} do in Tumblr themes (here's the similar question, but for Tumblr).

Thank you in advance for your answers.

2

There are 2 best solutions below

1
On

Just add the 1st year manually then getFullYear.

2
On

You can either edit the template HTML code OR better yet, go to Layout tab -> Add a Gadget (at the bottom of the Footer section if possible) -> on the popup window, select HTML/Javascript and copy/paste the following code:

NOTE: the 2015 year is an example, edit to the desired starting year.

<span itemprop="copyrightYear">© 2015-<script>document.write(new Date().getFullYear());</script></span>

If you really want to add it to the template HTML code, go to the Template tab, click the down arrow next to Costumise and select Edit HTML. Scroll down to the end tag </body> and copy/paste the above code just before that tag.