add date range checking for training periods.