Forums de discussion

Freemaker compare to date

shima shima, modifié il y a 9 années.

Freemaker compare to date

Junior Member Publications: 46 Date d'inscription: 14/04/14 Publications récentes
hi I want to compare two date to show new article and old one
1.I get publish_date_article:
<#assign today=dateUtil.getCurrentDate("EEEE dd MMMM yyyy hh:mm:ss", locale)/>
<#assign dateFormat = "dd MMM yyyy - HH:mm:ss" />
2.get System date:
<#assign publishDate=dateUtil.getDate(curEntry.getCreateDate(), dateFormat, locale)/>
${dateUtil.compareTo(today, publishDate)}

finally I want to compare them how could I do this??
thumbnail
Mohd Danish, modifié il y a 9 années.

RE: Freemaker compare to date

Regular Member Publications: 187 Date d'inscription: 05/03/12 Publications récentes
You can try as in the following links

http://freemarker.624813.n4.nabble.com/Comparing-dates-td3510392.html
http://comments.gmane.org/gmane.comp.web.freemarker.devel/7933