I have use the ${.now} to get the current time stamp inside the freemarker templates, but I want to know how can I get only the year?
Like ${.now?string('yyyy')}
. (Note that this will return a string, which is what you want if you only want to print it. If by any chance you need a number, so that you can do arithmetic with it, then it's .now?string('yyyy')?number
.)