Re: Comparing dates

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
FreeMarker currently doesn't support date arithmetic. So right now you
had write some helper methods (TemplateHashModelEx), and put them into
the data-model, or expose them in an #inlcude-d/#import-ed template
(where you can do <#assign compareDates =
"com.example.MyComparatorMethod"?new()>).

-- 
Best regards,
 Daniel Dekany


Monday, May 9, 2011, 11:29:05 PM, Jochen Wiedmann wrote:

> Any idea, how to get the following working? What I'd like to do is to
> compare the dates.
>
>
>
>     <#if
> "01.04.2011"?date("dd.MM.yyyy").asDate.before("04.04.2011"?date("dd.MM.yyyy").asDate)>


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.