Forum Discussion

jonathancrow's avatar
13 years ago

Get Current Date with Freemarker

How do I get the current date within Freemarker?

 

I am trying to determine if the user has logged in within the last week.

 

I have

<#assign my_lastlogin = user.lastVisitTime>

I thought something like

<#assign my_now = date.now> 

 

might do the trick but I haven't found an easy way to get the current date in Freemarker. I was then going to just do a simple comparison. Can anyone help?

 

Thanks,

Jonathan