Calculating difference between dates in arraylist, based on a condition
<p>My ArrayList() is populated with VO, which contains startDate(010112),endDate(310112),month(1,2,3 ...12) and criteria(A,B,C)</p>

<p>I need to calculate the difference between startDate and endDate in my arralist for criteria A and B.</p>

<p>Ex: ArraList1 - <strong>startDate(010112)</strong>,endDate(310112),month(1),criteria(A)
    ArraList2 - startDate(010212),endDate(260212),month(2),criteria(B)
    ArraList3 - startDate(260212),<strong>endDate(250312)</strong>,month(3),criteria(B)
    ArraList4 - startDate(250312),endDate(310412),month(4),criteria(C)</p>

<p>output : difference between (<strong>startDate(010112),endDate(250312)</strong>) , Any help is much appreciated.</p>
