Skip to main content
Level 3
July 28, 2016
New

System Token for Plain Year - To be used in footers

  • July 28, 2016
  • 3 replies
  • 5039 views

For me personally it would be usefull to have a plain year token like "{{system.year}}" to return the current year. This would be very usefull in creating email and landing page footers and not having to go and manually update the year in all templates you are using.

3 replies

Grégoire_Miche2
Level 10
July 28, 2016

Hi Mihai,

this is easy to do with a Velocity script.

-Greg

Riz_Alvi
Level 3
November 12, 2019

Hi Gregoire,

Can you please share code for the Velocity script? Or other methodology where this can be accomplished. 

Thx

Riz Alvi
SanfordWhiteman
Level 10
November 12, 2019

$date.format(
  "yyyy",
  $date,
  $date.getLocale(),
  $date.getTimeZone().getTimeZone("America/New_York")
)

Substituting your time zone.

The Ideas space isn't best for support (you'll notice in particular there is no code syntax highlighter, which is terrible) so please open new threads in Products instead. You can link back to an Idea for context.

SydneyMulligan
Level 7
July 28, 2016

We use a folder level token at the top level of our Marketing Activities. It doesn't totally solve the problem, but you can just update the token once a year instead of updating all the templates.

February 6, 2020
No text available