I am using $ {. now} to get the current timestamp inside freemarker templates, but I want to know how can I get only a year?
Like ${.now?string('yyyy')} . (Note that this will return the string you need only if you want to print it. If you ever need a number so you can do arithmetic with it, then it is .now?string('yyyy')?number . )
${.now?string('yyyy')}
.now?string('yyyy')?number
Source: https://habr.com/ru/post/1268099/More articles:How to touch EditTextPrefences from another activity or another thread - androidExclusion of empty nodes from SPARQL query results - pythonIntegration of django-zinnia with the existing django site - permissions, access to the model, etc. - pythonExternal ip for kubernetes shows in minikube - ipHow to get the parent of a specific commit in GIT? - gitHow can I stop a script in MATLAB if a timer object needs more than a given number of seconds? - matlabWhat is the difference between regular and read macros? - macrosPandas stratified fetch - pythonJava ByteBuffer BigEndian Double - javaStratified samples from Pandas - pythonAll Articles