fixed bug: the daysInBetween was not being computed correctly for dates earlier than the reference date.