corrected computation of required dates to download