add proper fallback in case the date is not in the database (search for the closest date)