AnsweredAssumed Answered

Freemarker date arithmetic

Question asked by rhofkens on Mar 13, 2007
Latest reply on Mar 15, 2007 by kevinr

I'm building a Freemarker Template that shows a grouped view of  the documents in a space:

- all docs changed today
- all docs changed yesterday
- all docs changed last week
- all docs changed last month

This would be easy enough to do using lucene queries with varying [date1] TO [date2] parts in the query.  Unfortunately, Freemarker doesn't seem to support date arithmetics, such as current_date - 1day and so on.

I don't like the idea of calculating the dates myself. Does anybody know of an easy way to do this in Freemarker?

Best regards,