ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Martin" <pbweb...@gmail.com>
Subject Date Comparison Function
Date Fri, 06 Oct 2006 13:22:44 GMT
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