Fixed compareDates return statement

was return dateOne>dateTwo ? 1 : dateOne>dateTwo ? -1 : 0; should have been return dateOne>dateTwo ? 1 : dateOne<dateTwo ? -1 : 0;