Borders of the isValueActive method

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Borders of the isValueActive method

François Lecomte
Hi.

(using OFBiz 12.04 revision 1541297)

In EntityUtil.java (here for the same one on OFBiz trunk) there is a isValueActive method which contains the following test:
if ((thruDate == null || thruDate.after(moment)) && (fromDate == null || fromDate.before(moment) || fromDate.equals(moment))) {
           return true;
       }

Is there a specific reason to include the lower border (fromDate) but not the upper one? (thruDate)
I am not native English speaker, but I would have expected the upper border to be included as well. (as per Wiktionary entry for through : up to and including)
Am I misunderstanding something?


Best regards,

François Lecomte

signature.asc (501 bytes) Download Attachment