Automatically Update Copyright Year

How to use javascript to automatically update the copyright year on your website.

Most websites have a copyright disclaimer on the bottom of every page... and when the calendar flips over to a new year those copyright years need to be updated. This Webflow tutorial shows you how to setup your copyright year to automatically update, so you don't have to worry about remembering to update anything.

Method 1 : Text Block and Custom Code

Below is the code for method 1 shown in the video. Be sure that the class you give to your Year Span Class matches the class inside the queryselector(' ');

Shout out to Finsweet for inspiring Method 1 in their Webflow Hacks. Learn more here: https://www.finsweet.com/hacks/14

Method 2 : Embed Block

Paste the below code into an embed block to get your year to automatically update. This is a single step option, but the content  will only be viewable on your published site.