got rid of deprecated DateMidnight