velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: how to compare the time in Velocity?
Date Mon, 02 Sep 2002 13:54:06 GMT
On 9/2/02 9:24 AM, "Attila Szegedi" <szegedia@freemail.hu> wrote:

> 
> --
> 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.

Indeed, if he's using j.u.Date...

-- 
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>


Mime
View raw message