Pramod,

If contains() check is removed then following scenario will fail when
compared date interval one with date interval two.

Date interval one - 01 Jan -2014   to 31-Jan-2014
Date interval two - 01-Dec-2013  to  31-Feb-2014


Thanks
Ashok


On Thu, Apr 17, 2014 at 12:29 AM, pramod <notifications@github.com> wrote:

> In
> mifosng-provider/src/main/java/org/mifosplatform/portfolio/interestratechart/domain/InterestRateChartFields.java:
>
> > +        }
> > +        return endDate;
> > +    }
> > +
> > +    public boolean isOverlapping(InterestRateChartFields that) {
> > +        final LocalDate thisFromDate = this.getFromDateAsLocalDate();
> > +        LocalDate thisEndDate = this.getEndDateAsLocalDate();
> > +        thisEndDate = thisEndDate == null ? DateUtils.getLocalDateOfTenant() : thisEndDate;
> > +        final LocalDate thatFromDate = that.getFromDateAsLocalDate();
> > +        LocalDate thatEndDate = that.getEndDateAsLocalDate();
> > +        thatEndDate = thatEndDate == null ? DateUtils.getLocalDateOfTenant() : thatEndDate;
> > +
> > +        final LocalDateInterval thisInterval = LocalDateInterval.create(thisFromDate, thisEndDate);
> > +        final LocalDateInterval thatInterval = LocalDateInterval.create(thatFromDate, thatEndDate);
> > +
> > +        if(thisInterval.containsPortionOf(thatInterval) || thisInterval.contains(thatInterval)){
>
> no need to check for contains here
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/openMF/mifosx/pull/861/files#r11700876>
> .
>