tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lamine Ba" <lamin...@hotmail.com>
Subject RE: Java Tip
Date Tue, 15 Nov 2005 21:37:32 GMT
I thought I should use Calendar.  However, I was not sure how to
manipulate the library.  Thanks for the tips Rahul and John.  They will
save me a lot of time.

T Lamine Ba
Software Intelligence for Real Estate Professionals.

 

-----Original Message-----
From: John Byrd [mailto:john.byrd@darkspell.com] 
Sent: Tuesday, November 15, 2005 3:52 PM
To: Tag Libraries Users List
Subject: Re: Java Tip

Calendar cal = Calendar.getInstance();
cal.setTime(timestamp);
cal.add(Calendar.DATE, 2);
Date compareDate = cal.getTime();
if (timestamp.before(compareDate()) return false;
else return true;

It's not Perl, but ...


> Hi all,
> 
> I am handling timestamps in one of my beans.  Can someone advise me on
> how to write the following script?  I am curious about what libraries
> you would be using... I am only using "java.util.Date" and it is not
> very flexible.
> 
> Function to evaluate a date passed by the function process
> ----------------------------------------------------------
> Boolean process(Date timestamp) {
> 	If timestamp < (today+2days)
> 		Return false;
> 	Else
> 		Return true;
> }
> ----------------------------------------------------------
> Thank you for your consideration.
> T Lamine Ba
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 

-- 
John Byrd
john.byrd@darkspell.com

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message