Automatically updating copyright year

I have a copyright notice with the form “© 2017-2021 AVEC33 — All rights reserved”. I’d like to have the second year change automatically to 2022 on Jan 1, 2022. Any suggestions?

Hello @maddaze,
In your footer, use :
© 2017-{current_date:Y} AVEC33 — All rights reserved
And this will give you the expected result.

4 Likes

Ceric,

Unfortunately, that didn’t work. See screenshot below:

Help!

It will show in the front end. Have you tied it?

As @tole011 said, did you check frontend ?
This will not render on backend, but will work on frontend.

@cedric and @tole011,

I thought I had in clicking on Preview. Apparently, that’s not good enough. When, following your advice, I did look at the footer on the real front end, it worked exactly as desired! Thank you, guys.

Since I don’t recognize this function or constant, could you point me to something that explains what’s going on and what else is possible in this way?

Thanks again!!

You should look at this one: Dynamic Data – Bricks Academy, and to other articles as well.

1 Like

@tole011 I had watched that video, but hadn’t picked up on {currentdate}. How did you and @cedric learn about the modifier :Y?

Hi,
I did by beeing curious and exploring community templates.
You can find this implemented in some community footer templates.

To be honest, can’t remember… :smiley:

@tole011 Been there, suffered that! :grinning:
@cedric You’re more ambitious than I am!

The format code looked familiar, so I checked the PHP documentation and played around a bit with {currentdate}. In fact, what Thomas is doing is formatting it with one of the PHP date functions. So, we have all the possibilities available in PHP to format dates.

Thanks again for your contributions.

1 Like

Hi @cedric

Can I use the same code for woocommerce email footer text?

Thanks