System Token for Plain Year - To be used in footers

System Token for Plain Year - To be used in footers

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.

5 Comments
Grégoire_Miche2
Level 10

Hi Mihai,

this is easy to do with a Velocity script.

-Greg

SydneyMulligan
Level 10 - Champion Alumni

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.

Riz_Alvi
Level 3

Hi Gregoire,

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

Thx

SanfordWhiteman
Level 10 - Community Moderator

$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.

kh-lschutte
Community Manager
Status changed to: Open Ideas