Fix date filtering in getScheduledTripsBetween function