Accessing static fields in freemarker templates

I want to access static fields in my freemarker. Specifically, those of the Calendar class so i can display Dates the way i want.

According to Google (https://stackoverflow.com/questions/9659547/freemarker-access-static-variables-of-an-object) i would need to modify how the Data that Freemarker is called with is created, but from a cursory search of the Hippo Code, i couldn’t find a class to change/override.

You could try adding the Object/Class to the request in your component’s doBeforeRender. That way you can access it in your freemarker template.

However for displaying dates in different ways, I would suggest using Freemarker’s built in capabilities:
https://freemarker.apache.org/docs/ref_builtins_date.html

In addition to above, you can also add methods to your beans and access them in freemarker

Why not use <@fmt.formatDate … > or one of the freemarker builtins?

https://freemarker.apache.org/docs/ref_builtins_date.html