ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacopo Cappellato <...@sastau.it>
Subject Re: Date Comparison Function
Date Fri, 06 Oct 2006 13:30:03 GMT
Hi John,

I don't remember if we have something similar in OFBiz, but if not I 
think it is a good idea to include it; maybe I'd prefer to include the 
commons validator jar (and also the commons math jar 
http://jakarta.apache.org/commons/math/ would be interesting for reports 
etc... but this is anoether subject).

In the meantime, thanks for your ideas and research,

Jacopo

John Martin wrote:
> Hi All,
> 
> I searched through the code base looking for a simple date comparison
> method to compare two dates excluding time.  I was unable to find one.
> Is there one that I can use?
> 
> I want the ability to compare data A to B and determine if it is <, =,
> or >.  I've writen one, compareDates(Date A, Date B) compares the day,
> month and year of two dates, returing 0, -1 or +1 indicating whether
> the first date is equal, before or after the second.
> 
> If there isn't one, I propose adding my method to the
> framework\base\src\base\org\ofbiz\base\util\UtilDateTime.java class.
> 
> There is a method in commons validation jar but this jar is not
> included in the distro.
> http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/validator/routines/DateValidator.html

> 
> 
> Should we include my method or the commons validator jar?
> 
> Thanks,
> 
> John


Mime
View raw message