How can I get the current year to automatically display in the copyright area?
Thanks.
Hey Micheal0424!
Add this where you want the year to appear:
<script>document.write(new Date().getFullYear())</script>
E.g
Copyright © <script>document.write(new Date().getFullYear());</script>
Best regards,
Arvish
Worked perfectly, thanks!!
It’s great that this can be dropped straight into the footer field. Is there a way to adjust that to pass it a start year, then show just the start year if it matches the current year, but a range after that?
e.g.
– pass it 2013 as the start year and it shows Copyright © 2013 – 2014
– pass it 2014 and you get Copyright © 2014
This will work, just change the 2013 to the year you want.
Copyright © 2013 – <script>document.write(new Date().getFullYear());</script>
Thanks, but I believe that will always show one or the other. I probably wasn’t clear. I was hoping it might be possible in say 2014 to have it display Copyright © 2014, then in 2015 have it automatically update to Copyright © 2014 – 2015. Most people have hangovers on 1st January and don’t want to be updating a copyright notice so it would be lovely if it took care of itself ;-)
Hey!
Glad this could help guys.
Best regards,
Arvish