velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Attila Szegedi" <szege...@freemail.hu>
Subject Re: how to compare the time in Velocity?
Date Mon, 02 Sep 2002 13:24:36 GMT

--
Attila Szegedi
home: http://www.szegedi.org

----- Original Message -----
From: "Geir Magnusson Jr." <geirm@optonline.net>
To: <velocity-user@jakarta.apache.org>
Sent: 2002. szeptember 2. 14:57
Subject: Re: how to compare the time in Velocity?


> On 9/1/02 11:00 PM, "James Wang" <touchmyheart10000@yahoo.com> wrote:
>
> > i got two time objects from  velocity template,and
> > i want to compare them in velocity,what can i do?
> > it seem i cant do such things!
> > do i have to compare it in Modules part in MVC?
> >
>
> Well, it depends on what kind of time objects.  The java.util.Date class
has
> a getTime() method, but those return longs (and Vel doesn't do longs).
>
> The best bet is to add a compare function to the time class or a
comparison
> tool into the context
>

No need for that as java.util.Date already has methods "boolean after(Date)"
and "boolean before(Date)" that compare it with other Dates.

Attila.

> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
>
>
>
>


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message